From 17dacda3840ba0ed17ab50629a7cc844e967f7a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Or=C3=B3n=20Mart=C3=ADnez?= Date: Mon, 6 Nov 2017 15:55:02 +0100 Subject: debootstrap: add fallback for Debian SID distro MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Tested-by: Héctor Orón Martínez 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 --- build-recipe-debootstrap | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3