Package: debaux
Version: 0.1.10-1
Severity: normal
Tags: patch

The '--cpan' option of debaux-build does not work on Lenny:

men...@vger:~$ debaux-build --cpan File::Next
CPAN: Storable loaded ok (v2.18)
Going to read /home/mendel/.cpan/Metadata
  Database was generated on Fri, 16 Jan 2009 23:26:53 GMT
  Can't call method "cpan_file" without a package or object reference at 
/usr/bin/debaux-build line 205.
men...@vger:~$ 

It seems that the interface of CPAN.pm has changed: debaux-build calls
CPAN::expand(), but the documentation of the version of CPAN in Lenny (1.9205)
requires to use CPAN::Shell->expand(), and calling CPAN::expand() fails (it
just returns 1, but not the objects):

men...@vger:~$ perl -MCPAN -MData::Dumper -we 'print 
Dumper(CPAN::expand("Module", "File::Next"));'
CPAN: Storable loaded ok (v2.18)
Going to read /home/mendel/.cpan/Metadata
  Database was generated on Fri, 16 Jan 2009 23:26:53 GMT
$VAR1 = 1;
men...@vger:~$ perl -MCPAN -MData::Dumper -we 'print 
Dumper(CPAN::Shell->expand("Module", "File::Next"));'
CPAN: Storable loaded ok (v2.18)
Going to read /home/mendel/.cpan/Metadata
  Database was generated on Fri, 16 Jan 2009 23:26:53 GMT
$VAR1 = bless( {
                 'ID' => 'File::Next',
                 'RO' => {
                           'CPAN_FILE' => 
'P/PE/PETDANCE/File-Next-1.02.tar.gz',                           'CPAN_USERID' 
=> 'PETDANCE',
                           'CPAN_VERSION' => '1.02'
                         }
               }, 'CPAN::Module' );
men...@vger:~$

See the attached patch that fixes this bug.

norbi

-- System Information:
Debian Release: 5.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.18 (PREEMPT)
Locale: LANG=C, LC_CTYPE=hu_HU (charmap=ISO-8859-2)
Shell: /bin/sh linked to /bin/bash

Versions of packages debaux depends on:
ii  dpkg-dev                      1.14.25    Debian package development tools
ii  libappconfig-perl             1.56-2     Perl module for configuration file
ii  libnet-ssh-perl               0.09-1     Perl extension for secure shell
ii  libtimedate-perl              1.1600-9   Time and date functions for Perl
ii  libwww-perl                   5.813-1    WWW client/server library for Perl
ii  perl                          5.10.0-19  Larry Wall's Practical Extraction 
ii  rsync                         3.0.3-2    fast remote file copy program (lik

debaux recommends no packages.

Versions of packages debaux suggests:
ii  dh-make                       0.46       tool that converts source archives

-- no debconf information
diff -Naur debaux-0.1.10/scripts/debaux-build debaux-0.1.10-fixed/scripts/debaux-build
--- debaux-0.1.10/scripts/debaux-build	2007-07-15 14:06:57.000000000 +0200
+++ debaux-0.1.10-fixed/scripts/debaux-build	2009-04-06 02:27:21.000000000 +0200
@@ -192,7 +192,7 @@
 	$CPAN::Config->{keep_source} = 1;
 	
 	# check CPAN 
-	my @objs = CPAN::expand ('Module', $debiandir);
+	my @objs = CPAN::Shell->expand ('Module', $debiandir);
 	unless (@objs) {
 		die "$0: No hit on CPAN for $debiandir\n";
 	}
@@ -210,7 +210,7 @@
 	}
 	
 	# download archive
-	CPAN::get ($debiandir);
+	CPAN::Shell->get ($debiandir);
 	my $cpansourcedir = $CPAN::Config->{keep_source_where};
 
 	# set parameters

Reply via email to