diff options
author | Héctor Orón Martínez <hector.oron@collabora.co.uk> | 2017-11-06 15:55:02 +0100 |
---|---|---|
committer | Héctor Orón Martínez <zumbi@debian.org> | 2019-09-01 01:59:08 +0200 |
commit | 17dacda3840ba0ed17ab50629a7cc844e967f7a6 (patch) | |
tree | d8e3011fe7655aa4e9e6baf5df3ff515c2d61fb6 | |
parent | cf29ba5d3ec1e37cef7b5f363d103beac1f85571 (diff) |
debootstrap: add fallback for Debian SID distro
When attempting to build Debian unstable, distribution is
calculated using lsb, which relies on apt cache. As our
build systems lack apt cache and network we cannot detect
we are building for Debian SID (aka unstable).
For more background information see: DebianBug#845651
Signed-off-by: Héctor Orón Martínez <hector.oron@collabora.co.uk>
Tested-by: Héctor Orón Martínez <hector.oron@collabora.co.uk>
Forwarded: https://github.com/openSUSE/obs-build/pull/460
Last-Update: 2018-08-30
Gbp-Pq: Name debootstrap-add-fallback-for-Debian-SID-distro.patch
-rw-r--r-- | build-recipe-debootstrap | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/build-recipe-debootstrap b/build-recipe-debootstrap index 2006814..2e72fef 100644 --- a/build-recipe-debootstrap +++ b/build-recipe-debootstrap @@ -31,7 +31,11 @@ recipe_prepare_debootstrap() { recipe_build_debootstrap() { local arch=$(chroot $BUILD_ROOT su -c "dpkg-architecture -qDEB_BUILD_ARCH") - local dist=$(chroot $BUILD_ROOT su -c "lsb_release --codename --short") + if $(chroot $BUILD_ROOT grep -q '/sid' /etc/debian_version) ; then + local dist=unstable + else + local dist=$(chroot $BUILD_ROOT su -c "lsb_release --codename --short") + fi local myroot=debootstraproot test -d $BUILD_ROOT/.build.binaries || cleanup_and_exit 1 if test "$DO_INIT" = true -o ! -d "$BUILD_ROOT/.build.binaries/dists" ; then |