X-Git-Url: https://git.librecmc.org/?p=oweals%2Fopkg-lede.git;a=blobdiff_plain;f=libopkg%2Fpkg_hash.c;h=976ec96e28a979e0e9096bf920aa3268306e0d35;hp=e92a56f0de8e34db701472ec32f3079180eea4a4;hb=f032fb5b8c7c73531257331dc1b5489147ca0c85;hpb=f286ba3011c06919664acfbf1d03b1073175e819 diff --git a/libopkg/pkg_hash.c b/libopkg/pkg_hash.c index e92a56f..976ec96 100644 --- a/libopkg/pkg_hash.c +++ b/libopkg/pkg_hash.c @@ -559,10 +559,8 @@ pkg_t *hash_insert_pkg(hash_table_t *hash, pkg_t *pkg, int set_status,opkg_conf_ arch_priority = pkg->arch_priority; - if (buildDepends(hash, pkg)<0){ - fprintf(stderr, "%s : This should never happen. Report this Bug in bugzilla please \n ",__FUNCTION__); - return NULL; - } + buildDepends(hash, pkg); + ab_pkg = ensure_abstract_pkg_by_name(hash, pkg->name); if (set_status) { @@ -576,20 +574,13 @@ pkg_t *hash_insert_pkg(hash_table_t *hash, pkg_t *pkg, int set_status,opkg_conf_ if(!ab_pkg->pkgs) ab_pkg->pkgs = pkg_vec_alloc(); - if (buildProvides(hash, ab_pkg, pkg)<0){ - fprintf(stderr, "%s : This should never happen. Report this Bug in bugzilla please \n ",__FUNCTION__); - return NULL; - } + buildProvides(hash, ab_pkg, pkg); + /* need to build the conflicts graph before replaces for correct calculation of replaced_by relation */ - if (buildConflicts(hash, ab_pkg, pkg)<0){ - fprintf(stderr, "%s : This should never happen. Report this Bug in bugzilla please \n ",__FUNCTION__); - return NULL; - } - if (buildReplaces(hash, ab_pkg, pkg)<0) { - fprintf(stderr, "%s : This should never happen. Report this Bug in bugzilla please \n ",__FUNCTION__); - return NULL; - } - + buildConflicts(hash, ab_pkg, pkg); + + buildReplaces(hash, ab_pkg, pkg); + buildDependedUponBy(pkg, ab_pkg); /* pkg_vec_insert_merge might munge package, but it returns an unmunged pkg */