- improve build root owner setting
authorMichael Schroeder <mls@suse.de>
Thu, 26 Apr 2012 12:56:27 +0000 (14:56 +0200)
committerMichael Schroeder <mls@suse.de>
Thu, 26 Apr 2012 12:56:27 +0000 (14:56 +0200)
build

diff --git a/build b/build
index 96c2af8..b3ed485 100755 (executable)
--- a/build
+++ b/build
@@ -44,7 +44,7 @@ kvm_virtio=
 console=ttyS0
 
 # need to restore build root owner for non-root builds
-browner=0
+browner=
 
 # Default uid:gid for the build user
 ABUILD_UID=399
@@ -315,7 +315,7 @@ cleanup_and_exit () {
         fi
     fi
     if test -n "$RUNNING_IN_VM" ; then
-       chown $browner $BUILD_ROOT
+       test -n "$browner" && chown "$browner" $BUILD_ROOT
        cd /
        if test -n "$VM_SWAP" -a -e "$VM_SWAP" ; then
            swapoff "$VM_SWAP" 2>/dev/null