]> git.proxmox.com Git - debcargo-conf.git/blobdiff - vars.sh.frag
libsqlite3-sys: actually use proper version
[debcargo-conf.git] / vars.sh.frag
index 0f66267ae384091c0c9b92107cebbc1ccc2809df..38be71c8079effe158a8a949c2e324407806db74 100644 (file)
@@ -16,6 +16,7 @@ cat <<'eof' >"$HOOK_COMMIT"
 if git rev-parse -q --verify MERGE_HEAD; then exit; fi
 case $(git rev-parse --abbrev-ref HEAD) in
 pending-*) true;;
+proxmox/*) true;;
 *)     if git diff --cached --name-only | \
           grep '^src/.*/debian/changelog$' | \
           while read x; do if ! [ -f "$x" ]; then continue; fi; echo "$x: $(head -n1 $x)"; done | \
@@ -42,6 +43,8 @@ dcver=$($DEBCARGO --version | sed -ne 's/debcargo //p')
 case $dcver in
 2.0.*|2.1.*|2.2.*|2.3.*)       abort 1 "unsupported debcargo version $dcver. try reinstalling with \`cargo install debcargo --force\`";;
 2.4.*) true;;
+2.5.*) true;;
+2.6.*) true;;
 *)     abort 1 "unsupported debcargo version: $dcver";;
 esac
 
@@ -68,6 +71,7 @@ PKGDIR_REL="src/$PKGNAME"
 PKGDIR="$PWD/$PKGDIR_REL"
 BUILDDIR="$PWD/build/$PKGNAME"
 PKGCFG="$PKGDIR/debian/debcargo.toml"
+UPLOADER="${DEBFULLNAME:-$NAME} <${DEBEMAIL:-$EMAIL}>"
 
 mkdir -p "$(dirname $BUILDDIR)"
 ln -srf "$PWD/build.sh" "$PWD/build/build.sh"
@@ -79,7 +83,19 @@ fi
 
 run_debcargo() {
        rm -rf "$BUILDDIR" "$(dirname "$BUILDDIR")/rust-${PKGNAME}_${REALVER:-$VER}"*.orig.tar.*
+       set +e
        $DEBCARGO package --config "$PKGCFG" --directory "$BUILDDIR" "$@" "$CRATE" "${REALVER:-$VER}"
+       if [ $? -ne 0 ]; then
+               echo "Command failed. If the patches failed to apply, to rebase them, run":
+               echo "cd $BUILDDIR"
+               echo "rm -rf .pc"
+               echo "ln -s $PKGDIR/debian/patches"
+               echo "quilt push -a"
+               echo "$EDITOR <file>"
+               echo "quilt refresh"
+               exit 1
+       fi
+       set -e
 }
 
 shouldbuild() {