[buildd-tools-devel] Bug#781948: --extra-package doesn't work

Wookey wookey at debian.org
Wed May 6 17:51:56 UTC 2015


Package: sbuild
Version: 0.65.2-1
Followup-For: Bug #781948

I've just hit this same issue. It does indeed not find the
extra-package specified.

sbuild -A -s --extra-package=cross-gcc-dev_25_all.deb --build=amd64 --host=amd64 -d unstable -c unstable-amd64-sbuild

....
The following packages have unmet dependencies:
 sbuild-build-depends-cross-gcc-4.9-arm64-dummy : Depends:
cross-gcc-dev (= 25) but it is not going to be 
installed
....

I also noticed that if I typo the name of the extra package there is
no complaint saying 'no such package'. I think sbuild should complain
if the extra-package listed doesn't exist. At least with a warning,
if not aborting the job.

Is it useful to be able to specify an extra package that doesn't exist
and have the build proceed on that basis, or is it better to bail if
it's specified but not found? Seems to me that it should probably be
an error.


So. It turns out that the problem is that the path/package gets used
'as-is' and there is no error reporting, so you have to use an
absolute path or be sure that you have it right relative to where it
will get run from.

In my case that means that if I do 
sbuild -A -s --extra-package=../../cross-gcc-dev_25_all.deb --build=amd64 --host=amd64 -d unstable -c unstable-amd64-sbuild

then it works OK. Is this why Piotr had trouble?

This patch at least prints out a message that the package was
not copied in. Probably something more thorough to fail the build
would be better.

--------------
--- ResolverBase.pm~2015-03-24 13:40:45.000000000 +0000
+++ ResolverBase.pm2015-05-06 18:36:00.809012090 +0100
@@ -1109,7 +1109,7 @@
     my $dummy_archive_dir = $self->get('Dummy archive directory');

     for my $deb (@{$self->get_conf('EXTRA_PACKAGES')}) {
-        copy($deb, $dummy_archive_dir);
+        copy($deb, $dummy_archive_dir) or $self->log_error("Unable to copy extra-package $deb\n");
     }

     # Write the conf file.
--------------

The copy is not attempted until the resolver stage, so builds would
still take a little while to fail. Not sure if it would make sense to
do this earlier?


-- System Information:
Debian Release: 8.0
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'testing-updates'), (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: armhf

Kernel: Linux 3.16.0-4-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages sbuild depends on:
ii  adduser         3.113+nmu3
ii  apt-utils       1.0.9.8
ii  libsbuild-perl  0.65.2-1
ii  perl            5.20.2-3

Versions of packages sbuild recommends:
ii  debootstrap  1.0.67
ii  fakeroot     1.20.2-1

Versions of packages sbuild suggests:
pn  deborphan  <none>
ii  wget       1.16-1

-- no debconf information



More information about the Buildd-tools-devel mailing list