[pacman-dev] [PATCH] use -u when running fakeroot to preserve file owners

Florian Pritz bluewind at xinu.at
Tue Aug 16 10:17:48 EDT 2011


Running without -u breaks mkinitcpio-git PKGBUILD when running inside
the git tree because files will be owned by root instead of the user.
This makes git describe believe the tree has changed so it will consider
it dirty while git describe outside fakeroot will consider it clean.

References: http://www.spinics.net/lists/git/msg20973.html

Signed-off-by: Florian Pritz <bluewind at xinu.at>
---
 scripts/makepkg.sh.in |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index f464014..e996a55 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -185,9 +185,9 @@ enter_fakeroot() {
 	msg "$(gettext "Entering %s environment...")" "fakeroot"
 
 	if [[ -n $newpkgver ]]; then
-		fakeroot -- $0 --forcever $newpkgver -F "${ARGLIST[@]}" || exit $?
+		fakeroot -u -- $0 --forcever $newpkgver -F "${ARGLIST[@]}" || exit $?
 	else
-		fakeroot -- $0 -F "${ARGLIST[@]}" || exit $?
+		fakeroot -u -- $0 -F "${ARGLIST[@]}" || exit $?
 	fi
 }
 
-- 
1.7.6


More information about the pacman-dev mailing list