]> git.proxmox.com Git - debcargo-conf.git/blobdiff - build.sh
Remove relax-serde-dep.diff as it isn't necessary anymore
[debcargo-conf.git] / build.sh
index 20814716e2e564856fa5a93053022f596a254895..c4ba56f23cc21a2505c7d77262381cf439019c99 100755 (executable)
--- a/build.sh
+++ b/build.sh
@@ -44,6 +44,14 @@ shouldbuild() {
 
 if shouldbuild ${DEBSRC}_${DEBVER}.dsc "$PKGNAME/debian/changelog" ]; then
        ( cd "$PKGNAME" && dpkg-buildpackage -d -S --no-sign )
+       if [ "$REUSE_EXISTING_ORIG_TARBALL" = 1 ]; then
+               UPSVER="${DEBVER%-*}"
+               mv "${DEBSRC}_${UPSVER}.orig.tar.gz" "${DEBSRC}_${UPSVER}.orig.tar.gz.new"
+               apt-get -t unstable source "${DEBSRC}" # "=${DEBVER}"
+               # check that old tarball contains same contents as new tarball
+               diff -q <(zcat "${DEBSRC}_${UPSVER}.orig.tar.gz.new") <(zcat "${DEBSRC}_${UPSVER}.orig.tar.gz")
+               ( cd "$PKGNAME" && dpkg-buildpackage -d -S --no-sign )
+       fi
        # sign if not UNRELEASED
        if echo "$DEBDIST" | grep -qv UNRELEASED-FIXME-AUTOGENERATED-DEBCARGO; then
                debsign ${DEBSRC}_${DEBVER}_source.changes
@@ -55,7 +63,7 @@ check_build_deps() {
        if shouldbuild dpkg-dummy/status /var/cache/apt/pkgcache.bin; then
                # pretend dpkg status file that marks all packages as installed
                # this is because dpkg-checkbuilddeps only works on installed pkgs
-               apt-cache dumpavail | \
+               apt-cache dumpavail -o APT::Default-Release=unstable | \
                sed -e 's/Package: .*/\0\nStatus: install ok installed/g' > dpkg-dummy/status
        fi
        ( cd "$PKGNAME" && dpkg-checkbuilddeps --admindir=../dpkg-dummy )