From: Hans van Kranenburg Date: Fri, 26 Jan 2018 02:38:52 +0000 (+0100) Subject: debian/bin/genorig.py: mkdir ../orig X-Git-Tag: archive/raspbian/4.11.1-1+rpi1~1^2~113 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=a9fbb5923f32dd5bc65cabc826374b5b6413abde;p=xen.git debian/bin/genorig.py: mkdir ../orig First time someone does this the directory does not exist and you get an ugly error. I copied this from the debian kernel genorig.py. Note: currently my biggest annoyance with the placement of the orig file in ../orig and the symlink to it is that if I run pbuilder, I will end up with a symlink pointing nowhere in my pbuilder result location instead of the actual orig, which makes including it into reprepro bork of course. For now, I'm making minimal changes to this. We can improve and change it later. But this change prevents more lines in the README.source for now. Signed-off-by: Hans van Kranenburg --- diff --git a/debian/bin/genorig.py b/debian/bin/genorig.py index 8b4614028d..5a0d435f69 100755 --- a/debian/bin/genorig.py +++ b/debian/bin/genorig.py @@ -52,6 +52,11 @@ class Main(object): raise RuntimeError("Destination already exists") except OSError: pass + try: + os.mkdir("../orig") + except OSError: + pass + try: with open(out, 'wb') as f: _cmd = ('git', 'archive', '--prefix', '%s/' % self.orig_dir, treeish)