aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--archival/dpkg.c5
-rw-r--r--dpkg.c5
2 files changed, 6 insertions, 4 deletions
diff --git a/archival/dpkg.c b/archival/dpkg.c
index 9c8fffa9c..845cfa67b 100644
--- a/archival/dpkg.c
+++ b/archival/dpkg.c
@@ -1262,7 +1262,7 @@ void unpack_package(deb_file_t *deb_file)
1262{ 1262{
1263 const char *package_name = name_hashtable[package_hashtable[deb_file->package]->name]; 1263 const char *package_name = name_hashtable[package_hashtable[deb_file->package]->name];
1264 const unsigned int status_num = search_status_hashtable(package_name); 1264 const unsigned int status_num = search_status_hashtable(package_name);
1265 const unsigned int status_package_num = status_hashtable[status_num]->status; 1265 const unsigned int status_package_num = status_hashtable[status_num]->package;
1266 1266
1267 FILE *out_stream; 1267 FILE *out_stream;
1268 char *info_prefix; 1268 char *info_prefix;
@@ -1413,13 +1413,14 @@ extern int dpkg_main(int argc, char **argv)
1413 1413
1414 /* Try and find a currently installed version of this package */ 1414 /* Try and find a currently installed version of this package */
1415 status_num = search_status_hashtable(name_hashtable[package_hashtable[deb_file[deb_count]->package]->name]); 1415 status_num = search_status_hashtable(name_hashtable[package_hashtable[deb_file[deb_count]->package]->name]);
1416 /* If no previous entry was found initialise a new entry */
1416 if ((status_hashtable[status_num] == NULL) || 1417 if ((status_hashtable[status_num] == NULL) ||
1417 (status_hashtable[status_num]->status == 0)) { 1418 (status_hashtable[status_num]->status == 0)) {
1418 /* reinstreq isnt changed to "ok" until the package control info 1419 /* reinstreq isnt changed to "ok" until the package control info
1419 * is written to the status file*/ 1420 * is written to the status file*/
1420 status_node->status = search_name_hashtable("install reinstreq not-installed"); 1421 status_node->status = search_name_hashtable("install reinstreq not-installed");
1422 status_hashtable[status_num] = status_node;
1421 } 1423 }
1422 status_hashtable[status_num] = status_node;
1423 } 1424 }
1424 } 1425 }
1425 else if (dpkg_opt & dpkg_opt_package_name) { 1426 else if (dpkg_opt & dpkg_opt_package_name) {
diff --git a/dpkg.c b/dpkg.c
index 9c8fffa9c..845cfa67b 100644
--- a/dpkg.c
+++ b/dpkg.c
@@ -1262,7 +1262,7 @@ void unpack_package(deb_file_t *deb_file)
1262{ 1262{
1263 const char *package_name = name_hashtable[package_hashtable[deb_file->package]->name]; 1263 const char *package_name = name_hashtable[package_hashtable[deb_file->package]->name];
1264 const unsigned int status_num = search_status_hashtable(package_name); 1264 const unsigned int status_num = search_status_hashtable(package_name);
1265 const unsigned int status_package_num = status_hashtable[status_num]->status; 1265 const unsigned int status_package_num = status_hashtable[status_num]->package;
1266 1266
1267 FILE *out_stream; 1267 FILE *out_stream;
1268 char *info_prefix; 1268 char *info_prefix;
@@ -1413,13 +1413,14 @@ extern int dpkg_main(int argc, char **argv)
1413 1413
1414 /* Try and find a currently installed version of this package */ 1414 /* Try and find a currently installed version of this package */
1415 status_num = search_status_hashtable(name_hashtable[package_hashtable[deb_file[deb_count]->package]->name]); 1415 status_num = search_status_hashtable(name_hashtable[package_hashtable[deb_file[deb_count]->package]->name]);
1416 /* If no previous entry was found initialise a new entry */
1416 if ((status_hashtable[status_num] == NULL) || 1417 if ((status_hashtable[status_num] == NULL) ||
1417 (status_hashtable[status_num]->status == 0)) { 1418 (status_hashtable[status_num]->status == 0)) {
1418 /* reinstreq isnt changed to "ok" until the package control info 1419 /* reinstreq isnt changed to "ok" until the package control info
1419 * is written to the status file*/ 1420 * is written to the status file*/
1420 status_node->status = search_name_hashtable("install reinstreq not-installed"); 1421 status_node->status = search_name_hashtable("install reinstreq not-installed");
1422 status_hashtable[status_num] = status_node;
1421 } 1423 }
1422 status_hashtable[status_num] = status_node;
1423 } 1424 }
1424 } 1425 }
1425 else if (dpkg_opt & dpkg_opt_package_name) { 1426 else if (dpkg_opt & dpkg_opt_package_name) {