[Buildd-tools-devel] Bug#456934: sbuild: Wrong handling of or'ed build-dependencies

Jan-Marek Glogowski glogow at fbihome.de
Tue Dec 18 15:59:24 UTC 2007


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

Subject: sbuild: Wrong handling of or'ed build-dependencies
Package: sbuild
Version: 0.56
Severity: important
Tags: patch

Actually I'm using the SVN trunk r1250.

I'm trying to build bzr-svn for Debian Etch.

The package has the following build dependencies:

Build-Depends-Indep: python-subversion, bzr (>= 1.0~), python (>= 2.5) | python-pysqlite2

The following text is the relevant output from running
sbuild -A -s -D -d halut bzr-svn_0.4.5-1lhm1.dsc

==============================

...
Source dependencies of bzr-svn: python-central (>= 0.5), cdbs (>= 0.4.43),
python, debhelper (>= 5.0.37.2), python-subversion, bzr (>= 1.0~), python (>= 2.5)|python-pysqlite2
Filtering dependencies
Requesting dpkg status for packages: python-subversion python cdbs bzr
python-pysqlite2 python-central debhelper
...
python: pos dep, not installed
python: missing
/usr/bin/schroot -d '/build/buildd' -c halut --run-session -q -u root -p
- -- /bin/sh -c '/usr/bin/apt-get  --purge -o
DPkg::Options::=--force-confold -q -s install python-central cdbs python
debhelper python-subversion bzr=1.0-1lhm1 python 2>&1 </dev/null'
Default version of python not sufficient, no suitable version found.
Skipping for now, maybe there are alternatives.
python-pysqlite2: pos dep, not installed
python-pysqlite2: missing
using python for install
...
After installing, the following source dependencies are still
unsatisfied:
python(inst 2.4.4-2 ! >= wanted 2.5)|python-pysqlite2(missing)
...

==============================

The attached patch fixes this problem for me and additionally adds some
checks to to sbuild for wrong commandline args.

Jan-Marek


- -- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-5-amd64
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)

Versions of packages sbuild depends on:
ii  adduser                     3.102        Add and remove users and groups
ii  apt                         0.6.46.4-0.1 Advanced front-end for dpkg
ii  dctrl-tools                 2.9.3        Command-line tools to process Debi
ii  dpkg-dev                    1.13.25      package building tools for Debian
ii  exim4                       4.63-17      metapackage to ease exim MTA (v4)
ii  exim4-daemon-light [mail-tr 4.63-17      lightweight exim MTA (v4) daemon
ii  perl                        5.8.8-7etch1 Larry Wall's Practical Extraction
ii  perl-modules                5.8.8-7etch1 Core Perl modules
ii  schroot                     1.1.6-1lhm1  Execute commands in a chroot envir

Versions of packages sbuild recommends:
ii  debootstrap                 0.3.3.2etch1 Bootstrap a basic Debian system
ii  fakeroot                    1.5.10       Gives a fake root environment

- -- no debconf information
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFHZ+5gj6MK58wZA3cRAlmeAJ9C0UltlZV88OrTi3PHJwyKSNXX6gCfcLXD
H78LjnhSEAZmibADN17Ua0I=
=HiqA
-----END PGP SIGNATURE-----
-------------- next part --------------
Index: sbuild
===================================================================
--- sbuild	(Revision 1250)
+++ sbuild	(Arbeitskopie)
@@ -210,7 +210,19 @@
 	my $download = 1;
  	if ($dscbase =~ m/\.dsc$/) {
 		$download = 0;
+		if( ! -f $dscfile ) {
+			print PLOG "Invalid source: $dscfile\n";
+			print PLOG "Skipping $pkg\n";
+			$main::pkg_status = "skipped";
+			goto cleanup_close;
+		}
 	}
+	elsif( ! defined $version ) {
+		print PLOG "Invalid source: $dscfile\n";
+		print PLOG "Skipping $dscfile\n";
+		$main::pkg_status = "skipped";
+		goto cleanup_close;
+	}
 
 	print STDERR "D: dscfile = $dscfile\n" if $conf::debug;
 	print STDERR "D: dir = $dir\n" if $conf::debug;
@@ -1316,7 +1328,8 @@
 							}
 						}
 						if(!$installable) {
-							print PLOG "no suitable version found. Skipping for now, maybe there are alternatives.\n" if !$installable;
+							print PLOG "no suitable version found. Skipping for now, maybe there are alternatives.\n";
+							next;
 						}
 					} else {
 						print PLOG "Using default version " . $policy{$name}->{defversion} . "\n";


More information about the Buildd-tools-devel mailing list