changeset 40107:212a52d8e9d8

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.
author muxator <a.mux@inwind.it>
date Tue, 09 Oct 2018 22:29:10 +0200
parents 930bce0741de
children e5fbdc3659fc
files contrib/packaging/builddeb
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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