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 | \
if [ -n "$DEBCARGO" ]; then
true
-elif which debcargo >/dev/null; then
- DEBCARGO=$(which debcargo)
+elif type -p debcargo >/dev/null 2>&1; then
+ DEBCARGO=$(type -p debcargo)
elif [ -f "$HOME/.cargo/bin/debcargo" ]; then
DEBCARGO="$HOME/.cargo/bin/debcargo"
else
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
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"
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() {