Allow re-using the debian orig tarball
Ximin Luo
5 years ago
43 | 43 | |
44 | 44 | if shouldbuild ${DEBSRC}_${DEBVER}.dsc "$PKGNAME/debian/changelog" ]; then |
45 | 45 | ( cd "$PKGNAME" && dpkg-buildpackage -d -S --no-sign ) |
46 | if [ "$REUSE_EXISTING_ORIG_TARBALL" = 1 ]; then | |
47 | UPSVER="${DEBVER%-*}" | |
48 | mv "${DEBSRC}_${UPSVER}.orig.tar.gz" "${DEBSRC}_${UPSVER}.orig.tar.gz.new" | |
49 | apt-get -t unstable source "${DEBSRC}" # "=${DEBVER}" | |
50 | # check that old tarball contains same contents as new tarball | |
51 | diff -q <(zcat "${DEBSRC}_${UPSVER}.orig.tar.gz.new") <(zcat "${DEBSRC}_${UPSVER}.orig.tar.gz") | |
52 | ( cd "$PKGNAME" && dpkg-buildpackage -d -S --no-sign ) | |
53 | fi | |
46 | 54 | # sign if not UNRELEASED |
47 | 55 | if echo "$DEBDIST" | grep -qv UNRELEASED-FIXME-AUTOGENERATED-DEBCARGO; then |
48 | 56 | debsign ${DEBSRC}_${DEBVER}_source.changes |