debian/bin/genorig.py: hard link orig tar
authorHans van Kranenburg <hans@knorrie.org>
Fri, 23 Feb 2018 20:11:19 +0000 (21:11 +0100)
committerHans van Kranenburg <hans@knorrie.org>
Wed, 28 Feb 2018 23:18:51 +0000 (00:18 +0100)
When building with pbuilder, I end up with a dangling symlink in my
result directory. Why not just hard link it...

debian/bin/genorig.py

index c0f2846f1cb0a1264f4c1875679ee2023c836d11..680042187753f06114aaf83e6ecb9f712964ed5f 100755 (executable)
@@ -81,7 +81,7 @@ class Main(object):
         except Exception: pass
 
         try:
-            os.symlink(os.path.join('orig', self.orig_tar), os.path.join('..', self.orig_tar))
+            os.link(os.path.join('..', 'orig', self.orig_tar), os.path.join('..', self.orig_tar))
         except OSError:
             pass