Package: pbuilder-uml
Version: 0.169
Severity: normal
Tags: patch

Hi!

as said I think commit 9f3ae5e65a2fc1dcd9394736d4a08fec239f2939
introduced that bug. A simple check on INTERNAL_BUILD_UML to ignore the
umount error can do.
To reproduce:
$ echo "apt-get install --reinstall -y klogd" > test.sh
$ pbuilder-user-mode-linux execute --uml-login-nocow test.sh

with the attached patch pbuilder starts /etc/init.d/killprocs to get rid
of all useless processes and unmounts again the filesystem.
Don't know if it's absolutely a good idea but it works and the
filesystem stays clean after shutdown.

thoughts?

Mattia

-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (990, 'testing'), (300, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.22-rc4-mm2-1 (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=en_GB, LC_CTYPE=ja_JP (charmap=EUC-JP)
Shell: /bin/sh linked to /bin/bash

Versions of packages pbuilder-uml depends on:
ii  pbuilder                    0.169        personal package builder for Debia
ii  rootstrap                   0.3.24-3     A tool for building complete Linux
ii  user-mode-linux             2.6.21-1um-1 User-mode Linux (kernel)

pbuilder-uml recommends no packages.

-- no debconf information
-- 
mattia
:wq!
diff --git a/pbuilder-modules b/pbuilder-modules
index 309bf8e..d0dc514 100644
--- a/pbuilder-modules
+++ b/pbuilder-modules
@@ -146,7 +146,14 @@ function umount_one () {
             :
             ;;
         esac
-        if [ "$ignore_umount_error" != "yes" ]; then
+	if [ "$ignore_umount_error" != "yes" ] &&
+		[ "${INTERNAL_BUILD_UML}" = "yes" ]; then
+	    echo "W: umount errors in user-mode-linux, trying to kill blocking processes" >&2
+	    /etc/init.d/killprocs start
+	    echo "W: unmounting /$1 again" >&2
+	    umount "$BUILDPLACE/$1"
+
+        elif [ "$ignore_umount_error" != "yes" ]; then
 	    echo "W: Retrying to unmount $1 in 5s"
 	    sleep 5s
 	    while ! umount "$BUILDPLACE/$1"; do

Reply via email to