since debootstrap 1.0.133, the buildd variant only installs apt and not priority:required anymore

This commit is contained in:
Johannes Schauer Marin Rodrigues 2023-10-23 10:38:10 +02:00
parent 261cfda58f
commit 27d1bad2a5
Signed by: josch
GPG key ID: F2CBA5C78FBD83E1
2 changed files with 10 additions and 3 deletions

View file

@ -2962,15 +2962,15 @@ sub run_install() {
my @pkgs_to_install = (@{ $options->{include} });
if ($options->{variant} eq 'buildd') {
push @pkgs_to_install, 'build-essential';
push @pkgs_to_install, 'build-essential', 'apt';
}
if (any { $_ eq $options->{variant} }
('required', 'important', 'standard', 'buildd')) {
('required', 'important', 'standard')) {
# Many of the priority:required packages are also essential:yes. We
# make sure not to select those here to avoid useless "xxx is already
# the newest version" messages.
my $priority;
if (any { $_ eq $options->{variant} } ('required', 'buildd')) {
if (any { $_ eq $options->{variant} } ('required')) {
$priority = '?and(?priority(required),?not(?essential))';
} elsif ($options->{variant} eq 'important') {
$priority = '?and(?or(?priority(required),?priority(important)),'

View file

@ -174,6 +174,13 @@ if [ "{{ VARIANT }}" = "-" ]; then
done
fi
# since debootstrap 1.0.133 there is no tzdata in the buildd variant and thus
# debootstrap creates its own /etc/localtime
if [ "{{ VARIANT }}" = "buildd" ]; then
[ "$(readlink /tmp/debian-{{ DIST }}-debootstrap/etc/localtime)" = /usr/share/zoneinfo/UTC ]
rm /tmp/debian-{{ DIST }}-debootstrap/etc/localtime
fi
# check if the file content differs
diff --unified --no-dereference --recursive /tmp/debian-{{ DIST }}-debootstrap /tmp/debian-{{ DIST }}-mm >&2