diff options
author | Glenn L McGrath <bug1@ihug.co.nz> | 2001-12-05 04:10:14 +0000 |
---|---|---|
committer | Glenn L McGrath <bug1@ihug.co.nz> | 2001-12-05 04:10:14 +0000 |
commit | 1dbbd2fe3474858668b4b1242a386649ad349061 (patch) | |
tree | d6131c235549b45ae0b666bedb62e174d54760e2 | |
parent | ed8a9be2871bce5bfef43bd2edc645a95098df75 (diff) | |
download | busybox-1dbbd2fe3474858668b4b1242a386649ad349061.tar.gz |
Fail gracefully if package depends on a virtual package.
-rw-r--r-- | archival/dpkg.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/archival/dpkg.c b/archival/dpkg.c index 9a3bff979..9a95eb46a 100644 --- a/archival/dpkg.c +++ b/archival/dpkg.c @@ -989,10 +989,14 @@ int check_deps(deb_file_t **deb_file, int deb_start, int dep_max_count) for (j = 0; j < package_hashtable[deb_file[i]->package]->num_of_edges; j++) { const edge_t *package_edge = package_node->edge[j]; - const unsigned int package_num = search_package_hashtable(package_edge->name, - package_edge->version, package_edge->operator); + unsigned int package_num; + package_num = search_package_hashtable(package_edge->name, package_edge->version, package_edge->operator); + if (package_hashtable[package_num] == NULL) { + error_msg_and_die("Dependency checking failed for package %s\nNOTE: This may be due to busybox dpkg's inability to handle the Provides field, you may avoid dependency checking using the -F option ", name_hashtable[package_edge->name]); + } status_num = search_status_hashtable(name_hashtable[package_hashtable[package_num]->name]); + state_status = get_status(status_num, 3); state_want = get_status(status_num, 1); switch (package_edge->type) { |