[debhelper-devel] Bug#830869: debhelper: script fails first stage due to missing devices.tar.gz despite no longer being used

Alex Bennée alex.bennee at linaro.org
Tue Jul 12 12:00:53 UTC 2016


Package: debhelper
Severity: normal

Since bug #571136 was fixed we no longer actually need a devices.tar.gz
to build our tarball. However we can't just checkout the debootstrap
script and call directly because it still requires the tarball. One
possible fix is attached bellow, although a more thorough cleaning could
be done:

---
Subject: [PATCH] debootstrap: fail gracefully copying devices.tgar.gz

The devices tarball only exists if you build the source code (as root)
before invoking the script. Since bug #571136 was fixed the
--second-stage doesn't even use the devices tarball so we can afford to
fail gracefully when it doesn't exist. In addition this allows us to
call the script under -e conditions from a straight checkout which is
useful in other cases.

Signed-off-by: Alex Bennée <alex.bennee at linaro.org>
---
 debootstrap | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debootstrap b/debootstrap
index 2a959bb..4027a5d 100755
--- a/debootstrap
+++ b/debootstrap
@@ -635,7 +635,7 @@ if am_doing_phase first_stage; then
        if ! am_doing_phase second_stage; then
                cp "$0"				 "$TARGET/debootstrap/debootstrap"
                cp $DEBOOTSTRAP_DIR/functions	 "$TARGET/debootstrap/functions"
-		cp $DEBOOTSTRAP_DIR/devices.tar.gz	 "$TARGET/debootstrap/devices.tar.gz"
+		cp $DEBOOTSTRAP_DIR/devices.tar.gz	 "$TARGET/debootstrap/devices.tar.gz" || true
                cp $SCRIPT			 "$TARGET/debootstrap/suite-script"
                echo "$ARCH"			>"$TARGET/debootstrap/arch"
                echo "$SUITE"			>"$TARGET/debootstrap/suite"
--
2.7.4

--
Alex Bennée




More information about the debhelper-devel mailing list