Browse Source

generators/50mirror: Use is_ports_architecture from base-installer

The hard versioned dependency is required since that function will have
just moved in in 1.195 and we didn't depend on base-installer before

This shouldn't affect users, since apt-mirror-setup is likely pulled in
by apt-setup-udeb, which depends on installed-base,
provided by bootstrap-base and live-installer,
both of which depend on base-installer

Ref: https://lists.debian.org/msgid-search/3ff43fa102094f36688749bb866ad72d9580d47a.1592257217.git.nabijaczleweli@gmail.com
Message-Id: <0ea6d33be108c4f8ff91632cbc14a149e00978a3.1592258568.git.nabijaczleweli@gmail.com>
tags/0.158
наб Samuel Thibault 1 year ago
parent
commit
d07fa7bf7d
3 changed files with 12 additions and 14 deletions
  1. +8
    -0
      debian/changelog
  2. +1
    -1
      debian/control
  3. +3
    -13
      generators/50mirror

+ 8
- 0
debian/changelog View File

@@ -1,3 +1,11 @@
apt-setup (1:0.158) unstable; urgency=medium

[ наб ]
* apt-mirror-setup: Depend on base-installer (>= 1.195)
* generators/50mirror: Use is_ports_architecture from base-installer

-- Holger Wansing <hwansing@mailbox.org> Mon, 15 Jun 2020 23:42:43 +0200

apt-setup (1:0.157) unstable; urgency=medium

* Team upload.


+ 1
- 1
debian/control View File

@@ -18,7 +18,7 @@ Description: Configure apt
Package: apt-mirror-setup
Package-Type: udeb
Architecture: all
Depends: choose-mirror-bin, ${misc:Depends}
Depends: choose-mirror-bin, base-installer (>= 1.195), ${misc:Depends}
Description: set up a mirror in sources.list

Package: apt-cdrom-setup


+ 3
- 13
generators/50mirror View File

@@ -2,6 +2,7 @@
set -e

. /usr/share/debconf/confmodule
. /usr/lib/base-installer/library.sh

file="$1"

@@ -25,22 +26,11 @@ ask_no_mirror() {
fi
}

is_ports_architecture() {
case "$(chroot /target /usr/bin/dpkg --print-architecture)" in
alpha|hppa|hurd-i386|ia64|kfreebsd-amd64|kfreebsd-i386|m68k|powerpc|ppc64|riscv64|sh4|sparc64|x32)
log "Debian-Ports architecture detected"
return 0
;;
*)
return 1
;;
esac
}

# For architectures in the Debian-Ports archive, sources.list has to include
# an additional entry for the "unreleased" suite.
unset use_unreleased
if is_ports_architecture; then
if is_ports_architecture "$(chroot /target /usr/bin/dpkg --print-architecture)"; then
log "Debian-Ports architecture detected"
use_unreleased=yes
fi



Loading…
Cancel
Save