From 96dbec0b076f3716fbf40d6b05d45e69e8b290b8 Mon Sep 17 00:00:00 2001 From: Junichi Uekawa Date: Tue, 27 Mar 2007 22:54:38 +0900 Subject: 399484: use buildresult in pdebuild-internal --- ChangeLog | 5 +++++ debian/changelog | 4 +++- pdebuild | 11 ++++++++++- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3055dd6..c1d9223 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-03-27 Junichi Uekawa + + * pdebuild: 399484: Use $BUILDRESULT with pdebuild-internal + "Anderson Lizardo" + 2007-03-21 Junichi Uekawa * debian/rules (binary-arch): create similar for amd64. diff --git a/debian/changelog b/debian/changelog index c9fa731..7ca839d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,8 +5,10 @@ pbuilder (0.165) UNRELEASED; urgency=low built on when building under fakeroot (closes: #415546) thanks to Paul TBBle Hampson for the patch. * pbuilder-uml: enable for amd64 + * Use $BUILDRESULT with pdebuild-internal thanks to Anderson Lizardo + (closes: #399484) - -- Junichi Uekawa Wed, 21 Mar 2007 22:10:32 +0900 + -- Junichi Uekawa Tue, 27 Mar 2007 22:54:22 +0900 pbuilder (0.164) unstable; urgency=low diff --git a/pdebuild b/pdebuild index 398a927..e867ea5 100644 --- a/pdebuild +++ b/pdebuild @@ -32,12 +32,21 @@ fi; PKG_SOURCENAME=$(dpkg-parsechangelog|sed -n 's/^Source: //p') PKG_VERSION=$(dpkg-parsechangelog|sed -n 's/^Version: \(.*:\|\)//p') ARCHITECTURE=$(dpkg-architecture -qDEB_HOST_ARCH) +CHANGES="${PKG_SOURCENAME}_${PKG_VERSION}_${ARCHITECTURE}.changes" export BUILDRESULTUID=$(id -u) 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}" --uid "${BUILDRESULTUID}" --gid "${BUILDRESULTGID}" --pbuildersatisfydepends "$PBUILDERSATISFYDEPENDSCMD" + if [ -d "${BUILDRESULT}" ]; then + for f in $(sed -rn '/^Files:/,${s/.* ([^ ]+)$/\1/p}' ../${CHANGES}); do + cp -p ../$f "${BUILDRESULT}" + done + cp -p ../${CHANGES} "${BUILDRESULT}" + else + echo "E: BUILDRESULT=[$BUILDRESULT] is not a directory." >&2 + fi else if ! dpkg-checkbuilddeps -B ; then echo "W: Unmet build-dependency in source" @@ -52,6 +61,6 @@ if [ "${AUTO_DEBSIGN}" = "yes" ]; then if [ -n "${DEBSIGN_KEYID}" ]; then DEBSIGN_PARAM[1]="-k${DEBSIGN_KEYID}" fi - DEBSIGN_PARAM[2]="${BUILDRESULT}/${PKG_SOURCENAME}_${PKG_VERSION}_${ARCHITECTURE}.changes" + DEBSIGN_PARAM[2]="${BUILDRESULT}/${CHANGES}" debsign "${DEBSIGN_PARAM[@]}" fi -- cgit v1.2.3