export: add force_native argument to create_gbp_export_args()
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Mon, 29 Sep 2014 08:45:54 +0000 (11:45 +0300)
committerLi Jinjing <jinjingx.li@intel.com>
Wed, 8 Oct 2014 16:27:44 +0000 (00:27 +0800)
Re-introduce this argument to make it possible to fallback to native
packaging mode.

Change-Id: If520d1502654d9639db6b3f6a2d79f457c4cecd5
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
gitbuildsys/cmd_export.py

index e5ad913..772e190 100644 (file)
@@ -91,7 +91,7 @@ def untrack_export_branches(repo, branches):
         repo.delete_branch(branch)
 
 def create_gbp_export_args(repo, commit, export_dir, tmp_dir, spec, args,
-                           create_tarball=True):
+                           force_native=False, create_tarball=True):
     """
     Construct the cmdline argument list for git-buildpackage export
     """
@@ -148,7 +148,7 @@ def create_gbp_export_args(repo, commit, export_dir, tmp_dir, spec, args,
         argv.append("--git-no-create-orig")
     if args.debug:
         argv.append("--git-verbose")
-    if is_native_pkg(repo, args) or args.no_patch_export:
+    if force_native or is_native_pkg(repo, args) or args.no_patch_export:
         argv.extend(["--git-no-patch-export",
                      "--git-upstream-tree=%s" % commit])
     else: