[buildd-tools-devel] Bug#782553: sbuild: 'sbuild --source --no-arch-all' fails in a very confusing way

Dima Kogan dima at secretsauce.net
Tue Apr 14 06:06:35 UTC 2015


Package: sbuild
Version: 0.65.2-1
Severity: normal

Hi.

The --[no-]arch-all and --source options all touch the dpkg-buildpackage
-b and -B options, and it is possible for the user to mistakenly request
an incompatible combination that results in very confusing failures. In
my case I had $sbuild_source=1 in the config file, and I was running
'sbuild --no-arch-all'. This was ignoring the --no-arch-all partially:
'dpkg-buildpackage -B' was being invoked, in direct contradiction with
the --no-arch-all request. However later on, sbuild would say

    E: Package builds hello-all_2.10_all.deb when binary-indep target is not called.  This is a bug in the packaging.

and then it tries to do stuff with this package (that wasn't supposed to
be built), and says stuff like

   dpkg-deb: error: failed to read archive `/«CHROOT»/«BUILDDIR»/hello-all_2.10_all.deb': No such file or directory

   dpkg-deb: error: failed to read archive `/«CHROOT»/«BUILDDIR»/hello-all_2.10_all.deb': No such file or directory

   mv: cannot stat '/«CHROOT»/«BUILDDIR»/hello-all_2.10_all.deb': No such file or directory
   E: Could not move hello-all_2.10_all.deb to .
   du: cannot access '/tmp/hello-all_2.10_all.deb': No such file or directory

and exits with 'Status: attempted'.

This was really confusing to the user (me) because on the commandline I
was explicitly requesting --no-arch-all. The --source was being given in
the config file, and even then, it's not immediately obvious it's
related. Can I request we detect such cases and barf early with a clear
error message?

It's also possible to issue more clearly illegal requests, such as
'sbuild --arch-all --no-arch-all'. This succeeds doing something, but
one of the requests was ignored. Things like this should be illegal too.

Thanks!



More information about the Buildd-tools-devel mailing list