Skip Menu |
 

This queue is for tickets about the CPAN CPAN distribution.

Report information
The Basics
Id: 48325
Status: open
Priority: 0/
Queue: CPAN

People
Owner: Nobody in particular
Requestors: CHORNY [...] cpan.org
ovid [...] cpan.org
SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: Allow "reinstall" to reinstall a module rather than "force"
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Type: text/plain
Charset: utf8
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 604
Download (untitled) / with headers
text/plain 604b
Sometimes an installed module gets corrupted or is compiled against a binary incompatible version of Perl. That's when you want to reinstall a module. However, that causes a tricky issue: cpan[1]> install This::Module This::Module is up to date (1.01). When that happens, you have to do a "force install". However, if your tests fail, the module is still installed and that might be even worse than your original problem. It would be nice to be able to do this: cpan[1]> reinstall This::Module That would be like "force install", but still refuse to install if the tests fail. Cheers, Ovid
MIME-Version: 1.0
X-Spam-Status: No, hits=0.0 required=8.0 tests=
X-Authentication-Warning: k75.linux.bogus: k set sender to andreas.koenig.7os6VVqR [...] franz.ak.mind.de using -f
In-Reply-To: <rt-3.6.HEAD-14916-1248961298-592.48325-4-0 [...] rt.cpan.org> (Curtis Poe via's message of "Thu\, 30 Jul 2009 09\:41\:39 -0400")
References: <RT-Ticket-48325 [...] rt.cpan.org> <rt-3.6.HEAD-14916-1248961298-592.48325-4-0 [...] rt.cpan.org>
Message-ID: <87ab2mc93w.fsf [...] k75.linux.bogus>
Content-Type: text/plain; charset="utf-8"
X-RT-Original-Encoding: utf-8
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by diesel.bestpractical.com (Postfix) with SMTP id 4DEDE4D8181 for <bug-CPAN [...] rt.cpan.org>; Thu, 30 Jul 2009 14:35:26 -0400 (EDT)
Received: (qmail 28959 invoked by uid 103); 30 Jul 2009 18:35:25 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 30 Jul 2009 18:35:25 -0000
Received: from franz.ak.mind.de (HELO franz.ak.mind.de) (212.42.235.66) by 16.mx.develooper.com (qpsmtpd/0.80) with ESMTP; Thu, 30 Jul 2009 11:35:20 -0700
Received: from k75.linux.bogus (localhost.localdomain [127.0.0.1]) by k75.linux.bogus (8.14.3/8.14.3/Debian-6) with ESMTP id n6UIZFC4008984 for <bug-CPAN [...] rt.cpan.org>; Thu, 30 Jul 2009 20:35:15 +0200
Received: (from k [...] localhost) by k75.linux.bogus (8.14.3/8.14.3/Submit) id n6UIZFHX008983; Thu, 30 Jul 2009 20:35:15 +0200
Delivered-To: cpan-bug+CPAN [...] diesel.bestpractical.com
User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.2 (gnu/linux)
Subject: Re: [rt.cpan.org #48325] Allow "reinstall" to reinstall a module rather than "force"
Return-Path: <andreas.koenig.7os6VVqR [...] franz.ak.mind.de>
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: bug-CPAN [...] rt.cpan.org
Date: Thu, 30 Jul 2009 20:35:15 +0200
X-Spam-Level: *
To: bug-CPAN [...] rt.cpan.org
From: andreas.koenig.7os6VVqR [...] franz.ak.mind.de (Andreas J. Koenig)
RT-Message-ID: <rt-3.6.HEAD-14916-1248978936-1977.48325-0-0 [...] rt.cpan.org>
Content-Length: 119
Download (untitled) / with headers
text/plain 119b
just a thought: it seems to me that 'test X' followed by 'force install X' is the current idiom for that. -- andreas
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-10814-1331565734-386.48325-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 313
Download (untitled) / with headers
text/plain 313b
+1 to this. I have just been in a situation where I wanted to test what CPAN would do to install a module, even though it is already installed. Also I know that the tests may well break. I don't want to install it if the tests fail. Show quoted text
cpan> notest install ...
would not be what I want here. -- Paul Evans
From zefram [...] fysh.org Fri Jan 10 08: 48:11 2014
MIME-Version: 1.0
X-Spam-Status: No, score=-2.005 tagged_above=-99.9 required=10 tests=[AWL=0.017, BAYES_00=-1.9, RP_MATCHES_RCVD=-0.121, SPF_HELO_PASS=-0.001] autolearn=ham
Content-Disposition: inline
X-Spam-Flag: NO
X-RT-Interface: API
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
Message-ID: <20140110134800.GI21945 [...] fysh.org>
content-type: text/plain; charset="utf-8"
X-RT-Original-Encoding: utf-8
X-Spam-Score: -2.005
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 8FF63240974 for <cpan-bug+CPAN [...] hipster.bestpractical.com>; Fri, 10 Jan 2014 08:48:11 -0500 (EST)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pf5p9TNNk4nb for <cpan-bug+CPAN [...] hipster.bestpractical.com>; Fri, 10 Jan 2014 08:48:10 -0500 (EST)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 288462402E7 for <bug-CPAN [...] rt.cpan.org>; Fri, 10 Jan 2014 08:48:10 -0500 (EST)
Received: (qmail 16432 invoked by alias); 10 Jan 2014 13:48:09 -0000
Received: from river.fysh.org (HELO river.fysh.org) (5.135.154.127) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Fri, 10 Jan 2014 05:48:07 -0800
Received: from zefram by river.fysh.org with local (Exim 4.80 #2 (Debian)) id 1W1cRM-0004FN-TC; Fri, 10 Jan 2014 13:48:00 +0000
Delivered-To: cpan-bug+CPAN [...] hipster.bestpractical.com
Subject: Re: [rt.cpan.org #48325] Allow "reinstall" to reinstall a module rather than "force"
Return-Path: <zefram [...] fysh.org>
X-Spam-Check-BY: la.mx.develooper.com
X-Original-To: cpan-bug+CPAN [...] hipster.bestpractical.com
X-RT-Mail-Extension: cpan
Date: Fri, 10 Jan 2014 13:48:00 +0000
X-Spam-Level:
To: bug-CPAN [...] rt.cpan.org
From: Zefram <zefram [...] fysh.org>
RT-Message-ID: <rt-4.0.18-29477-1389361692-535.48325-0-0 [...] rt.cpan.org>
Content-Length: 1629
Download (untitled) / with headers
text/plain 1.5k
When faced with this situation, in practice I do "cpan -t $module" followed by "cpan -fi $module". So I do test, but this is still not a real solution: it tests one build of the module and then force-installs a separate build. If the build process is the slightest bit non-deterministic, it may end up installing a broken build. Also, as the building and testing happen separately for the two builds, this is much slower than a single operation. What I want is a more specific "force" flag. Rather than forcing everything, I only want to override the check for the module already being installed. I don't want to ignore the tests, or to force anything else that is (or might be) controlled by the generic "force" modifier. There ought to be similar more-specific force flags for each thing that can be forced; it would generally be good practice to force only what one specifically wants forced. So "cpan --force-reinstall $module" would reinstall while paying attention to tests; "cpan --force-tests $module" would install while ignoring test failures but not if the module is already up to date. Interestingly, it seems the reinstall behaviour is available in the CPAN shell. "install $module" on its own won't reinstall, but if "test $module" (which doesn't care about the module already being installed) is done first then "install $module" will install from the same build directory even if the module is already installed. This process presumably respects test results. It can't be done from the command line, though: "cpan -ti $module", which might have been expected to replicate it, won't reinstall. -zefram
From brian.d.foy [...] gmail.com Fri Jan 10 08: 58:07 2014
MIME-Version: 1.0
X-Spam-Status: No, score=-2.599 tagged_above=-99.9 required=10 tests=[AWL=0.000, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=ham
In-Reply-To: <rt-4.0.18-29477-1389361692-1992.48325-5-0 [...] rt.cpan.org>
X-Spam-Flag: NO
X-RT-Interface: API
References: <RT-Ticket-48325 [...] rt.cpan.org> <20140110134800.GI21945 [...] fysh.org> <rt-4.0.18-29477-1389361692-1992.48325-5-0 [...] rt.cpan.org>
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
X-Received: by 10.52.237.228 with SMTP id vf4mr6775427vdc.3.1389362280268; Fri, 10 Jan 2014 05:58:00 -0800 (PST)
Message-ID: <CAPk17=62YodMA1ZjE+U7NQoM0eeaofBCJdwkjmr84zxnw5aGzw [...] mail.gmail.com>
content-type: text/plain; charset="utf-8"
X-RT-Original-Encoding: utf-8
X-Spam-Score: -2.599
Authentication-Results: hipster.bestpractical.com (amavisd-new); dkim=pass header.i= [...] gmail.com
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id A6AD4240974 for <cpan-bug+CPAN [...] hipster.bestpractical.com>; Fri, 10 Jan 2014 08:58:07 -0500 (EST)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bl7ylFQHd7Ed for <cpan-bug+CPAN [...] hipster.bestpractical.com>; Fri, 10 Jan 2014 08:58:06 -0500 (EST)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 5750A24042C for <bug-CPAN [...] rt.cpan.org>; Fri, 10 Jan 2014 08:58:06 -0500 (EST)
Received: (qmail 17220 invoked by alias); 10 Jan 2014 13:58:05 -0000
Received: from mail-ve0-f174.google.com (HELO mail-ve0-f174.google.com) (209.85.128.174) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Fri, 10 Jan 2014 05:58:04 -0800
Received: by mail-ve0-f174.google.com with SMTP id cz12so464218veb.19 for <bug-CPAN [...] rt.cpan.org>; Fri, 10 Jan 2014 05:58:00 -0800 (PST)
Received: by 10.58.216.38 with HTTP; Fri, 10 Jan 2014 05:57:20 -0800 (PST)
Delivered-To: cpan-bug+CPAN [...] hipster.bestpractical.com
Subject: Re: [rt.cpan.org #48325] Allow "reinstall" to reinstall a module rather than "force"
Return-Path: <brian.d.foy [...] gmail.com>
Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=zEDEPZxTQdf//I/ShNPZXY1ysGX6a85t7TuHaT/73Vg=; b=elrO5713Ia+JlpgUKpq/njg/iK0KHvIXhrCyVKgQm3I8CF5R2WWd11NlNMypp6Woa5 vadF3CMSTjeJFg2XbaLk33uk1tGlzx5MeqKQRVcKUiUc9PmjuK22G9C/oiG2K+L719gi YH7Haeomvy6pPGs2UQMRWMDqVGB/FYOpQH3dQIDFLGi+882lM+xZF63D7NAqiWzHnuXX i6zkb8akgNZiUwC3+luAC37XDHcsMh4FU0IF+Sd9K+rZY8pdhoTgte1+lxbv1+z3O2BV pgDzlyFEfisxeaLb41yLhkz70JTzecnttGv03h/IQ5dabLcM6G1dHFegrj6LZnOF/y7h o6Ew==
X-Spam-Check-BY: la.mx.develooper.com
X-Original-To: cpan-bug+CPAN [...] hipster.bestpractical.com
X-RT-Mail-Extension: cpan
X-Google-Sender-Auth: jC_GIAZzNvwAHz5t8Qj49CP3WNM
Sender: brian.d.foy [...] gmail.com
Date: Fri, 10 Jan 2014 08:57:20 -0500
X-Spam-Level:
To: bug-CPAN [...] rt.cpan.org
From: brian d foy <bdfoy [...] cpan.org>
RT-Message-ID: <rt-4.0.18-19218-1389362288-176.48325-0-0 [...] rt.cpan.org>
Content-Length: 105
Download (untitled) / with headers
text/plain 105b
That sounds like a good feature, but I don't have time to work on it. I do have time to merge patches :)
From zefram [...] fysh.org Fri Jan 10 09: 11:25 2014
MIME-Version: 1.0
X-Spam-Status: No, score=-2.007 tagged_above=-99.9 required=10 tests=[AWL=0.015, BAYES_00=-1.9, RP_MATCHES_RCVD=-0.121, SPF_HELO_PASS=-0.001] autolearn=ham
In-Reply-To: <20140110134800.GI21945 [...] fysh.org>
Content-Disposition: inline
X-Spam-Flag: NO
X-RT-Interface: API
References: <20140110134800.GI21945 [...] fysh.org>
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
Message-ID: <20140110141110.GA19688 [...] fysh.org>
content-type: text/plain; charset="utf-8"
X-RT-Original-Encoding: utf-8
X-Spam-Score: -2.007
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 21C43240974 for <cpan-bug+CPAN [...] hipster.bestpractical.com>; Fri, 10 Jan 2014 09:11:25 -0500 (EST)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5SzLzQjRclsL for <cpan-bug+CPAN [...] hipster.bestpractical.com>; Fri, 10 Jan 2014 09:11:23 -0500 (EST)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 9595D24042C for <bug-CPAN [...] rt.cpan.org>; Fri, 10 Jan 2014 09:11:23 -0500 (EST)
Received: (qmail 18060 invoked by alias); 10 Jan 2014 14:11:23 -0000
Received: from river.fysh.org (HELO river.fysh.org) (5.135.154.127) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Fri, 10 Jan 2014 06:11:17 -0800
Received: from zefram by river.fysh.org with local (Exim 4.80 #2 (Debian)) id 1W1cnm-0005AG-5F; Fri, 10 Jan 2014 14:11:10 +0000
Delivered-To: cpan-bug+CPAN [...] hipster.bestpractical.com
Subject: Re: [rt.cpan.org #48325] Allow "reinstall" to reinstall a module rather than "force"
Return-Path: <zefram [...] fysh.org>
X-Spam-Check-BY: la.mx.develooper.com
X-Original-To: cpan-bug+CPAN [...] hipster.bestpractical.com
X-RT-Mail-Extension: cpan
Date: Fri, 10 Jan 2014 14:11:10 +0000
X-Spam-Level:
To: bug-CPAN [...] rt.cpan.org
From: Zefram <zefram [...] fysh.org>
RT-Message-ID: <rt-4.0.18-28379-1389363085-965.48325-0-0 [...] rt.cpan.org>
Content-Length: 281
Download (untitled) / with headers
text/plain 281b
I wrote: Show quoted text
>Interestingly, it seems the reinstall behaviour is available in the >CPAN shell.
I think I was actually mistaken about this. I can't reproduce the behaviour I described. I may have confused myself by testing with a module that was actually not yet installed. -zefram
MIME-Version: 1.0
In-Reply-To: <rt-4.0.18-28379-1389363085-965.48325-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <20140110134800.GI21945 [...] fysh.org> <20140110141110.GA19688 [...] fysh.org> <rt-4.0.18-28379-1389363085-965.48325-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-5780-1420983216-364.48325-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
RT-Send-CC: andreas.koenig.7os6VVqR [...] franz.ak.mind.de, zefram [...] fysh.org
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 500
Download (untitled) / with headers
text/plain 500b
On 2014-01-10 09:11:25, zefram@fysh.org wrote: Show quoted text
> I wrote:
> >Interestingly, it seems the reinstall behaviour is available in the > >CPAN shell.
> > I think I was actually mistaken about this. I can't reproduce the > behaviour I described. I may have confused myself by testing with a > module that was actually not yet installed.
Currently to mimic "reinstall" functionality in the CPAN shell, one has to use test Module install_tested Having a "reinstall" command would indeed be nice.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.