Am Freitag, den 10.01.2020, 01:18 +0100 schrieb Johannes Schauer: > Control: tag -1 + pending > > Attached patch seems to work.
Hi,
thanks for the patch. I tried it and it failed with a dependency issue.
Debugging it revealed the reason: I have a apt preferences file that
reduces the pin priority for some repositories. This file is copied in
in an essential hook. When running as dry-run, the essential hook is
skipped and therefore apt does not use the pin priority of this
preferences file.
Then I added '--aptopts=Dir::Etc::preferencesparts "[...]"' and it
worked.
Our test-package-selection script did one more thing. It checked that
exactly one kernel package was installed. Currently mmdebstrap had to
way to do this check, because all hooks are skipped. This is the code:
exec 3>&1
KERNEL_PACKAGE=$(chroot "$1" apt-get install -s -y --no-install-recommends
$pkg_list | \
tee /dev/fd/3 | grep '^Inst linux-image' | cut -d ' ' -f 2,3 | sed 's/
(/=/')
exec 3>&-
number_kernels=$(echo "$KERNEL_PACKAGE" | wc -w)
if test "$number_kernels" -ne 1; then
echo "Error: Found $number_kernels kernels instead of one:" >&2
for kernel_package in $KERNEL_PACKAGE; do
package="${kernel_package%=*}"
echo "*** Kernel package $kernel_package. Direct reverse dependencies:"
chroot "$1" apt-cache --no-recommends --no-suggests --no-conflicts \
--no-breaks --no-replaces --no-enhances rdepends
"${kernel_package}" | \
grep -v "^${package}$" | grep -v ':' | sed 's/^ *|\?/ /' | sort |
uniq
echo " All recursive reverse dependencies:"
chroot "$1" apt-cache --no-recommends --no-suggests --no-conflicts \
--no-breaks --no-replaces --no-enhances --recurse rdepends \
"${kernel_package}" | grep -v "^${package}$" | grep -v ':' | \
sed 's/^ *|\?/ /' | sort | uniq
done
printf "Error: Found $number_kernels kernels instead of one." >&2
printf " Details see above (search for three asterisks).\n" >&2
exit 1
fi
--
Benjamin Drung
DevOps Engineer and Debian & Ubuntu Developer
Platform Integration (IONOS Cloud)
1&1 IONOS SE | Greifswalder Str. 207 | 10405 Berlin | Germany
E-mail: [email protected] | Web: www.ionos.de
Hauptsitz Montabaur, Amtsgericht Montabaur, HRB 24498
Vorstand: Dr. Christian Böing, Hüseyin Dogan, Dr. Martin Endreß, Hans-
Henning Kettler, Matthias Steinberg, Achim Weiß
Aufsichtsratsvorsitzender: Markus Kadelke
Member of United Internet
Diese E-Mail kann vertrauliche und/oder gesetzlich geschützte
Informationen enthalten. Wenn Sie nicht der bestimmungsgemäße Adressat
sind oder diese E-Mail irrtümlich erhalten haben, unterrichten Sie
bitte den Absender und vernichten Sie diese E-Mail. Anderen als dem
bestimmungsgemäßen Adressaten ist untersagt, diese E-Mail zu speichern,
weiterzuleiten oder ihren Inhalt auf welche Weise auch immer zu
verwenden.
This e-mail may contain confidential and/or privileged information. If
you are not the intended recipient of this e-mail, you are hereby
notified that saving, distribution or use of the content of this e-mail
in any way is prohibited. If you have received this e-mail in error,
please notify the sender and delete the e-mail.
signature.asc
Description: This is a digitally signed message part

