[Pkg-libvirt-commits] [libvirt] 02/09: Add script to bump symbol versions

Guido Guenther agx at moszumanska.debian.org
Thu Mar 31 15:05:40 UTC 2016


This is an automated email from the git hooks/post-receive script.

agx pushed a commit to annotated tag debian/1.3.3_rc1-1
in repository libvirt.

commit 0ca24ff03f6382c23995f662b678e457a8394140
Author: Guido Günther <agx at sigxcpu.org>
Date:   Wed Mar 30 21:23:52 2016 +0200

    Add script to bump symbol versions
---
 debian/bump-symbols.py | 46 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)

diff --git a/debian/bump-symbols.py b/debian/bump-symbols.py
new file mode 100755
index 0000000..de63a6e
--- /dev/null
+++ b/debian/bump-symbols.py
@@ -0,0 +1,46 @@
+#!/usr/bin/python
+#
+# Bump symbol versions of libvirt0
+
+# Usage: ./bump-symbol-versions 1.2.16~rc2
+
+import os
+import re
+import sys
+import shutil
+import subprocess
+
+#import gbp.git.GitRepository
+
+symbols_file = 'debian/libvirt0.symbols'
+symbols_new_file = symbols_file + '.new'
+
+symbols = open(symbols_file)
+symbols_new = open('%s.new' % symbols_file, 'w+')
+
+if len(sys.argv) != 2:
+    print >>sys.stderr, "Need a version"
+    sys.exit(1)
+
+version = sys.argv[1]
+s_version = version.split('~', 1)[0]
+
+for line in symbols.readlines():
+    m = re.match('(?P<pre>.*LIBVIRT_(?P<admin>ADMIN_)?PRIVATE_)(?P<v>[a-z0-9.]+) ',
+                 line)
+    if m:
+        if not m.group('admin'):
+            symbols_new.write(' *@LIBVIRT_%s %s\n' % (s_version, version))
+        symbols_new.write("%s%s %s\n" %
+                          (m.group('pre'), s_version, version))
+    else:
+        symbols_new.write(line)
+
+
+symbols.close()
+symbols_new.close()
+
+os.unlink(symbols_file)
+shutil.move(symbols_new_file, symbols_file)
+subprocess.call(['git', 'commit', '-m', 'Bump symbol versions', symbols_file])
+

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libvirt.git



More information about the Pkg-libvirt-commits mailing list