export: handle new gbp return value
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Fri, 21 Sep 2012 07:29:25 +0000 (10:29 +0300)
committerZhang Qiang <qiang.z.zhang@intel.com>
Fri, 21 Sep 2012 13:14:53 +0000 (21:14 +0800)
GBP now distinguishes tarball/patch generation errors from other errors.
Fixes a problem where GBS thought that all GBP errors where related to
tarball/patch generation, and, possibly printed a misleading warning and
re-tried GBP export in vain.

See #382.

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

index 3a0ad5d..ac3f90b 100644 (file)
@@ -119,7 +119,7 @@ def export_sources(repo, commit, export_dir, spec, opts):
                                       spec, opts)
     try:
         ret = gbp_build(gbp_args)
-        if ret and not is_native_pkg(repo, opts):
+        if ret == 2 and not is_native_pkg(repo, opts):
             # Try falling back to old logic of one monolithic tarball
             msger.warning("Generating upstream tarball and/or generating "\
                           "patches failed. GBS tried this as you have "\