Skip Menu |

This queue is for tickets about the ExtUtils-Install CPAN distribution.

Report information
The Basics
Id: 13740
Status: open
Priority: 0/
Queue: ExtUtils-Install

People
Owner: yves [...] cpan.org
Requestors: cpan [...] perlmeister.com
Cc:
AdminCc:

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



Subject: Forcing installs of up-to-date copies
ExtUtils::Install skips installs of up-to-date copies. This is a problem with tools like "installwatch" and "checkinstall" because these hook into the actual copy process to detect files that are needed for an installation. It'd be nice if installing files, even if they're up-to-date, could be forced by setting an environment variable like MM_FORCE_INSTALL. I've attached a simple two-line patch plus documentation. Would be great if it could make it into the next release. Thanks, -- Mike
diff -Naur ExtUtils-MakeMaker-6.30/lib/ExtUtils/Install.pm ExtUtils-MakeMaker-6.30.patched/lib/ExtUtils/Install.pm --- ExtUtils-MakeMaker-6.30/lib/ExtUtils/Install.pm 2005-03-21 20:30:24.000000000 -0800 +++ ExtUtils-MakeMaker-6.30.patched/lib/ExtUtils/Install.pm 2005-07-17 10:19:02.879331664 -0700 @@ -76,6 +76,12 @@ If $uninstall_shadows is true any differing versions throughout @INC will be uninstalled. This is "make install UNINST=1" +Before actually installing each file, C<install> will check if there +already is an up-to-date copy installed. If there is, it will skip +this step for performance reasons. If this is undesirable, copying +the file can be forced by setting the environment variable +C<MM_FORCE_INSTALL> to a true value. + =cut sub install { @@ -122,6 +128,8 @@ $packlist->read($tmpfile) if (-f $tmpfile); my $cwd = cwd(); + my $force_install = $ENV{MM_FORCE_INSTALL}; + MOD_INSTALL: foreach my $source (sort keys %from_to) { #copy the tree to the target directory without altering #timestamp and permission and remember for the .packlist @@ -163,7 +171,7 @@ my $diff = 0; if ( -f $targetfile && -s _ == $size) { # We have a good chance, we can skip this one - $diff = compare($sourcefile, $targetfile); + $diff = $force_install || compare($sourcefile, $targetfile); } else { print "$sourcefile differs\n" if $verbose>1; $diff++;
Date: Sun, 17 Jul 2005 12:59:48 -0700
From: Michael G Schwern <schwern [...] pobox.com>
To: Michael_Schilli via RT <bug-ExtUtils-MakeMaker [...] rt.cpan.org>
CC: undisclosed-recipients: ;
Subject: Re: [cpan #13740] Forcing installs of up-to-date copies
RT-Send-Cc:
On Sun, Jul 17, 2005 at 01:36:49PM -0400, Michael_Schilli via RT wrote: Show quoted text
> ExtUtils::Install skips installs of up-to-date copies. This is a problem with tools like "installwatch" and "checkinstall" because these hook into the actual copy process to detect files that are needed for an installation.
I've never heard of these programs before. Could you provide some pointers to them and tell me what you're using them for? If its to roll a package from a CPAN module I'd suggest instead you use the DESTDIR option to install the module in a temp directory and roll up the package from that. perl Makefile.PL make test make install DESTDIR=/tmp/module-package -- Michael G Schwern schwern@pobox.com http://www.pobox.com/~schwern Insulting our readers is part of our business model. http://somethingpositive.net/sp07122005.shtml
On Sun Jul 17 13:36:48 2005, MSCHILLI wrote: Show quoted text
> ExtUtils::Install skips installs of up-to-date copies. This is a > problem with tools like "installwatch" and "checkinstall" because > these hook into the actual copy process to detect files that are > needed for an installation. > > It'd be nice if installing files, even if they're up-to-date, could be > forced by setting an environment variable like MM_FORCE_INSTALL. > I've attached a simple two-line patch plus documentation. > > Would be great if it could make it into the next release. >
Id this still needed? This ticket is very old. Cheers, yves
CC: cpan [...] perlmeister.com
Subject: Re: [rt.cpan.org #13740] Forcing installs of up-to-date copies
Date: Sat, 1 Mar 2008 13:01:16 -0800 (PST)
To: Yves via RT <bug-ExtUtils-Install [...] rt.cpan.org>
From: Mike Schilli <m [...] perlmeister.com>
On Sat, 1 Mar 2008, Yves via RT wrote: Show quoted text
> Id this still needed? This ticket is very old.
Actually, yes, it would be great if you could add the patch. -- Mike Mike Schilli m@perlmeister.com
From: mschwern [...] cpan.org
On Sat Mar 01 16:08:40 2008, m@perlmeister.com wrote: Show quoted text
> On Sat, 1 Mar 2008, Yves via RT wrote: >
> > Id this still needed? This ticket is very old.
> > Actually, yes, it would be great if you could add the patch.
My original questions when the bug was first reported never got answered. They would probably be enlightening. http://rt.cpan.org/Ticket/Display.html?id=13740#txn-137009
From: yves [...] cpan.org
On Sat Mar 01 16:08:40 2008, m@perlmeister.com wrote: Show quoted text
> On Sat, 1 Mar 2008, Yves via RT wrote: >
> > Id this still needed? This ticket is very old.
> > Actually, yes, it would be great if you could add the patch.
I doubt the patch will apply cleanly, but ill look into it. One question is what should happen if there are dupe copies in the install tree? Overwrite all of them? Yves
As of version 1.47 $ENV{EU_ALWAYS_COPY} causes files to be updated regardless as to whether they were unchanged. Thanks for the request. :-)
From: MSCHILLI [...] cpan.org
On Sun Mar 02 00:35:27 2008, MSCHWERN wrote: Show quoted text
> My original questions when the bug was first reported never got > answered. They would probably be enlightening. > http://rt.cpan.org/Ticket/Display.html?id=13740#txn-137009
Hey Michael, sorry for not answering your questions back then, somehow fell through the cracks, I'll give it a shot now: 1) checkinstall/installwatch are pretty well established programs to trace 'make install' and figure out what's changed, for details see http://www.google.com/search?q=checkinstall&btnI and http://www.google.com/search?q=installwatch&btnI 2) 'DESTDIR' indeed solves at least a part of the problem, but only if the Makefile.PL writer plays by the rules. As soon as they patch configuration files or manually copy files without going through the MakeMaker mechanism, they can't be traced. I would agree that the new parameter is just another way to do it, but, hey ... :) Yves, thanks for applying! -- Mike
Im closing the ticket now guys... Cheers, yves
Subject: Re: [rt.cpan.org #13740] Forcing installs of up-to-date copies
Date: Sun, 02 Mar 2008 13:14:56 -0800
To: bug-ExtUtils-Install [...] rt.cpan.org
From: Michael G Schwern <schwern [...] pobox.com>
Yves via RT wrote: Show quoted text
> As of version 1.47 $ENV{EU_ALWAYS_COPY} causes files to be updated > regardless as to whether they were unchanged.
That should be EU_INSTALL_ALWAYS_COPY as per the other environment variables. -- 29. The Irish MPs are not after “Me frosted lucky charms”. -- The 213 Things Skippy Is No Longer Allowed To Do In The U.S. Army http://skippyslist.com/list/
On Sun Mar 02 16:24:24 2008, schwern@pobox.com wrote: Show quoted text
> Yves via RT wrote:
> > As of version 1.47 $ENV{EU_ALWAYS_COPY} causes files to be updated > > regardless as to whether they were unchanged.
> > That should be EU_INSTALL_ALWAYS_COPY as per the other environment > variables.
The relevant part of lib/ExtUtils/Install.pm (starting at line 620 in v2.04) now reads: ##### The $always_copy parameter which when true causes files to be updated regardless as to whether they have changed, if it is defined but false then copies are made only if the files have changed, if it is undefined then the value of the environment variable EU_INSTALL_ALWAYS_COPY is used as default. ##### This suggests that this ticket is closable. Thank you very much. Jim Keenan