cmd_import: conform to new API of git-buildpackage
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Wed, 11 Jul 2012 12:28:25 +0000 (15:28 +0300)
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Fri, 10 Aug 2012 13:37:09 +0000 (16:37 +0300)
git-import-srpm automatically detects unpacked srpms. Also, prevent it
from automatically applying patches (to match the old behaviour).

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
gitbuildsys/cmd_import.py

index 5623cac..8d3b52a 100644 (file)
@@ -42,11 +42,8 @@ def do(opts, args):
     params = ["argv[0] placeholder", "--packaging-dir=packaging",
               "--upstream-branch=%s" % opts.upstream_branch, args[0]]
 
-    if args[0].endswith('.src.rpm'):
-        if gbp_import_srpm(params):
-            msger.error("Failed to import %s" % args[0])
-    elif args[0].endswith('.spec'):
-        params.insert(1, "--unpacked")
+    if args[0].endswith('.src.rpm') or args[0].endswith('.spec'):
+        params.append("--no-patch-import")
         if gbp_import_srpm(params):
             msger.error("Failed to import %s" % args[0])
     else: