[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#566744: Fails if apt-cross is not installed



Package: libdebian-dpkgcross-perl
Version: 2.5.5
Severity: normal
Tags: patch

Hi,

if apt-cross is not installed then it fails to parse the non-existant
config. Patch attached.

MfG
	Goswin

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (499, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.29.4-frosties-2 (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=de_DE (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash

Versions of packages libdebian-dpkgcross-perl depends on:
ii  dpkg-dev                      1.15.5.6   Debian package development tools
ii  file                          5.03-5     Determines file type using "magic"
ii  libconfig-auto-perl           0.20-2     Magical config file parser
ii  libfile-homedir-perl          0.86-1     Get the home directory for yoursel
ii  libfile-temp-perl             0.22-1     Perl module to create a temporary 
ii  perl                          5.10.1-9   Larry Wall's Practical Extraction 
ii  perl-modules [libfile-temp-pe 5.10.1-9   Core Perl modules

libdebian-dpkgcross-perl recommends no packages.

libdebian-dpkgcross-perl suggests no packages.

-- no debconf information
--- /usr/share/perl5/Debian/DpkgCross.pm	2010-01-17 16:42:57.000000000 +0100
+++ DpkgCross.pm	2010-01-24 23:32:41.000000000 +0100
@@ -572,16 +572,17 @@
 		}
 	}
 	# /var/lib/apt-cross/multiarch.list
-	$cfile = "/var/lib/apt-cross/multiarch.list"
-		if (-d "/var/lib/apt-cross/");
-	$config = Config::Auto::parse("$cfile", format =>  "list");
-	die "ERROR: Multiarch config file '$cfile' is not a simple list!\n"
-		if (ref($config) ne 'ARRAY');
-	foreach my $line (sort @$config)
-	{
-		chomp ($line);
-		next if ($line =~ /^#/);
-		$malist{$line}++;
+	if (-d "/var/lib/apt-cross/") {
+		$cfile = "/var/lib/apt-cross/multiarch.list";
+		$config = Config::Auto::parse("$cfile", format =>  "list");
+		die "ERROR: Multiarch config file '$cfile' is not a simple list!\n"
+			if (ref($config) ne 'ARRAY');
+		foreach my $line (sort @$config)
+		{
+			chomp ($line);
+			next if ($line =~ /^#/);
+			$malist{$line}++;
+		}
 	}
 	my @ret = sort keys (%malist);
 	return \@ret;

Reply to: