Commit b06e3b99 authored by Timo Teräs's avatar Timo Teräs

fix error reporting for virtual package addition

Move addition of virtual package after the dependencies have been parsed
as then the reverse dependency structers can be populated correctly.
parent 31338aff
......@@ -116,7 +116,6 @@ static int add_main(void *ctx, struct apk_database *db, struct apk_string_array
virtpkg->version = apk_blob_atomize(APK_BLOB_STR("0"));
virtpkg->description = strdup("virtual meta package");
virtpkg->arch = apk_blob_atomize(APK_BLOB_STR("noarch"));
virtpkg = apk_db_pkg_add(db, virtpkg);
}
foreach_array_item(parg, args) {
......@@ -160,6 +159,7 @@ static int add_main(void *ctx, struct apk_database *db, struct apk_string_array
}
}
if (virtpkg) {
virtpkg = apk_db_pkg_add(db, virtpkg);
apk_deps_add(&world, &virtdep);
apk_solver_set_name_flags(virtdep.name,
actx->solver_flags,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment