[PATCH 6 of 6] packaging: "make deb" no longer fails
Antonio Muci
a.mux at inwind.it
Tue Oct 9 21:29:28 UTC 2018
# HG changeset patch
# User muxator <a.mux at inwind.it>
# Date 1539116950 -7200
# Tue Oct 09 22:29:10 2018 +0200
# Node ID 5d892da53728de160568a72a37dda9abcf1f7e9a
# Parent 4d7d83159122473ab69f9b9c16fab69d10232d78
packaging: "make deb" no longer fails
Release 4.7 rationalized the layout of the build scripts.
Unfortunately, while "make docker-ubuntu-*" and "make docker-debian-*" worked as
expected, "make deb" was broken.
Before this change "make deb" was failing with the following error:
You are not inside a Mercurial repository!
Or, after the latest changes:
You are inside <fullpath>, which is not the root of a Mercurial repository
Moreover, when "make deb" failed, the cleanup routine deleted the wrong
directory (contrib/packaging/debian instead of <reporoot>/debian) resulting in
a corrupted working copy that needed to be hg revert-ed.
After this change the docker targets continue to work, and the deb one is able
to finish.
diff --git a/contrib/packaging/builddeb b/contrib/packaging/builddeb
--- a/contrib/packaging/builddeb
+++ b/contrib/packaging/builddeb
@@ -16,7 +16,7 @@ DEBFLAGS=-b
cleanup() {
if [ "$CLEANUP" ]; then
- rm -r "$PWD/debian";
+ rm -r "$ROOTDIR/debian";
fi
}
@@ -51,6 +51,8 @@ while [ "$1" ]; do
esac
done
+cd "$ROOTDIR"
+
trap 'cleanup' EXIT
set -u
More information about the Mercurial-devel
mailing list