[Pkg-xen-changes] [xen] 01/03: genorig.py: Extract version from changelog by default

Ian Campbell ijc-guest at moszumanska.debian.org
Mon Jul 7 09:59:59 UTC 2014


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

ijc-guest pushed a commit to branch feature/genorig
in repository xen.

commit c94ee9d4ef5ae685dbc176ae6a2be3e94d7250f3
Author: Ian Campbell <ijc at hellion.org.uk>
Date:   Fri Jul 4 11:16:15 2014 +0100

    genorig.py: Extract version from changelog by default
---
 debian/bin/genorig.py | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/debian/bin/genorig.py b/debian/bin/genorig.py
index 4891ebd..d366579 100755
--- a/debian/bin/genorig.py
+++ b/debian/bin/genorig.py
@@ -43,11 +43,10 @@ class Main(object):
 
         self.changelog_entry = Changelog(version=VersionXen)[0]
         self.source = self.changelog_entry.source
+        self.version = self.changelog_entry.version
 
-        if options.version:
-            self.version = options.version
-        else:
-            raise NotImplementedError
+        if options.override_version:
+            self.version = VersionXen('%s-0' % options.override_version)
 
         if os.path.exists(os.path.join(repo, '.hg')):
             self.repo = RepoHg(repo, options)
@@ -58,10 +57,10 @@ class Main(object):
 
         if options.component:
             self.orig_dir = options.component
-            self.orig_tar = '%s_%s.orig-%s.tar.gz' % (self.source, self.version, options.component)
+            self.orig_tar = '%s_%s.orig-%s.tar.gz' % (self.source, self.version.upstream, options.component)
         else:
-            self.orig_dir = '%s-%s' % (self.source, self.version)
-            self.orig_tar = '%s_%s.orig.tar.gz' % (self.source, self.version)
+            self.orig_dir = '%s-%s' % (self.source, self.version.upstream)
+            self.orig_tar = '%s_%s.orig.tar.gz' % (self.source, self.version.upstream)
 
     def __call__(self):
         import tempfile
@@ -93,7 +92,7 @@ if __name__ == '__main__':
     p = OptionParser(prog=sys.argv[0], usage='%prog [OPTION]... DIR')
     p.add_option('-c', '--component', dest='component')
     p.add_option('-t', '--tag', dest='tag')
-    p.add_option('-v', '--version', dest='version')
+    p.add_option('-V', '--override-version', dest='override_version')
     options, args = p.parse_args()
     if len(args) != 1:
         raise RuntimeError

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



More information about the Pkg-xen-changes mailing list