From a9fbb5923f32dd5bc65cabc826374b5b6413abde Mon Sep 17 00:00:00 2001 From: Hans van Kranenburg Date: Fri, 26 Jan 2018 03:38:52 +0100 Subject: [PATCH] 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 --- debian/bin/genorig.py | 5 +++++ 1 file changed, 5 insertions(+) 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) -- 2.30.2