From d07d7852302e595a86a87bfbbf00d0501e88408c Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Tue, 1 Nov 2011 15:50:41 -0700 Subject: Avoid dsc copy error when using build-internal and buildresult=.. (closes: #422272) --- pdebuild | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'pdebuild') diff --git a/pdebuild b/pdebuild index 28dff21..6502f2f 100644 --- a/pdebuild +++ b/pdebuild @@ -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 -- cgit v1.2.3