aboutsummaryrefslogtreecommitdiff
path: root/dpkg.c
diff options
context:
space:
mode:
authorbug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277>2001-10-06 02:27:36 +0000
committerbug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277>2001-10-06 02:27:36 +0000
commite8ff5d0fb60617a1a4a18e400120d2fb760773c9 (patch)
treef2ae1ac791bf60eded1d6298161b81efb925e110 /dpkg.c
parentaf25394153d6bde110cd4ca3f030da0e2b6f255d (diff)
downloadbusybox-w32-e8ff5d0fb60617a1a4a18e400120d2fb760773c9.tar.gz
busybox-w32-e8ff5d0fb60617a1a4a18e400120d2fb760773c9.tar.bz2
busybox-w32-e8ff5d0fb60617a1a4a18e400120d2fb760773c9.zip
status_package_num should refer to package not status.
Only initialise a new entry in the status hashtable if it really is a new entry. git-svn-id: svn://busybox.net/trunk/busybox@3498 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'dpkg.c')
-rw-r--r--dpkg.c5
1 files changed, 3 insertions, 2 deletions
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) {