#420458 pbuilder: if BUILDRESULT is created, it's owned by root:root

#420458#5
Date:
2007-04-22 13:16:42 UTC
From:
To:
Hi,

if the BUILDRESULT directory is missing, it's created with ownership
set to root:root. That's inconvenient because I have to become root to
get rid of this directory.

Since the .debs etc. are being chowned to me, it shouldn't be too
difficult to fix the ownership of the buildresult directory (but only if
it had been created by pbuilder).

Note: it's possible to create multiple directory levels and all should
be owned properly by me.

(I usually add a '--buildresult ../build-pkgname-1.2.3-4' parameter
especially for packages with many .debs to prevent cluttering my default
BUILDRESULT=..)


Andreas

#420458#12
Date:
2015-11-15 18:23:49 UTC
From:
To:
I locally have a git stash with


f [ ! -d "${BUILDRESULT}" ]; then
     if [ -n "${BUILDRESULT}" ] ; then
         mkdir -p "${BUILDRESULT}"
+        chown "${BUILDRESULTUID}:${BUILDRESULTGID}" "${BUILDRESULT}"
     fi

which does the trick, but

erm, I sincerely have no clue on how to do this without getting mad by
doing the job of the -p switch manually.
Suggestion?