]> git.michaelhowe.org Git - packages/b/bup.git/commitdiff
give up trying to manage version.py via patch
authorJon Dowland <jmtd@debian.org>
Wed, 16 May 2012 13:36:36 +0000 (14:36 +0100)
committerJon Dowland <jmtd@debian.org>
Wed, 16 May 2012 14:08:37 +0000 (15:08 +0100)
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

debian/_version.py.pre [new file with mode: 0644]
debian/patches/mangle-version [deleted file]
debian/patches/series
debian/rules

diff --git a/debian/_version.py.pre b/debian/_version.py.pre
new file mode 100644 (file)
index 0000000..32b02f4
--- /dev/null
@@ -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 (file)
index b47f70b..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-Description: set version string to that of the git archive
-Author: Jon Dowland <jmtd@debian.org>
-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$'
index 50ccf40517bf74f473dcddd9e25c715e191e1daa..49e8cf396e63bd3972dd31216c92842aa01182a8 100644 (file)
@@ -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
index e4b11d47aeee1fb0098274a1fab3c4b136bcda8b..dc55496f4e0570b338f1222ad2ac1adf871f683c 100755 (executable)
@@ -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 $@