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

Roger Leigh rleigh at whinlatter.ukfsn.org
Tue Dec 18 22:40:56 UTC 2007


Jan-Marek Glogowski <glogow at fbihome.de> writes:

> 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.

Thanks.  I have altered the patch slightly to remove some of the
redundancy in the checks.  Is this OK?

Could you possibly explain what malformed syntax results in triggering
these checks?

Regarding the main fix, I can't replicate this with a stock etch
install.  Did you have any updated backports installed as well, such
as bzr?

BTW, the SVN is out of date.  We are now using git for all future
development:

  git clone git://git.debian.org/git/buildd-tools/sbuild.git


Thanks,
Roger


diff --git a/sbuild b/sbuild
index 9b6ca10..8cc2577 100755
--- a/sbuild
+++ b/sbuild
@@ -204,12 +204,19 @@ foreach $dscfile (@ARGV) {
 	my $pkgv = basename($dscfile);
 	$pkgv =~ s/\.dsc$//;
 	my ($pkg, $version) = split /_/, $pkgv;
+	my $invalid = 0;
 
 	# Download if package does not have a .dsc extension and no
 	# directory was specified.
 	my $download = 1;
  	if ($dscbase =~ m/\.dsc$/) {
 		$download = 0;
+		if( ! -f $dscfile ) {
+			$invalid = 1;
+		}
+	}
+	elsif( ! defined $version ) {
+		$invalid = 1;
 	}
 
 	print STDERR "D: dscfile = $dscfile\n" if $conf::debug;
@@ -220,7 +227,7 @@ foreach $dscfile (@ARGV) {
 	print STDERR "D: version = $version\n" if $conf::debug;
 	print STDERR "D: download = $download\n" if $conf::debug;
 
-	if ($download && $dscfile ne $pkgv) {
+	if ($invalid || ($download && $dscfile ne $pkgv)) {
 		print PLOG "Invalid source: $dscfile\n";
 		print PLOG "Skipping $pkg\n";
 		$main::pkg_status = "skipped";
@@ -1316,7 +1323,8 @@ sub filter_dependencies {
 							}
 						}
 						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";


-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/buildd-tools-devel/attachments/20071218/dbbec11a/attachment.pgp 


More information about the Buildd-tools-devel mailing list