Subject: | CPANPLUS sudo'ing pollutes |
When used with Module::AutoInstall to install a dependency (as a
non-root user), CPANPLUS prompted to sudo the installation step.
Unfortunately, it resulted in creating some files owned by root, that
later on in the script could not be cleaned up properly.
Whenever CPANPLUS changes over to root, it should ensure that it doesn't
pollute the build directory with root-owned files, so that the build
directory can be cleaned up automatically as normal.
Adam K
/usr/bin/perl "-Iinc" "-MExtUtils::Manifest=manicopy,maniread" \
-e "manicopy(maniread(),'Perl-MinimumVersion-0.13', 'best');"
mkdir Perl-MinimumVersion-0.13
mkdir Perl-MinimumVersion-0.13/inc
mkdir Perl-MinimumVersion-0.13/inc/Module
mkdir Perl-MinimumVersion-0.13/inc/Module/Install
mkdir Perl-MinimumVersion-0.13/bin
mkdir Perl-MinimumVersion-0.13/t
mkdir Perl-MinimumVersion-0.13/lib
mkdir Perl-MinimumVersion-0.13/lib/Perl
cd Perl-MinimumVersion-0.13 && /usr/bin/perl "-Iinc" Makefile.PL
*** Module::AutoInstall version 1.02
*** Checking for Perl dependencies...
[Core Features]
- Test::More ...loaded. (0.62 >= 0.47)
- File::Spec ...loaded. (3.16 >= 0.80)
- Carp ...loaded. (1.02)
- version ...missing. (would need 0.59)
- List::Util ...loaded. (1.180 >= 1.17)
- Params::Util ...loaded. (0.110 >= 0.06)
- File::Find::Rule ...loaded. (0.280)
- PPI ...loaded. (1.111 >= 1.109)
==> Auto-install the 1 mandatory module(s) from CPAN? [y] y
*** Dependencies will be installed the next time you type 'make'.
(You may need to do that as the 'root' user.)
*** Module::AutoInstall configuration finished.
Checking if your kit is complete...
Looks good
Warning: prerequisite version 0.59 not found. We have 0.500.
Writing Makefile for Perl::MinimumVersion
cd Perl-MinimumVersion-0.13 && /usr/bin/make LIB=""
LIBPERL_A="libperl.a" LINKTYPE="dynamic" PREFIX="/usr" OPTIMIZE=""
PASTHRU_DEFINE="" PASTHRU_INC=""
make[1]: Entering directory
`/tmp/cpan2/Perl-MinimumVersion/Perl-MinimumVersion-0.13'
/usr/bin/perl "-Iinc" Makefile.PL --config= --installdeps=version,0.59
*** Installing dependencies...
[MSG] Checking if source files are up to date
[MSG] Updating source file '01mailrc.txt.gz'
[MSG] Trying to get 'http://mirrors.kernel.org/cpan/authors/01mailrc.txt.gz'
[MSG] Updating source file '03modlist.data.gz'
[MSG] Trying to get
'http://mirrors.kernel.org/cpan/modules/03modlist.data.gz'
[MSG] Updating source file '02packages.details.txt.gz'
[MSG] Trying to get
'http://mirrors.kernel.org/cpan/modules/02packages.details.txt.gz'
[MSG] Rebuilding author tree, this might take a while
[MSG] Rebuilding module tree, this might take a while
*** Installing version...
[MSG] Trying to get
'http://mirrors.kernel.org/cpan/authors/id/J/JP/JPEACOCK/version-0.59.tar.gz'
[MSG] Trying to get
'http://mirrors.kernel.org/cpan/authors/id/J/JP/JPEACOCK/CHECKSUMS'
[MSG] Checksum matches for 'version-0.59.tar.gz'
[MSG] Extracted 'version-0.59/'
[MSG] Extracted 'version-0.59/t/'
[MSG] Extracted 'version-0.59/t/02derived.t'
[MSG] Extracted 'version-0.59/t/coretests.pm'
[MSG] Extracted 'version-0.59/t/01base.t'
[MSG] Extracted 'version-0.59/lib/'
[MSG] Extracted 'version-0.59/lib/version.pod'
[MSG] Extracted 'version-0.59/lib/version/'
[MSG] Extracted 'version-0.59/lib/version/typemap'
[MSG] Extracted 'version-0.59/lib/version.pm'
[MSG] Extracted 'version-0.59/vperl/'
[MSG] Extracted 'version-0.59/vperl/vpp.pm'
[MSG] Extracted 'version-0.59/vutil/'
[MSG] Extracted 'version-0.59/vutil/ppport.h'
[MSG] Extracted 'version-0.59/vutil/vxs.pm'
[MSG] Extracted 'version-0.59/vutil/vxs.xs'
[MSG] Extracted 'version-0.59/vutil/vutil.c'
[MSG] Extracted 'version-0.59/vutil/vutil.h'
[MSG] Extracted 'version-0.59/README'
[MSG] Extracted 'version-0.59/Changes'
[MSG] Extracted 'version-0.59/Build.PL'
[MSG] Extracted 'version-0.59/Makefile.PL'
[MSG] Extracted 'version-0.59/META.yml'
[MSG] Extracted 'version-0.59/MANIFEST'
[MSG] Extracted 'version' to '/home/adam/.cpanplus/5.8.4/build/version-0.59'
/usr/bin/perl -Iinc -I/usr/local/share/perl/5.8.4/ Build.PL --uninst 1
Creating custom builder _build/lib/version/Builder.pm in _build/lib/version
Checking whether your kit is complete...
Looks good
cc -I/usr/lib/perl/5.8/CORE -fPIC -c -D_REENTRANT -D_GNU_SOURCE
-DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing -I/usr/local/include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -o _build/compilet.o
_build/compilet.c
cc -shared -L/usr/local/lib -o _build/compilet.so _build/compilet.o
Checking whether your kit is complete...
Looks good
Creating new 'Build' script for 'version' version '0.59'
cc -I./vutil -I/usr/lib/perl/5.8/CORE -fPIC -c -D_REENTRANT
-D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -o
./vutil/vutil.o ./vutil/vutil.c
lib/version.pm -> blib/lib/version.pm
vutil/vxs.pm -> blib/lib/version/vxs.pm
vutil/vxs.xs -> lib/version/vxs.xs
lib/version/vxs.xs -> lib/version/vxs.c
cc -I./vutil -I/usr/lib/perl/5.8/CORE -fPIC -c -D_REENTRANT
-D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -o
lib/version/vxs.o lib/version/vxs.c
ExtUtils::Mkbootstrap::Mkbootstrap('lib/version/vxs')
cc -shared -L/usr/local/lib -o blib/arch/auto/version/vxs/vxs.so
lib/version/vxs.o ./vutil/vutil.o
lib/version.pod -> blib/lib/version.pod
Manifying blib/lib/version.pod -> blib/libdoc/version.3pm
t/01base.......ok
t/02derived....ok
All tests successful.
Files=2, Tests=217, 1 wallclock secs ( 0.36 cusr + 0.07 csys = 0.43 CPU)
Running [/usr/bin/sudo /usr/bin/perl
/home/adam/.cpanplus/5.8.4/build/version-0.59/Build install uninst=1]...
Password:
Skipping /usr/local/lib/perl/5.8.4/auto/version/vxs/vxs.bs (unchanged)
Installing /usr/local/lib/perl/5.8.4/auto/version/vxs/vxs.so
Files found in blib/arch: installing files in blib/lib into architecture
dependent library tree
Installing /usr/local/lib/perl/5.8.4/version.pm
Installing /usr/local/lib/perl/5.8.4/version.pod
Installing /usr/local/lib/perl/5.8.4/version/vxs.pm
Installing /usr/local/man/man3/version.3pm
Writing /usr/local/lib/perl/5.8.4/auto/version/vxs/.packlist
*** version successfully installed.
*** Module::AutoInstall installation finished.