summaryrefslogtreecommitdiff
path: root/src/app_manifest.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/app_manifest.c')
-rw-r--r--src/app_manifest.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/app_manifest.c b/src/app_manifest.c
index cd5b2ef..e476872 100644
--- a/src/app_manifest.c
+++ b/src/app_manifest.c
@@ -100,23 +100,25 @@ static void process_file(struct apk_database *db, const char *match)
if (r < 0) apk_error("%s: %s", match, apk_error_str(r));
}
-static void process_match(struct apk_database *db, const char *match, struct apk_name *name, void *ctx)
+static int process_match(struct apk_database *db, const char *match, struct apk_name *name, void *ctx)
{
struct apk_provider *p;
- if (name == NULL)
- {
+ if (!name) {
process_file(db, match);
- return;
+ return 0;
}
foreach_array_item(p, name->providers)
process_package(db, p->pkg);
+
+ return 0;
}
static int manifest_main(void *ctx, struct apk_database *db, struct apk_string_array *args)
{
- apk_name_foreach_matching(db, args, apk_foreach_genid(), process_match, NULL);
+ if (!args->num) return 0;
+ apk_db_foreach_sorted_name(db, args, process_match, NULL);
return 0;
}