Thread: [Module-build-general] 4th (undocumented) argument to ExtUtils::Install::install
Status: Beta
Brought to you by:
kwilliams
|
From: Dave R. <au...@ur...> - 2003-02-04 05:22:32
|
There's a 4th, very important, but completely undocumented argument to ExtUtils::Install. This is a flag that tells it to unlink "shadowing" files, and is how the "perl Makefile.PL UNINST=1" feature is implemented. Knowing this flag exists makes implementing this feature in Module::Build very easy. It also makes me _VERY DAMN IRRITATED_, but I was _already_ irritated about the general state of the legacy Perl build system, so that changes nothing ;) -dave /*======================= House Absolute Consulting www.houseabsolute.com =======================*/ |
|
From: Ken W. <ke...@ma...> - 2003-02-09 18:09:22
|
On Monday, February 3, 2003, at 09:21 PM, Dave Rolsky wrote:
> There's a 4th, very important, but completely undocumented argument to
> ExtUtils::Install. This is a flag that tells it to unlink "shadowing"
> files, and is how the "perl Makefile.PL UNINST=1" feature is
> implemented.
>
> Knowing this flag exists makes implementing this feature in
> Module::Build
> very easy. It also makes me _VERY DAMN IRRITATED_, but I was _already_
> irritated about the general state of the legacy Perl build system, so
> that
> changes nothing ;)
So, I made this change in the M::B code, and it didn't seem to produce
the desired effect:
------------------------------------------------------------------------
--------
sub ACTION_install {
my ($self) = @_;
require ExtUtils::Install;
$self->depends_on('build');
ExtUtils::Install::install($self->install_map('blib'), 1, 0,
$self->{args}{uninst}||0);
}
sub ACTION_fakeinstall {
my ($self) = @_;
require ExtUtils::Install;
$self->depends_on('build');
ExtUtils::Install::install($self->install_map('blib'), 1, 1,
$self->{args}{uninst}||0);
}
------------------------------------------------------------------------
--------
Doing a 'Build install uninst=1' didn't unlink the ghosties. I don't
have time to check into it right now though, because I'm busily at work
trying to make some headway on my soon-due thesis. Any idea why this
wouldn't work?
-Ken
|
|
From: Dave R. <au...@ur...> - 2003-02-09 18:32:55
|
On Sun, 9 Feb 2003, Ken Williams wrote:
> So, I made this change in the M::B code, and it didn't seem to produce
> the desired effect:
>
> ------------------------------------------------------------------------
> --------
> sub ACTION_install {
> my ($self) = @_;
> require ExtUtils::Install;
> $self->depends_on('build');
> ExtUtils::Install::install($self->install_map('blib'), 1, 0,
> $self->{args}{uninst}||0);
> }
>
> sub ACTION_fakeinstall {
> my ($self) = @_;
> require ExtUtils::Install;
> $self->depends_on('build');
> ExtUtils::Install::install($self->install_map('blib'), 1, 1,
> $self->{args}{uninst}||0);
> }
> ------------------------------------------------------------------------
> --------
>
> Doing a 'Build install uninst=1' didn't unlink the ghosties. I don't
> have time to check into it right now though, because I'm busily at work
> trying to make some headway on my soon-due thesis. Any idea why this
> wouldn't work?
It'll only unlink a shadowing file _if and only if_ it is installing a new
file. So if you just run "./Build install uninst=1" and nothing has
changed, then nothing gets unlinked.
I don't know if this is correct, but that's the deal ;)
Also, for extra fun, note that EU::Install prints messages like this:
## Running 'make install UNINST=1' will unlink $plural for you.\n
direct to STDOUT. It'd be nice to catch that and rewrite it in M::B
language, but what an annoying PITA.
-dave
/*=======================
House Absolute Consulting
www.houseabsolute.com
=======================*/
|
|
From: Ken W. <ke...@ma...> - 2003-02-09 18:37:28
|
On Sunday, February 9, 2003, at 10:31 AM, Dave Rolsky wrote: > It'll only unlink a shadowing file _if and only if_ it is installing a > new > file. So if you just run "./Build install uninst=1" and nothing has > changed, then nothing gets unlinked. > > I don't know if this is correct, but that's the deal ;) Yeah, but in my case that's what was happening, and it still didn't unlink 'em. > Also, for extra fun, note that EU::Install prints messages like this: > > ## Running 'make install UNINST=1' will unlink $plural for you.\n > > direct to STDOUT. It'd be nice to catch that and rewrite it in M::B > language, but what an annoying PITA. Indeed. -Ken |
|
From: Dave R. <au...@ur...> - 2003-02-09 18:47:25
|
On Sun, 9 Feb 2003, Ken Williams wrote: > > It'll only unlink a shadowing file _if and only if_ it is installing a > > new > > file. So if you just run "./Build install uninst=1" and nothing has > > changed, then nothing gets unlinked. > > > > I don't know if this is correct, but that's the deal ;) > > Yeah, but in my case that's what was happening, and it still didn't > unlink 'em. Are you really sure? On my system, I copied /usr/local/share/perl/5.8.0/Module/Build/Base.pm to /usr/share/perl/5.8.0/Module/Build/Base.pm If I then changed Base.pm and did "./Build install uninst=1" it worked fine. -dave /*======================= House Absolute Consulting www.houseabsolute.com =======================*/ |
|
From: Ken W. <ke...@ma...> - 2003-02-10 02:53:21
|
On Sunday, February 9, 2003, at 10:46 AM, Dave Rolsky wrote: > On Sun, 9 Feb 2003, Ken Williams wrote: > >>> It'll only unlink a shadowing file _if and only if_ it is installing >>> a >>> new >>> file. So if you just run "./Build install uninst=1" and nothing has >>> changed, then nothing gets unlinked. >>> >>> I don't know if this is correct, but that's the deal ;) >> >> Yeah, but in my case that's what was happening, and it still didn't >> unlink 'em. > > Are you really sure? On my system, I copied > /usr/local/share/perl/5.8.0/Module/Build/Base.pm to > /usr/share/perl/5.8.0/Module/Build/Base.pm > > If I then changed Base.pm and did "./Build install uninst=1" it worked > fine. Well, it looks like my ExtUtils::Install is broken. I just did the same thing under MakeMaker and it didn't work there either. I've got version 1.31 of EU::I installed, which is the same as what's in the EU::MM CVS repository right now. -Ken |
|
From: Dave R. <au...@ur...> - 2003-02-10 04:50:01
|
On Sun, 9 Feb 2003, Ken Williams wrote: > > Are you really sure? On my system, I copied > > /usr/local/share/perl/5.8.0/Module/Build/Base.pm to > > /usr/share/perl/5.8.0/Module/Build/Base.pm > > > > If I then changed Base.pm and did "./Build install uninst=1" it worked > > fine. > > > Well, it looks like my ExtUtils::Install is broken. I just did the > same thing under MakeMaker and it didn't work there either. I've got > version 1.31 of EU::I installed, which is the same as what's in the > EU::MM CVS repository right now. I have 1.30. That may explain it. -dave /*======================= House Absolute Consulting www.houseabsolute.com =======================*/ |
|
From: Ken W. <ke...@ma...> - 2003-02-10 05:19:23
|
On Sunday, February 9, 2003, at 08:48 PM, Dave Rolsky wrote: > On Sun, 9 Feb 2003, Ken Williams wrote: > >>> Are you really sure? On my system, I copied >>> /usr/local/share/perl/5.8.0/Module/Build/Base.pm to >>> /usr/share/perl/5.8.0/Module/Build/Base.pm >>> >>> If I then changed Base.pm and did "./Build install uninst=1" it >>> worked >>> fine. >> >> >> Well, it looks like my ExtUtils::Install is broken. I just did the >> same thing under MakeMaker and it didn't work there either. I've got >> version 1.31 of EU::I installed, which is the same as what's in the >> EU::MM CVS repository right now. > > I have 1.30. That may explain it. Either that, or it's allergic to me. On a different machine with EU::I 1.28, I get sporadic behavior. Note the 'ls' at the end of this indicating at least one shadow file that should have been removed, but only a couple of shadows were actually removed. ======================================================================== == [www:~/src/AI-Categorizer] ken> perl Build.PL config='sitearch=/home/ken/lib/i386-linux' .... build and test ... [www:~/src/AI-Categorizer] ken> Build install uninst=1 Useless use of a variable in void context at /usr/lib/perl5/5.6.1/ExtUtils/Install.pm line 267. Warning: You do not have permissions to install into /usr/lib/perl5/site_perl/5.6.1 at /usr/lib/perl5/5.6.1/ExtUtils/Install.pm line 85. Installing /home/ken/lib/i386-linux/auto/AI/Categorizer/FeatureVector/FastDot/ FastDot.bs Installing /home/ken/lib/i386-linux/auto/AI/Categorizer/FeatureVector/FastDot/ FastDot.so Files found in blib/arch: installing files in blib/lib into architecture dependent library tree Installing /home/ken/lib/i386-linux/AI/Categorizer.pm Installing /home/ken/lib/i386-linux/AI/Categorizer/Category.pm Installing /home/ken/lib/i386-linux/AI/Categorizer/Collection.pm Installing /home/ken/lib/i386-linux/AI/Categorizer/Document.pm Installing /home/ken/lib/i386-linux/AI/Categorizer/Experiment.pm Installing /home/ken/lib/i386-linux/AI/Categorizer/FeatureSelector.pm Installing /home/ken/lib/i386-linux/AI/Categorizer/FeatureVector.pm Unlinking /home/ken/lib/AI/Categorizer/FeatureVector.pm (shadowing?) Installing /home/ken/lib/i386-linux/AI/Categorizer/Hypothesis.pm Installing /home/ken/lib/i386-linux/AI/Categorizer/KnowledgeSet.pm Installing /home/ken/lib/i386-linux/AI/Categorizer/Learner.pm Installing /home/ken/lib/i386-linux/AI/Categorizer/ObjectSet.pm Installing /home/ken/lib/i386-linux/AI/Categorizer/Storable.pm Installing /home/ken/lib/i386-linux/AI/Categorizer/Util.pm Installing /home/ken/lib/i386-linux/AI/Categorizer/Collection/Files.pm Installing /home/ken/lib/i386-linux/AI/Categorizer/Collection/DBI.pm Installing /home/ken/lib/i386-linux/AI/Categorizer/Collection/DBI2.pm Installing /home/ken/lib/i386-linux/AI/Categorizer/Collection/InMemory.pm Installing /home/ken/lib/i386-linux/AI/Categorizer/Collection/SingleFile.pm Installing /home/ken/lib/i386-linux/AI/Categorizer/Document/SMART.pm Installing /home/ken/lib/i386-linux/AI/Categorizer/Document/ScoredFeatures.pm Installing /home/ken/lib/i386-linux/AI/Categorizer/Document/Text.pm Installing /home/ken/lib/i386-linux/AI/Categorizer/Document/XML.pm Installing /home/ken/lib/i386-linux/AI/Categorizer/FeatureSelector/DocFrequency.pm Installing /home/ken/lib/i386-linux/AI/Categorizer/FeatureVector/FastDot.pm Installing /home/ken/lib/i386-linux/AI/Categorizer/Learner/Boolean.pm Unlinking /home/ken/lib/AI/Categorizer/Learner/Boolean.pm (shadowing?) Installing /home/ken/lib/i386-linux/AI/Categorizer/Learner/DecisionTree.pm Installing /home/ken/lib/i386-linux/AI/Categorizer/Learner/Guesser.pm Installing /home/ken/lib/i386-linux/AI/Categorizer/Learner/KNN.pm Unlinking /home/ken/lib/AI/Categorizer/Learner/KNN.pm (shadowing?) Installing /home/ken/lib/i386-linux/AI/Categorizer/Learner/NNetTC.pm Installing /home/ken/lib/i386-linux/AI/Categorizer/Learner/NaiveBayes.pm Installing /home/ken/lib/i386-linux/AI/Categorizer/Learner/Rocchio.pm Installing /home/ken/lib/i386-linux/AI/Categorizer/Learner/SVM.pm Installing /home/ken/lib/i386-linux/AI/Categorizer/Learner/Weka.pm [www:~/src/AI-Categorizer] ken> ls ~/lib/AI Categorizer/ Categorizer.pm [www:~/src/AI-Categorizer] ken> perl -MExtUtils::Install -le 'print $ExtUtils::Install::VERSION' 1.28 ======================================================================== == -Ken |
|
From: Ken W. <ke...@ma...> - 2003-02-17 18:01:54
|
On Sunday, February 9, 2003, at 11:19 PM, Ken Williams wrote: > > On Sunday, February 9, 2003, at 08:48 PM, Dave Rolsky wrote: > >> On Sun, 9 Feb 2003, Ken Williams wrote: >> >>>> Are you really sure? On my system, I copied >>>> /usr/local/share/perl/5.8.0/Module/Build/Base.pm to >>>> /usr/share/perl/5.8.0/Module/Build/Base.pm >>>> >>>> If I then changed Base.pm and did "./Build install uninst=1" it >>>> worked >>>> fine. >>> >>> >>> Well, it looks like my ExtUtils::Install is broken. I just did the >>> same thing under MakeMaker and it didn't work there either. I've got >>> version 1.31 of EU::I installed, which is the same as what's in the >>> EU::MM CVS repository right now. >> >> I have 1.30. That may explain it. > > Either that, or it's allergic to me. On a different machine with > EU::I 1.28, I get sporadic behavior. Note the 'ls' at the end of this > indicating at least one shadow file that should have been removed, but > only a couple of shadows were actually removed. I figured out what was happening. ExtUtils::Install only tells you about the shadow files that are actually *different*, so it can still leave a lot of duplicate files around on your system if you install first in one place and then in another. -Ken |