packaging: "make deb" no longer fails
authormuxator <a.mux@inwind.it>
Tue, 09 Oct 2018 22:29:10 +0200
changeset 40107 212a52d8e9d8
parent 40106 930bce0741de
child 40108 e5fbdc3659fc
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.
contrib/packaging/builddeb
--- a/contrib/packaging/builddeb	Tue Oct 09 22:24:38 2018 +0200
+++ b/contrib/packaging/builddeb	Tue Oct 09 22:29:10 2018 +0200
@@ -16,7 +16,7 @@
 
 cleanup() {
     if [ "$CLEANUP" ]; then
-        rm -r "$PWD/debian";
+        rm -r "$ROOTDIR/debian";
     fi
 }
 
@@ -51,6 +51,8 @@
     esac
 done
 
+cd "$ROOTDIR"
+
 trap 'cleanup' EXIT
 
 set -u