Debian Bug report logs - #533707
CPANP not acting consistently with CPAN

version graph

Package: perl; Maintainer for perl is Niko Tyni <ntyni@debian.org>; Source for perl is src:perl.

Reported by: Evan Carroll <me@evancarroll.com>

Date: Fri, 19 Jun 2009 22:06:01 UTC

Severity: serious

Tags: confirmed

Found in version perl/5.10.0-19

Fixed in version perl/5.10.0-24

Done: Niko Tyni <ntyni@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Brendan O'Dea <bod@debian.org>:
Bug#533707; Package perl. (Fri, 19 Jun 2009 22:06:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Evan Carroll <me@evancarroll.com>:
New Bug report received and forwarded. Copy sent to Brendan O'Dea <bod@debian.org>. (Fri, 19 Jun 2009 22:06:03 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Evan Carroll <me@evancarroll.com>
To: submit@bugs.debian.org
Subject: CPANP not acting consistently with CPAN
Date: Fri, 19 Jun 2009 16:34:53 -0500
Severity: serious
Tags: confirmed
Package: perl

In an attempt to solve other bugs with Debian playing well with CPAN,
I've come across a new one. It appears as if CPANPLUS is not
configured to behave like CPAN.pm.

In /etc/perl/CPAN/Config.pm you'll find
'makepl_arg' => q[INSTALLDIRS=site],
(might also want mbuildpl_arg)

There is nothing like this for CPANP in the Debian configuration.
Assuming that you're using a version that can be updated, you can test
this and see the problems with it by updating Archive::Extract.

For me CPAN installs to
 /usr/local/share/perl/5.10.0/
While Debian installs to
 /usr/share/perl/5.10.0/

Notice, Debian doesn't install to local and shouldn't, and cpan only
installs to local as it should. Unfortunately, CPANP isn't configured
properly.

Confirm a number lower than 0.32 which is the current.
$ perl -MArchive::Extract\ 999
My version returns "Archive::Extract version 999 required--this is
only version 0.24 ."

$ sudo cpan Archive::Extract
$ perl -MArchive::Extract\ 999
Confirm a number higher than your previous

Now lets make sure the file exists where it should, you'll see CPAN
installed the update to /usr/local/share/perl
$ ls -la /usr/local/share/perl/5.10.0/Archive/Extract.pm
-r--r--r-- 1 root root 46860 2009-06-12 08:22
/usr/local/share/perl/5.10.0/Archive/Extract.pm

Now, lets delete that
rm -rf /usr/local/share/perl/5.10.0/Archive/

$ perl -MArchive::Extract\ 999
This should return the same number it did when we started.

Now lets install this module with CPANPLUS
$ sudo cpanp install Archive::Extract

Make sure it is update
$ perl -MArchive::Extract\ 999
You should have a version higher than when you started, just like
after you ran CPAN

$ sudo updatedb && locate Archive/Extract.pm | grep -vi cpan
/usr/share/perl/5.10.0/Archive/Extract.pm
Notice only one file (in the same location as the one you had before
you started this scenario that came with the package "perl-modules")

$ grep '$VERSION' /usr/share/perl/5.10.0/Archive/Extract.pm
use vars qw[$VERSION $PREFER_BIN $PROGRAMS $WARN $DEBUG
$VERSION            = '0.32';
Notice that one file has the newest version number

As you can see, there is only one installed version of the file when
you use CPANPLUS, there are two when you use CPAN. This is because
CPANPLUS is clobbering the file tracked by dpkg, which is because it
isn't configured properly. This is further evidenced  by the version
numbers in  /usr/share/perl/5.10.0/Archive/Extract.pm.

--
Evan Carroll
System Lord of the Internets




Information forwarded to debian-bugs-dist@lists.debian.org, Brendan O'Dea <bod@debian.org>:
Bug#533707; Package perl. (Sun, 05 Jul 2009 21:30:08 GMT) Full text and rfc822 format available.

Acknowledgement sent to Niko Tyni <ntyni@debian.org>:
Extra info received and forwarded to list. Copy sent to Brendan O'Dea <bod@debian.org>. (Sun, 05 Jul 2009 21:30:08 GMT) Full text and rfc822 format available.

Message #10 received at 533707@bugs.debian.org (full text, mbox):

From: Niko Tyni <ntyni@debian.org>
To: Evan Carroll <me@evancarroll.com>, 533707@bugs.debian.org
Subject: Re: Bug#533707: CPANP not acting consistently with CPAN
Date: Mon, 6 Jul 2009 00:25:40 +0300
found 533707 5.10.0-19
thanks

On Fri, Jun 19, 2009 at 04:34:53PM -0500, Evan Carroll wrote:
> Severity: serious
> Tags: confirmed
> Package: perl
> 
> In an attempt to solve other bugs with Debian playing well with CPAN,
> I've come across a new one. It appears as if CPANPLUS is not
> configured to behave like CPAN.pm.

Thanks for the report and sorry for the delay. I just got back from vacation.

Please leave the 'confirmed' tag to the maintainer in the future, see
 http://www.debian.org/Bugs/Developer#tags

> In /etc/perl/CPAN/Config.pm you'll find
> 'makepl_arg' => q[INSTALLDIRS=site],

Yes, this originally comes from a Debian patch to CPAN::FirstTime.

 http://patch-tracking.debian.net/patch/series/view/perl/5.10.0-23/debian/cpan_definstalldirs.diff

> (might also want mbuildpl_arg)

Right. I see CPAN now prefers Build.PL over Makefile.PL by default via the
'prefer_installer' option. Running for instance 'cpan Cwd' thus has the
same problem as cpanp: it tries to write in /usr instead of /usr/local
because PathTools specifies "installdirs => 'core'".

> There is nothing like this for CPANP in the Debian configuration.
> Assuming that you're using a version that can be updated, you can test
> this and see the problems with it by updating Archive::Extract.

It looks like the analogous fix to the CPAN one would be to change the
default 'buildflags' and 'makemakerflags' in lib/CPANPLUS/Config.pm.
I'm not quite sure if the file should go in /etc/perl too, will have to
think about that.


A complication with the CPAN mbuildpl_arg issue is that we're only
changing the default for the first time configuration, and if the user
has already run 'cpan', it's too late because the old bad default is
now in /etc/perl/CPAN/Config.pm (or ~/.cpan/CPAN/MyConfig.pm .)

Given that this affects only a subset of core modules, I suppose we
shouldn't worry overmuch. An entry in NEWS.Debian is the best thing
I can think of, and even that might be considered too annoying by the
overwhelming majority of the users that are never going to reinstall a
core module that has a Build.PL.

The CPANPLUS settings aren't saved automatically AFAICS (one needs to do
an explicit 's save' in the cpanp shell) so the configuration persistence
is less of a problem in that case.

I'll try to get a fix in sid this week.
-- 
Niko Tyni   ntyni@debian.org




Bug marked as found in version 5.10.0-19. Request was from Niko Tyni <ntyni@debian.org> to control@bugs.debian.org. (Sun, 05 Jul 2009 21:30:09 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Brendan O'Dea <bod@debian.org>:
Bug#533707; Package perl. (Sun, 05 Jul 2009 22:06:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Evan Carroll <me@evancarroll.com>:
Extra info received and forwarded to list. Copy sent to Brendan O'Dea <bod@debian.org>. (Sun, 05 Jul 2009 22:06:02 GMT) Full text and rfc822 format available.

Message #17 received at 533707@bugs.debian.org (full text, mbox):

From: Evan Carroll <me@evancarroll.com>
To: Niko Tyni <ntyni@debian.org>
Cc: 533707@bugs.debian.org
Subject: Re: Bug#533707: CPANP not acting consistently with CPAN
Date: Sun, 5 Jul 2009 17:04:23 -0500
> Given that this affects only a subset of core modules, I suppose we
> shouldn't worry overmuch. An entry in NEWS.Debian is the best thing
> I can think of, and even that might be considered too annoying by the
> overwhelming majority of the users that are never going to reinstall a
> core module that has a Build.PL.

AFAIK, it doens't just affect core modules with a Build.PL. See my bug
report on launchpad.
https://bugs.launchpad.net/ubuntu/+source/libio-compress-zlib-perl/+bug/394481

The module in question does not have a Build.PL
http://search.cpan.org/~pmqs/Compress-Raw-Zlib-2.020/MANIFEST

-- 
Evan Carroll
System Lord of the Internets




Information forwarded to debian-bugs-dist@lists.debian.org, Brendan O'Dea <bod@debian.org>:
Bug#533707; Package perl. (Wed, 08 Jul 2009 15:45:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Niko Tyni <ntyni@debian.org>:
Extra info received and forwarded to list. Copy sent to Brendan O'Dea <bod@debian.org>. (Wed, 08 Jul 2009 15:45:03 GMT) Full text and rfc822 format available.

Message #22 received at 533707@bugs.debian.org (full text, mbox):

From: Niko Tyni <ntyni@debian.org>
To: Jos Boumans <kane@cpan.org>
Cc: 533707@bugs.debian.org
Subject: Debian changes to CPANPLUS
Date: Wed, 8 Jul 2009 18:33:25 +0300
[Message part 1 (text/plain, inline)]
Hi Jos,

I'm a maintainer of the Perl package in Debian.

We currently ship CPANPLUS 0.84 as bundled with Perl 5.10.0, and I'm
about to apply the attached Debian-specific patches due to
 http://bugs.debian.org/533707 (cc'd as 533707@bugs.debian.org)

This mail is mainly FYI, but please let me know if you think this should
be handled in a different way.

The first patch is just a preconfigured CPANPLUS::Config::System module
that tells CPANPLUS to install all modules, including core ones, in the
site directories, even if their Makefile.PL or Build.PL says otherwise,
so that they will not clobber the ones tracked by our package manager.
Our @INC ordering will make sure that the local version in the site
directory will be the first on the search path.

(We've done this for ages with CPAN.pm and Makefile.PL, and I'm presently
 adding Build.PL support to that as well.)

An alternative solution would be to modify the empty defaults in
CPANPLUS::Config, but this one seems cleaner to me.

The other patch is about where the saved CPANPLUS::Config::System
should go. Our policy says that configuration files need to be in /etc,
and we have /etc/perl first on @INC for things like this.

The patch is something of a hack, I'm not thrilled about messing inside
the CPANPLUS::Internals namespace. Would you be willing to implement a
cleaner hook for this?

Many thanks for all your work on CPANPLUS and other Perl stuff,
-- 
Niko Tyni   ntyni@debian.org
[cpanplus_definstalldirs.diff (text/x-diff, attachment)]
[cpanplus_config_path.diff (text/x-diff, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Brendan O'Dea <bod@debian.org>:
Bug#533707; Package perl. (Wed, 08 Jul 2009 15:57:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Jos I. Boumans" <kane@cpan.org>:
Extra info received and forwarded to list. Copy sent to Brendan O'Dea <bod@debian.org>. (Wed, 08 Jul 2009 15:57:02 GMT) Full text and rfc822 format available.

Message #27 received at 533707@bugs.debian.org (full text, mbox):

From: "Jos I. Boumans" <kane@cpan.org>
To: Niko Tyni <ntyni@debian.org>
Cc: 533707@bugs.debian.org
Subject: Re: Debian changes to CPANPLUS
Date: Wed, 8 Jul 2009 17:55:24 +0000
Hi Niko,

On 8 Jul 2009, at 15:33, Niko Tyni wrote:

> The first patch is just a preconfigured CPANPLUS::Config::System  
> module
> that tells CPANPLUS to install all modules, including core ones, in  
> the
> site directories, even if their Makefile.PL or Build.PL says  
> otherwise,
> so that they will not clobber the ones tracked by our package manager.
> Our @INC ordering will make sure that the local version in the site
> directory will be the first on the search path.
>
> (We've done this for ages with CPAN.pm and Makefile.PL, and I'm  
> presently
> adding Build.PL support to that as well.)
>
> An alternative solution would be to modify the empty defaults in
> CPANPLUS::Config, but this one seems cleaner to me.

No, this The Right Way(tm); ::System was designed for letting vendors/
packagers define defaults that apply to all users on the system.

> The other patch is about where the saved CPANPLUS::Config::System
> should go. Our policy says that configuration files need to be in / 
> etc,
> and we have /etc/perl first on @INC for things like this.
>
> The patch is something of a hack, I'm not thrilled about messing  
> inside
> the CPANPLUS::Internals namespace. Would you be willing to implement a
> cleaner hook for this?

I would, but I'm not coming up with a clean way off the bat; the main  
problem
is the Catch22 situation. Everything in CPANPLUS makes conditional  
decisions
based on it's configuration settings, but this is not one of them.

I'll give it some thought; in the meantime, the 'hack' is probably  
good enough.

If you have any other questions, feel free to ask.

Cheers,

--

	Jos Boumans

	"Whenever you find you are on the side of the majority,
	it is time to pause and reflect." - Mark Twain







Reply sent to Niko Tyni <ntyni@debian.org>:
You have taken responsibility. (Thu, 09 Jul 2009 08:48:19 GMT) Full text and rfc822 format available.

Notification sent to Evan Carroll <me@evancarroll.com>:
Bug acknowledged by developer. (Thu, 09 Jul 2009 08:48:19 GMT) Full text and rfc822 format available.

Message #32 received at 533707-close@bugs.debian.org (full text, mbox):

From: Niko Tyni <ntyni@debian.org>
To: 533707-close@bugs.debian.org
Subject: Bug#533707: fixed in perl 5.10.0-24
Date: Thu, 09 Jul 2009 07:55:59 +0000
Source: perl
Source-Version: 5.10.0-24

We believe that the bug you reported is fixed in the latest version of
perl, which is due to be installed in the Debian FTP archive:

libcgi-fast-perl_5.10.0-24_all.deb
  to pool/main/p/perl/libcgi-fast-perl_5.10.0-24_all.deb
perl-doc_5.10.0-24_all.deb
  to pool/main/p/perl/perl-doc_5.10.0-24_all.deb
perl-modules_5.10.0-24_all.deb
  to pool/main/p/perl/perl-modules_5.10.0-24_all.deb
perl_5.10.0-24.diff.gz
  to pool/main/p/perl/perl_5.10.0-24.diff.gz
perl_5.10.0-24.dsc
  to pool/main/p/perl/perl_5.10.0-24.dsc



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 533707@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Niko Tyni <ntyni@debian.org> (supplier of updated perl package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Wed, 08 Jul 2009 23:21:31 +0300
Source: perl
Binary: perl-base libcgi-fast-perl perl-doc perl-modules perl-debug perl-suid libperl5.10 libperl-dev perl
Architecture: all source 
Version: 5.10.0-24
Distribution: unstable
Urgency: low
Maintainer: Brendan O'Dea <bod@debian.org>
Changed-By: Niko Tyni <ntyni@debian.org>
Closes: 528332 533098 533707
Description:
 libcgi-fast-perl - CGI::Fast Perl module
 libperl5.10 - Shared Perl library
 libperl-dev - Perl library: development files
 perl-base  - minimal Perl system
 perl-debug - Debug-enabled Perl interpreter
 perl-doc   - Perl documentation
 perl       - Larry Wall's Practical Extraction and Report Language
 perl-modules - Core Perl modules
 perl-suid  - Runs setuid Perl scripts
Changes:
 perl (5.10.0-24) unstable; urgency=low
 .
   * Change the perl-debug package section and priority to debug/extra.
   * POD fix for Module::Build::Cookbook.
   * Fix a memory leak with the map operator. (Closes: #528332)
   * Add gcc predefined macros to $Config{cppsymbols} on GNU/kFreeBSD.
     (Closes: #533098)
   * Fix CPAN and CPANPLUS configuration to consistently use the
     site directories with both Build.PL and Makefile.PL. (Closes: #533707)
   * Save local versions of CPANPLUS::Config::System into /etc/perl.
     (See #533707)
Checksums-Sha1: 
 1f909d684e66a515a47d5df515f520a8d1fb40c4 1340 perl_5.10.0-24.dsc
 5557dcabb83d1a35b8fb26e3b812401770afacca 48694 libcgi-fast-perl_5.10.0-24_all.deb
 75cd97468c3d3760f28886e9ec857837c838cddb 172461 perl_5.10.0-24.diff.gz
 9f1dfca7f3d5953ba39e66293a344594183a151a 8220814 perl-doc_5.10.0-24_all.deb
 ad9268328a81f3d1d568c3ce97949fb5886531b3 3198642 perl-modules_5.10.0-24_all.deb
Checksums-Sha256: 
 0ed4f880b05c40b50cf71daac21efbce2fe14f81fd0d0d0cea13b93dd64590e7 8220814 perl-doc_5.10.0-24_all.deb
 545e56170981fedfe9d527b9c5c626a5de1653dee0258192d058ef03da29b964 172461 perl_5.10.0-24.diff.gz
 7fd27b99fee6ccfb36c60caad6ee297cedc68f6fa7bcd593b86ee31a51f54b62 1340 perl_5.10.0-24.dsc
 8a4c2baa037ad3292cebeb6766981d2f3d2fd9b6f94c6877ecf6abca2b38595e 3198642 perl-modules_5.10.0-24_all.deb
 e87162c48415acce3f85e212fc1d211ed1e18c5e53a468667b430d108ab729bc 48694 libcgi-fast-perl_5.10.0-24_all.deb
Files: 
 9bf9781e62bf7bb1312079ee93716d87 3198642 perl standard perl-modules_5.10.0-24_all.deb
 c86bbe0a23028b49e48883a5399c98bc 8220814 doc optional perl-doc_5.10.0-24_all.deb
 d24a52c4e5f138da7455c9daed0d5be3 48694 perl optional libcgi-fast-perl_5.10.0-24_all.deb
 d73aa6a719d2d79ec803702fec37e613 172461 perl standard perl_5.10.0-24.diff.gz
 fa9a90564f2d6de2e78c8d3156a70e5f 1340 perl standard perl_5.10.0-24.dsc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkpVFo4ACgkQiyizGWoHLTnISACeOmaKcq0x/p+7NEI0hGLkIHbd
OXQAnRBHtaGJVcZdVUXPhvKgaOjfRHmO
=aHTZ
-----END PGP SIGNATURE-----





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Mon, 07 Mar 2011 07:47:31 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Apr 20 11:16:21 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.