List the desired non-free sections to use in NONFREE_COMPONENTS in
CONF.sh, default to "non-free non-free-firmware" by default until
things are all migrated.
The dependency tree created by parsing the output of "apt-cache depends" always
generates an array of array. The old representation of a simple dependency as
an hash is gone in favor of an OR with a single entry (so the hash is the only
element within the array).
So all the code in add_missing() that was dealing with the case of the hash
was never triggered.
I tweaked the OR case so that the generated log messages actually
mention "OR" only if it's a true OR dependency (i.e. with multiple
entries in the array).
Everywhere where we call add_missing() on Depends, we must do it also
on Recommends and Suggests based on $add_rec and $add_sug.
Tweak the code that is supposed to stop the recursion to use
the list that we have built but don't be strict about version
constraints on Recommends/Suggests since they can't always
be respected.
Closes: #601203
There's no point in passing them as parameters everywhere.
This changes the behaviour in some places:
1/ When we process the non-explicitly included packages (for COMPLETE=1),
we used to never take Recommends/Suggests into account, now we do. But
the only thing that will be changed is the ordering with some
Recommended packages being included before their depending package.
2/ When we process the EXTRANONFREE image, this one was always including
Recommends and Suggests, and it's now respecting the setting too.
I was just bitten by this problem in Kali where the ISO was not
containing the expected packages because tools/sort_deps was accepting
"xserver-xorg-input-libinput-udeb" as a solution to
"xserver-xorg-input-all | xserver-xorg-input-driver" and the
udeb was among the package already selected for inclusion on the
ISO.
With this change, tools/sort_deps will look for udeb to solve
udeb dependencies and it will look for non-udeb to solve non-udeb
dependencies.
FTR, here's the sort_deps.log extract proving my assertion:
xserver-xorg Dep: (OR xserver-xorg-input-all xorgxrdp xserver-xorg-input-aiptek xserver-xorg-input-elographics xserver-xorg-input-evdev xserver-xorg-input-evdev-udeb xserver-xorg-input-joystick xserver-xorg-input-kbd xserver-xorg-input-libinput xserver-xorg-input-libinput-udeb xserver-xorg-input-mouse xserver-xorg-input-mtrack xserver-xorg-input-multitouch xserver-xorg-input-mutouch xserver-xorg-input-synaptics xserver-xorg-input-void xserver-xorg-input-wacom xserver-xorg-input-xwiimote ) soft_depend 1
xserver-xorg-input-all not included in a useful version, check_backports 0
xorgxrdp not included in a useful version, check_backports 0
xserver-xorg-input-aiptek not included in a useful version, check_backports 0
xserver-xorg-input-elographics not included in a useful version, check_backports 0
xserver-xorg-input-evdev not included in a useful version, check_backports 0
xserver-xorg-input-evdev-udeb not included in a useful version, check_backports 0
xserver-xorg-input-joystick not included in a useful version, check_backports 0
xserver-xorg-input-kbd not included in a useful version, check_backports 0
xserver-xorg-input-libinput not included in a useful version, check_backports 0
xserver-xorg-input-libinput-udeb is included already, acceptable version 0.29.0-1
Make sure that the package we're told about exists before we look for
its size - a number of the dependencies and recommends may not exist
and this will cause errors for us.
Also list the configured max_pkg_size at the top of the script, to
help with debugging later.
Previously, the code would only check sizes for packages explicitly
listed but packages brought in due to dependency resolution would not
be checked. Now fixed.
+ tools/sort_deps: parse out Built-Using from Packages files too and
pass any such data on to tools/merge_package_lists
+ tools/merge_package_lists: if we have any built-using source
packages listed when doing a combined binary/source set, add them in
the same way as existing listed sources.
* Other bug fixes in tools/merge_package_lists:
+ Fix handling of multi-line Binary: fields
+ Print out the accumulated size of source packages in output also
(fix to printf format string)
Old code used to add the various options in the special case for
"pacakges providing not truly virtual pacakges", which amounted to an
OR dep on the whole set. I missed that in the re-implementation with
version tracking.
Now explicitly switched to adding an OR dep for *all* cases here -
other code will deal with that already. Tweak the logging code to make
things clearer too...
+ Use/parse output from a newer version of apt so that "apt-cache
depends" will include version information on dependencies.
+ All tracking of packages now include versions, so we pass around
hashes of {package name, comparison op, version} everywhere instead
of simply passing package names as strings.
+ Add the APT::Cache::ShowVersion=1 option to apt-cache calls to
turn on version reporting. Needs a locally-patched version of apt
*for now*, but expecting that to be fixed for the Wheezy
release. The new code degrades gracefully if version info is not
available.
+ Add a dependency on libdpkg-perl for version comparison code.
+ Track whether a dependency chain is caused by a hard dependency
(Depends) or soft (Recommends/Suggests). If we fail to add a package
down the chain on a *soft* dependency, don't invalidate the entire
chain.
+ When checking OR dependencies, *first* check to see if any of the
options are already installed *before* trying to install the first
option. Helps a lot with circular deps such as task-lxde-desktop ->
task-desktop -> (task-gnome-desktop | task-lxde-desktop | etc.); in
this case, of course task-lxde-desktop should satisfy the OR dep.
+ Add "FORCE_FIRMWARE=1" to CONF.sh to turn this on
+ Will pick up on packages in the "firmware" task and install them
+ Will also add sym-links to them in CD1/firmware so that new d-i code
can find them easily.
+ Will add a short sentence into README.html/README.txt
* Add top-level control of which checksums are desired for output images
see the CHECKSUMS setting in CONF.sh
* Fix some bashisms in tools/apt-selection.
Patch from Ian Campbell.
It seems that "apt-cache depends" recently (as of 0.7.22) started
including Enhances lines in its output. Leading to:
Generating dependency tree with apt-cache depends...
UNEXPECTED: Line ` Enhances: kvm
' while parsing end of deptree from 'kvm-source'
[etc....]
Ignore these lines.