Bug#809300: util/pkg-list lists udeb dependencies for excluded udebs
Package: debian-installer
Version: 20151024
pkg-lists/netboot/armel.cfg contains:
usb-serial-modules-${kernel:Version} ?
so usb-serial-modules is included when available.
Now put the following line in
pkg-lists/netboot/network-console/armel/orion5x.cfg
usb-serial-modules-${kernel:Version} -
to exclude the usb-serial-modules udeb.
util/pkg-list correctly does NOT list usb-serial-modules for the
network-console orion5x type.
However, it incorrectly adds usb-modules, a dependency of
usb-serial-modules which is to be excluded. Only usb-serial-modules
pulled in usb-modules, no other udeb, so it doesn't make sense to
include usb-modules when usb-serial-modules is excluded.
The log shows this:
pkg-lists: excluding usb-serial-modules-4.3.0-1-orion5x-di
....
pkg-lists: adding usb-serial-modules-4.3.0-1-orion5x-
pkg-lists: collecting dependencies for usb-serial-modules-4.3.0-1-orion5x-
pkg-lists: added kernel-image-4.3.0-1-orion5x-di for usb-serial-modules-4.3.0-1-orion5x-
pkg-lists: added usb-modules-4.3.0-1-orion5x-di for usb-serial-modules-4.3.0-1-orion5x-
pkg-lists: collecting dependencies for usb-modules-4.3.0-1-orion5x-di
pkg-lists: added kernel-image-4.3.0-1-orion5x-di for usb-modules-4.3.0-1-orion5x-di
In the end, usb-serial-modules is not listed since it's excluded, but
the dependency (usb-modules) was added and will be listed.
The following workaround works for me but I'm not sure if it's the
right approach.
diff --git a/build/util/pkg-list b/build/util/pkg-list
index 29c56c9..6ef74b8 100755
--- a/build/util/pkg-list
+++ b/build/util/pkg-list
@@ -101,9 +101,13 @@ sub collectpackage {
}
else {
my $package=$line;
+ if (exists $exclude->{$package}) {
+ debug 0, "ignored skipped $package";
+ } else {
$collect->{$package}=1;
debug 0, "adding $package";
collectdeps($package, $collect, $postponed);
+ }
}
}
--
Martin Michlmayr
http://www.cyrius.com/
Reply to: