Bug#930272: debootstrap: needless conditional --keep-debootstrap-dir for log move
Package: debootstrap
Severity: important
Tags: patch
-- System Information:
Debian Release: 9.9
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: armhf (armv7l)
Kernel: Linux 4.14.94-odroidxu4 (SMP w/8 CPU cores; PREEMPT)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages debootstrap depends on:
ii wget 1.18-5+deb9u3
Versions of packages debootstrap recommends:
pn arch-test <none>
ii debian-archive-keyring 2017.5
ii gnupg 2.1.18-8~deb9u4
Versions of packages debootstrap suggests:
pn squid-deb-proxy-client <none>
pn ubuntu-archive-keyring <none>
running debootstrap against a recent nfs Server has a known issue 'can't
rm debootstrap' and an already implemented workaround - using mv instead
of cp and rm.
But tis workaround is needless restricted to the --keep-debootstrap-dir Flag -
it won't harm to always mv .
This way we will prevent quite some hours figuring out, what the hell
breakes the second stage ...
--- a/debootstrap 2019-06-09 15:37:34.718199723 +0200
+++ b/debootstrap 2019-06-09 16:12:53.541620567 +0200
@@ -674,16 +674,13 @@
fi
if [ -e "$TARGET/debootstrap/debootstrap.log" ]; then
- if [ "$KEEP_DEBOOTSTRAP_DIR" = true ]; then
- cp "$TARGET/debootstrap/debootstrap.log" "$TARGET/var/log/bootstrap.log"
- else
- # debootstrap.log is still open as stdout/stderr and needs
- # to remain so, but after unlinking it some NFS servers
- # implement this by a temporary file in the same directory,
- # which makes it impossible to rmdir that directory.
- # Moving it instead works around the problem.
- mv "$TARGET/debootstrap/debootstrap.log" "$TARGET/var/log/bootstrap.log"
- fi
+ # no need to distinguish between kept or deleted DEBOOTSTRAP_DIR
+ # debootstrap.log is still open as stdout/stderr and needs
+ # to remain so, but after unlinking it some NFS servers
+ # implement this by a temporary file in the same directory,
+ # which makes it impossible to rmdir that directory.
+ # Moving it instead works around the problem.
+ mv "$TARGET/debootstrap/debootstrap.log" "$TARGET/var/log/bootstrap.log"
fi
sync
Reply to: