diff options
author | Tom Hughes <tom.hughes@palm.com> | 2011-11-01 15:50:41 -0700 |
---|---|---|
committer | Junichi Uekawa <dancer@netfort.gr.jp> | 2011-12-04 21:39:41 +0900 |
commit | d07d7852302e595a86a87bfbbf00d0501e88408c (patch) | |
tree | 8eae2b996d6dd8f68082a365c7319e42f641a27c /pdebuild | |
parent | a8144e96463a46854f6e305fa2fb1fbcd19f62d9 (diff) | |
download | pbuilder-d07d7852302e595a86a87bfbbf00d0501e88408c.tar pbuilder-d07d7852302e595a86a87bfbbf00d0501e88408c.tar.gz |
Avoid dsc copy error when using build-internal and buildresult=.. (closes: #422272)
Diffstat (limited to 'pdebuild')
-rw-r--r-- | pdebuild | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -46,10 +46,15 @@ export BUILDRESULTGID=$(id -g) if [ "${USE_PDEBUILD_INTERNAL}" = 'yes' ]; then ${PBUILDERROOTCMD} ${PDEBUILD_PBUILDER} --execute ${EXTRA_CONFIGFILE[@]/#/--configfile } --bindmounts $(readlink -f ..) "$@" -- /usr/lib/pbuilder/pdebuild-internal ${PWD} --debbuildopts "" --debbuildopts "${DEBBUILDOPTS}" --uid "${BUILDRESULTUID}" --gid "${BUILDRESULTGID}" --pbuildersatisfydepends "$PBUILDERSATISFYDEPENDSCMD" if [ -d "${BUILDRESULT}" ]; then + PARENT_DIR=`dirname $(pwd)` for files in $(sed -rn '/^Files:/,${s/^ .* ([^ ]+)$/\1/p}' ../${CHANGES}); do - cp -a ../"$files" "${BUILDRESULT}" + if [ "${PARENT_DIR}" != "${BUILDRESULT}" ]; then + cp -a ../"$files" "${BUILDRESULT}" + fi done - cp -a ../${CHANGES} "${BUILDRESULT}" + if [ "${PARENT_DIR}" != "${BUILDRESULT}" ]; then + cp -a ../${CHANGES} "${BUILDRESULT}" + fi else log "E: BUILDRESULT=[$BUILDRESULT] is not a directory." exit 1 |