From 904ea1831b966ad4114f5853b86423f80c53c42e Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Tue, 19 Jun 2007 14:48:24 +0000 Subject: * When removing $TARGET/debootstrap, 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 (thanks, Steven McCoy; https://launchpad.net/bugs/65003). r47550 --- debian/changelog | 6 ++++++ debootstrap | 10 +++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 5eb73c5..d190698 100644 --- a/debian/changelog +++ b/debian/changelog @@ -25,6 +25,12 @@ debootstrap (0.4.0) UNRELEASED; urgency=low * Fix "deboostrap" typo in debootstrap(8) (thanks, Adam Conrad). * Fix "htp" typo in temporary /etc/apt/sources.list. * Drop support for woody from the udeb too. + * When removing $TARGET/debootstrap, 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 (thanks, Steven McCoy; + https://launchpad.net/bugs/65003). -- Joey Hess Sat, 16 Jun 2007 13:09:59 -0400 diff --git a/debootstrap b/debootstrap index 2c7b891..6adb15c 100644 --- a/debootstrap +++ b/debootstrap @@ -465,7 +465,15 @@ if am_doing_phase second_stage; then fi if [ -e $TARGET/debootstrap/debootstrap.log ]; then - cp $TARGET/debootstrap/debootstrap.log $TARGET/var/log/bootstrap.log + 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 fi sync -- cgit v0.12