diff options
author | Mattia Rizzolo <mattia@mapreri.org> | 2015-11-12 22:46:45 +0000 |
---|---|---|
committer | Mattia Rizzolo <mattia@mapreri.org> | 2015-11-12 22:46:45 +0000 |
commit | 311c138dc394e6771517f339f234afff80ab54f6 (patch) | |
tree | bf8b1a96cfa97eccd4bea5c544cb9182cb2c23bd | |
parent | 81aa5b61afed5296a5845a3ccab81c390fda43b9 (diff) | |
download | pbuilder-311c138dc394e6771517f339f234afff80ab54f6.tar pbuilder-311c138dc394e6771517f339f234afff80ab54f6.tar.gz |
pdebuild: make debsign work if only a source build was perfomed and only _source.changes is available
Thanks: Marcin Kulisz <marcin@bashton.com> for the original patch
Closes: #804905
-rw-r--r-- | pdebuild | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -33,6 +33,7 @@ PKG_SOURCENAME=$(dpkg-parsechangelog|sed -n 's/^Source: //p') PKG_VERSION=$(dpkg-parsechangelog|sed -n 's/^Version: \(.*:\|\)//p') ARCHITECTURE="${ARCHITECTURE:-$(dpkg-architecture -qDEB_HOST_ARCH)}" CHANGES="${PKG_SOURCENAME}_${PKG_VERSION}_${ARCHITECTURE}.changes" +SOURCE_CHANGES="${PKG_SOURCENAME}_${PKG_VERSION}_source.changes" if [ -z "${PBUILDER_BUILD_LOGFILE}" ]; then PBUILDER_BUILD_LOGFILE="../${PKG_SOURCENAME}_${PKG_VERSION}_${ARCHITECTURE}.build" @@ -93,8 +94,15 @@ fi if [ "${AUTO_DEBSIGN}" = "yes" ]; then unset DEBSIGN_PARAM || true if [ -n "${DEBSIGN_KEYID}" ]; then - DEBSIGN_PARAM[1]="-k${DEBSIGN_KEYID}" + DEBSIGN_PARAM[1]="-k${DEBSIGN_KEYID}" + fi + if [ -f "${BUILDRESULT}/${CHANGES}" ]; then + DEBSIGN_PARAM[2]="${BUILDRESULT}/${CHANGES}" + elif [ -f "${BUILDRESULT}/${SOURCE_CHANGES}" ]; then + DEBSIGN_PARAM[2]="${BUILDRESULT}/${SOURCE_CHANGES}" + else + log "E: the .changes file can't be found, debsing not done" + exit 1 fi - DEBSIGN_PARAM[2]="${BUILDRESULT}/${CHANGES}" debsign "${DEBSIGN_PARAM[@]}" fi |