deb: minor refactor of parameters of symlink_orig()
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Thu, 12 Jan 2012 13:24:04 +0000 (15:24 +0200)
committerGuido Günther <agx@sigxcpu.org>
Sun, 15 Jan 2012 18:52:01 +0000 (19:52 +0100)
gbp/deb/__init__.py [changed mode: 0644->0755]
gbp/scripts/buildpackage.py [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index dc3ba8b..1f52b17
@@ -437,9 +437,9 @@ def has_orig(cp, compression, dir):
         return False
     return True
 
-def symlink_orig(cp, compression, orig_dir, output_dir, force=False):
+def symlink_orig(orig_file, orig_dir, output_dir, force=False):
     """
-    symlink orig.tar.gz from orig_dir to output_dir
+    symlink orig tarball from orig_dir to output_dir
     @return: True if link was created or src == dst
              False in case of error or src doesn't exist
     """
@@ -449,8 +449,8 @@ def symlink_orig(cp, compression, orig_dir, output_dir, force=False):
     if orig_dir == output_dir:
         return True
 
-    src = os.path.join(orig_dir, orig_file(cp, compression))
-    dst = os.path.join(output_dir, orig_file(cp, compression))
+    src = os.path.join(orig_dir, orig_file)
+    dst = os.path.join(output_dir, orig_file)
     if not os.access(src, os.F_OK):
         return False
     try:
old mode 100644 (file)
new mode 100755 (executable)
index 8b98e0b..1c166a8
@@ -141,7 +141,7 @@ def prepare_upstream_tarball(repo, cp, options, tarball_dir, output_dir):
     # look in tarball_dir first, if found force a symlink to it
     if options.tarball_dir:
         gbp.log.debug("Looking for orig tarball '%s' at '%s'" % (orig_file, tarball_dir))
-        if not du.symlink_orig(cp, options.comp_type, tarball_dir, output_dir, force=True):
+        if not du.symlink_orig(orig_file, tarball_dir, output_dir, force=True):
             gbp.log.info("Orig tarball '%s' not found at '%s'" % (orig_file, tarball_dir))
         else:
             gbp.log.info("Orig tarball '%s' found at '%s'" % (orig_file, tarball_dir))