aboutsummaryrefslogtreecommitdiff
path: root/pbuilder-buildpackage
diff options
context:
space:
mode:
authorJunichi Uekawa <dancer@netfort.gr.jp>2009-12-05 12:22:12 +0900
committerJunichi Uekawa <dancer@netfort.gr.jp>2009-12-05 12:22:12 +0900
commit46a2ee8206c88e5b70f184d30b12106882adc516 (patch)
treeb3ac7414ead47eca1757c2d791203574ef5004fb /pbuilder-buildpackage
parent88e0052c7362c2c2a7841579f007ccabeae27c49 (diff)
downloadpbuilder-46a2ee8206c88e5b70f184d30b12106882adc516.tar
pbuilder-46a2ee8206c88e5b70f184d30b12106882adc516.tar.gz
Make error message visible when copying out to buildresult (closes: #505695)
NFS directories can't be written to by root processes, and they will fail quietly. 1. Only attempt to copy the files (so we won't attempt to copy the directories). 2. Expose error messages so that users will see them.
Diffstat (limited to 'pbuilder-buildpackage')
-rwxr-xr-xpbuilder-buildpackage7
1 files changed, 5 insertions, 2 deletions
diff --git a/pbuilder-buildpackage b/pbuilder-buildpackage
index bbecf37..72181f5 100755
--- a/pbuilder-buildpackage
+++ b/pbuilder-buildpackage
@@ -152,11 +152,14 @@ save_aptcache
trap cleanbuildplace_trap exit sighup sigpipe
umountproc
-
if [ -d "${BUILDRESULT}" ]; then
chown "${BUILDRESULTUID}:${BUILDRESULTGID}" "${BUILDPLACE}"/tmp/buildd/*
chgrp "${BUILDRESULTGID}" "${BUILDPLACE}"/tmp/buildd/*
- cp -p "${BUILDPLACE}"/tmp/buildd/* "${BUILDRESULT}" 2>/dev/null || true
+ for FILE in "${BUILDPLACE}"/tmp/buildd/*; do
+ if [ -f "${FILE}" ]; then
+ cp -p ${FILE} "${BUILDRESULT}" || true
+ fi
+ done
else
log "E: BUILDRESULT=[$BUILDRESULT] is not a directory."
fi