aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--debian/changelog4
-rwxr-xr-xpbuilder-buildpackage10
3 files changed, 10 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index e90495b..379356e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2006-01-06 Junichi Uekawa <dancer@debian.org>
+ * pbuilder-buildpackage (BUILDRESULTGID, BUILDRESULTUID): set
+ default values here.
+
* pbuilder-modules (pbuilder-options): --debootstrap= is not a
valid option, change to --debootstrap[space]
diff --git a/debian/changelog b/debian/changelog
index c9926b7..f6f3a05 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,8 +2,10 @@ pbuilder (0.144) UNRELEASED; urgency=low
* Bug fix: "pbuilder --help shows incorrect syntax for debootstrap
option", thanks to Bryan Donlan (Closes: #345870).
+ * Bug fix: "pbuilder: creates files with weird owner/group", thanks to
+ Lars Wirzenius (Closes: #344958).
- -- Junichi Uekawa <dancer@debian.org> Fri, 6 Jan 2006 21:08:18 +0900
+ -- Junichi Uekawa <dancer@debian.org> Fri, 6 Jan 2006 21:19:32 +0900
pbuilder (0.143) unstable; urgency=low
diff --git a/pbuilder-buildpackage b/pbuilder-buildpackage
index db9dd9f..5c1cd24 100755
--- a/pbuilder-buildpackage
+++ b/pbuilder-buildpackage
@@ -139,12 +139,10 @@ trap cleanbuildplace exit
umountproc
if [ -d "${BUILDRESULT}" ]; then
- if [ -n "${BUILDRESULTUID}" ]; then
- chown "${BUILDRESULTUID}:${BUILDRESULTGID}" "${BUILDPLACE}"/tmp/buildd/*
- fi
- if [ -n "${BUILDRESULTGID}" ]; then
- chgrp "${BUILDRESULTGID}" "${BUILDPLACE}"/tmp/buildd/*
- fi
+ BUILDRESULTUID="${BUILDRESULTUID:-${SUDO_UID:-0}}"
+ chown "${BUILDRESULTUID}:${BUILDRESULTGID}" "${BUILDPLACE}"/tmp/buildd/*
+ BUILDRESULTGID="${BUILDRESULTGID:-${SUDO_GID:-0}}"
+ chgrp "${BUILDRESULTGID}" "${BUILDPLACE}"/tmp/buildd/*
cp -p "${BUILDPLACE}"/tmp/buildd/* "${BUILDRESULT}" 2>/dev/null || true
else
echo "E: BUILDRESULT=[$BUILDRESULT] is not a directory." >&2