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"
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
Subject: Re: [rt.cpan.org #48325] Allow "reinstall" to reinstall a module rather than "force"
Date: Thu, 30 Jul 2009 20:35:15 +0200
To: bug-CPAN [...] rt.cpan.org
From: andreas.koenig.7os6VVqR [...] franz.ak.mind.de (Andreas J. Koenig)
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
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
Subject: Re: [rt.cpan.org #48325] Allow "reinstall" to reinstall a module rather than "force"
Date: Fri, 10 Jan 2014 13:48:00 +0000
To: bug-CPAN [...] rt.cpan.org
From: Zefram <zefram [...] fysh.org>
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
Subject: Re: [rt.cpan.org #48325] Allow "reinstall" to reinstall a module rather than "force"
Date: Fri, 10 Jan 2014 08:57:20 -0500
To: bug-CPAN [...] rt.cpan.org
From: brian d foy <bdfoy [...] cpan.org>
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 :)
Subject: Re: [rt.cpan.org #48325] Allow "reinstall" to reinstall a module rather than "force"
Date: Fri, 10 Jan 2014 14:11:10 +0000
To: bug-CPAN [...] rt.cpan.org
From: Zefram <zefram [...] fysh.org>
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
RT-Send-CC: andreas.koenig.7os6VVqR [...] franz.ak.mind.de, zefram [...] fysh.org
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.