aboutsummaryrefslogtreecommitdiff
path: root/archival/dpkg.c
diff options
context:
space:
mode:
Diffstat (limited to 'archival/dpkg.c')
-rw-r--r--archival/dpkg.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/archival/dpkg.c b/archival/dpkg.c
index 508b4297b..c37ae3349 100644
--- a/archival/dpkg.c
+++ b/archival/dpkg.c
@@ -30,7 +30,7 @@
30 30
31#include "libbb.h" 31#include "libbb.h"
32#include <fnmatch.h> 32#include <fnmatch.h>
33#include "unarchive.h" 33#include "archive.h"
34 34
35/* note: if you vary hash_prime sizes be aware, 35/* note: if you vary hash_prime sizes be aware,
36 * 1) tweaking these will have a big effect on how much memory this program uses. 36 * 1) tweaking these will have a big effect on how much memory this program uses.
@@ -939,8 +939,8 @@ static int package_satisfies_dependency(int package, int depend_type)
939 return 0; 939 return 0;
940 940
941 switch (depend_type) { 941 switch (depend_type) {
942 case EDGE_PRE_DEPENDS: return get_status(status_num, 3) == search_name_hashtable("installed"); 942 case EDGE_PRE_DEPENDS: return get_status(status_num, 3) == search_name_hashtable("installed");
943 case EDGE_DEPENDS: return get_status(status_num, 1) == search_name_hashtable("install"); 943 case EDGE_DEPENDS: return get_status(status_num, 1) == search_name_hashtable("install");
944 } 944 }
945 return 0; 945 return 0;
946} 946}
@@ -967,7 +967,7 @@ static int check_deps(deb_file_t **deb_file, int deb_start /*, int dep_max_count
967 conflicts[conflicts_num] = package_num; 967 conflicts[conflicts_num] = package_num;
968 conflicts_num++; 968 conflicts_num++;
969 /* add provides to conflicts list */ 969 /* add provides to conflicts list */
970 for (j = 0; j < package_hashtable[package_num]->num_of_edges; j++) { 970 for (j = 0; j < package_hashtable[package_num]->num_of_edges; j++) {
971 if (package_hashtable[package_num]->edge[j]->type == EDGE_PROVIDES) { 971 if (package_hashtable[package_num]->edge[j]->type == EDGE_PROVIDES) {
972 const int conflicts_package_num = search_package_hashtable( 972 const int conflicts_package_num = search_package_hashtable(
973 package_hashtable[package_num]->edge[j]->name, 973 package_hashtable[package_num]->edge[j]->name,
@@ -1067,12 +1067,13 @@ static int check_deps(deb_file_t **deb_file, int deb_start /*, int dep_max_count
1067 1067
1068 if (package_edge->type == EDGE_OR_PRE_DEPENDS 1068 if (package_edge->type == EDGE_OR_PRE_DEPENDS
1069 || package_edge->type == EDGE_OR_DEPENDS 1069 || package_edge->type == EDGE_OR_DEPENDS
1070 ) { /* start an EDGE_OR_ list */ 1070 ) {
1071 /* start an EDGE_OR_ list */
1071 number_of_alternatives = package_edge->version; 1072 number_of_alternatives = package_edge->version;
1072 root_of_alternatives = package_edge; 1073 root_of_alternatives = package_edge;
1073 continue; 1074 continue;
1074 } 1075 }
1075 if (number_of_alternatives == 0) { /* not in the middle of an EDGE_OR_ list */ 1076 if (number_of_alternatives == 0) { /* not in the middle of an EDGE_OR_ list */
1076 number_of_alternatives = 1; 1077 number_of_alternatives = 1;
1077 root_of_alternatives = NULL; 1078 root_of_alternatives = NULL;
1078 } 1079 }