From: Hans van Kranenburg Date: Wed, 20 Dec 2017 15:02:45 +0000 (+0100) Subject: debian/bin/genorig.py: repair build orig from repo X-Git-Tag: archive/raspbian/4.11.1-1+rpi1~1^2~123 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=85da0732b392478748f84c6ce5e2587d27565e7a;p=xen.git debian/bin/genorig.py: repair build orig from repo By picking up the repo provided to the script and kicking the git archive process into that direction, we can at least do this now: ~/build/xen/debian-xen (master) 6-$ debian/bin/genorig.py ~/src/git/xen Generate tarball ../orig/xen_4.9.1.orig.tar.xz ...given that the newest changelog entry is e.g. 4.9.1-1 There's probably more things that can be improved in here, but let's take one step at a time. --- diff --git a/debian/bin/genorig.py b/debian/bin/genorig.py index e9fcd194c8..74aacd8fdc 100755 --- a/debian/bin/genorig.py +++ b/debian/bin/genorig.py @@ -17,6 +17,7 @@ class Main(object): def __init__(self, options, repo): self.options = options + self.repo = repo self.changelog_entry = Changelog(version=VersionXen)[0] self.source = self.changelog_entry.source @@ -46,7 +47,8 @@ class Main(object): try: with open(out, 'wb') as f: tag = self.options.tag or 'HEAD' - p1 = subprocess.Popen(('git', 'archive', '--prefix', '%s/' % self.orig_dir, tag), stdout=subprocess.PIPE) + _cmd = ('git', 'archive', '--prefix', '%s/' % self.orig_dir, tag) + p1 = subprocess.Popen(_cmd, stdout=subprocess.PIPE, cwd=self.repo) subprocess.check_call(('xz', ), stdin=p1.stdout, stdout=f) if p1.wait(): raise RuntimeError