summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2015-02-04 09:27:00 +0000
committerRichard Hughes <richard@hughsie.com>2015-02-04 09:27:24 +0000
commit27251bb5fc3a30866544b405c47d33990bba1781 (patch)
tree6f7b256ba3fb61ca01b62f5fed32870162da5447
parent79f6c0733d134e0ca805fddf26f868dcfc0a3146 (diff)
downloadappstream-glib-27251bb5fc3a30866544b405c47d33990bba1781.tar.gz
Speed up adding extra packages
Do not load the filelist if we're just checking for a common srpm name
-rw-r--r--libappstream-builder/asb-task.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/libappstream-builder/asb-task.c b/libappstream-builder/asb-task.c
index c94d54e..cc681e2 100644
--- a/libappstream-builder/asb-task.c
+++ b/libappstream-builder/asb-task.c
@@ -108,14 +108,11 @@ asb_task_explode_extra_package (AsbTask *task,
if (pkg_extra == NULL)
return TRUE;
+ /* check it's from the same source package */
if (!asb_package_ensure (pkg_extra,
- ASB_PACKAGE_ENSURE_FILES |
- ASB_PACKAGE_ENSURE_DEPS |
ASB_PACKAGE_ENSURE_SOURCE,
error))
return FALSE;
-
- /* check it's from the same source package */
if (require_same_srpm &&
(g_strcmp0 (asb_package_get_source (pkg_extra),
asb_package_get_source (priv->pkg)) != 0))
@@ -127,6 +124,11 @@ asb_task_explode_extra_package (AsbTask *task,
"Adding extra package %s for %s",
asb_package_get_name (pkg_extra),
asb_package_get_name (priv->pkg));
+ if (!asb_package_ensure (pkg_extra,
+ ASB_PACKAGE_ENSURE_FILES |
+ ASB_PACKAGE_ENSURE_DEPS,
+ error))
+ return FALSE;
if (!asb_package_explode (pkg_extra, priv->tmpdir,
asb_context_get_file_globs (priv->ctx),
error))