Skip to content

Commit

Permalink
fix error reporting for virtual package addition
Browse files Browse the repository at this point in the history
Move addition of virtual package after the dependencies have been parsed
as then the reverse dependency structers can be populated correctly.
  • Loading branch information
fabled committed Nov 2, 2018
1 parent 31338af commit b06e3b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/add.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit b06e3b9

Please sign in to comment.