From: Jon Dowland Date: Wed, 16 May 2012 13:36:36 +0000 (+0100) Subject: give up trying to manage version.py via patch X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=f1aa28f0aad6087da8a0ab832695e940d220f7fc;p=packages%2Fb%2Fbup.git give up trying to manage version.py via patch I'm sick of the pain of 3.0 (quilt) and the disparity between orig.tar.gz and git checkouts. So let's try and use another method for rationalising that file: keep a good copy in debian/, and move/copy it in/out of place in configure/clean. selectively move version.pre in clean target --- diff --git a/debian/_version.py.pre b/debian/_version.py.pre new file mode 100644 index 0000000..32b02f4 --- /dev/null +++ b/debian/_version.py.pre @@ -0,0 +1,4 @@ + +COMMIT='$Format:%H$' +NAMES='$Format:%d$' +DATE='$Format:%ci$' diff --git a/debian/patches/mangle-version b/debian/patches/mangle-version deleted file mode 100644 index b47f70b..0000000 --- a/debian/patches/mangle-version +++ /dev/null @@ -1,21 +0,0 @@ -Description: set version string to that of the git archive -Author: Jon Dowland -Last-Update: 2011-12-05 - -The upstream repo features these format strings in this file. The -package "orig.tar.gz" file is created via "git archive" — which -expands the format strings. Therefore, there is an immediate -disparity between the orig.tar.gz contents and a bup checkout. In -order to make building-from-repo and building-from-orig.tar the -same, patch it back to the original state. - ---- a/lib/bup/_version.py.pre~ 2011-11-04 17:55:15.000000000 +0000 -+++ b/lib/bup/_version.py.pre 2011-12-05 15:14:41.889885203 +0000 -@@ -1,4 +1,4 @@ - --COMMIT='8953dc8d911844ae5c5764ac542811e95e592fe4' --NAMES=' (origin/master, origin/HEAD, master)' --DATE='2011-11-04 13:55:15 -0400' -+COMMIT='$Format:%H$' -+NAMES='$Format:%d$' -+DATE='$Format:%ci$' diff --git a/debian/patches/series b/debian/patches/series index 50ccf40..49e8cf3 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,6 +1,5 @@ 0001-drop-the-from-the-OSNAME.patch 0001-ignore-utimensat-on-GNU-kFreeBSD.patch bloom-unaligned-bufs -mangle-version excise-tornado no-werror diff --git a/debian/rules b/debian/rules index e4b11d4..dc55496 100755 --- a/debian/rules +++ b/debian/rules @@ -1,11 +1,16 @@ #!/usr/bin/make -f override_dh_auto_configure: + mv lib/bup/_version.py.pre lib/bup/_oldversion.py.pre + cp -p debian/_version.py.pre lib/bup ./configure override_dh_auto_clean: -rm config/config.cmd config/config.h config/config.log config/config.mak config/config.md config/config.sub config/config.vars dh_auto_clean + if test -f lib/bup/_oldversion.py.pre; then \ + mv lib/bup/_oldversion.py.pre lib/bup/_version.py.pre; \ + fi %: dh $@