[buildd-tools-devel] Bug#571565: AptitudeBuildDepSatisfier: gracefully handle the case when default negative dep is not available
Modestas Vainius
modestas at vainius.eu
Fri Feb 26 01:35:28 UTC 2010
Package: libsbuild-perl
Version: 0.60.0-1
Severity: normal
File: /usr/share/perl5/Sbuild/AptitudeBuildDepSatisfier.pm
Tags: patch
Hello,
AptitudeBuildDepSatisfier does not gracefully handle the case when default
negative dep is not available (e.g. package has versioned Breaks on a package
that is actually a virtual package in the archive). A very simple patch for
this problem is below:
>From 1552240163a4fce19a98b4e189511c136107345e Mon Sep 17 00:00:00 2001
From: Modestas Vainius <modax at debian.org>
Date: Fri, 26 Feb 2010 03:05:12 +0200
Subject: [PATCH] AptitudeBuildDepSatisfier: gracefully handle the case when default negative dep is not available
If default version of the negative dependency is not available, just do not check
non-default versions. Current code had undefined behaviour because this
condition resulted into perl undefined value errors like:
Complete deps: libc6 (>= 2.3), libgcc1 (>= 1:4.1.1), libstdc++6 (>= 4.1.1)
Use of uninitialized value $v1 in string eq at /usr/share/perl5/Sbuild.pm line 104.
Use of uninitialized value $vers in pattern match (m//) at /usr/share/perl5/Sbuild.pm line 202.
Use of uninitialized value $vers in pattern match (m//) at /usr/share/perl5/Sbuild.pm line 207.
Use of uninitialized value $default_version in concatenation (.) or string at /usr/share/perl5/Sbuild/AptitudeBuildDepSatisfier.pm line 284.
Can't use libplasma-dev (<< 4:4.1.96), but default version is
... couldn't find pkg to satisfy !libplasma-dev (<< 4:4.1.96)
libplasma-dev is a virtual package while a package declared a negative
versioned dependency against it.
diff --git a/lib/Sbuild/AptitudeBuildDepSatisfier.pm b/lib/Sbuild/AptitudeBuildDepSatisfier.pm
index eb23725..eb3cfa0 100644
--- a/lib/Sbuild/AptitudeBuildDepSatisfier.pm
+++ b/lib/Sbuild/AptitudeBuildDepSatisfier.pm
@@ -280,7 +280,7 @@ sub get_non_default_deps {
#Check if the package default version is not high enough:
} elsif (defined($rel) && $rel &&
( (!$neg && !version_compare($default_version, $rel, $requested_version))
- ||( $neg && version_compare($default_version, $rel, $requested_version)))) {
+ ||( $neg && defined $default_version && version_compare($default_version, $rel, $requested_version)))) {
if (!$neg) {
$builder->log("Need $name ($rel $requested_version), but default version is $default_version\n");
} else {
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (101, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.32-2-amd64 (SMP w/1 CPU core)
Locale: LANG=lt_LT.UTF-8, LC_CTYPE=lt_LT.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages libsbuild-perl depends on:
ii adduser 3.112 add and remove users and groups
ii apt 0.7.25.3 Advanced front-end for dpkg
ii dctrl-tools 2.14 Command-line tools to process Debi
ii devscripts 2.10.61 scripts to make the life of a Debi
ii dpkg-dev 1.15.5.6 Debian package development tools
ii exim4 4.71-3 metapackage to ease Exim MTA (v4)
ii exim4-daemon-light [mail-tran 4.71-3 lightweight Exim MTA (v4) daemon
ii libfilesys-df-perl 0.92-3+b1 Module to obtain filesystem disk s
ii perl 5.10.1-11 Larry Wall's Practical Extraction
ii perl-modules 5.10.1-11 Core Perl modules
ii schroot 1.4.1-2 Execute commands in a chroot envir
libsbuild-perl recommends no packages.
libsbuild-perl suggests no packages.
-- no debconf information
More information about the Buildd-tools-devel
mailing list