Correctly update the obs_file_hash in offline root mode.
authorgraham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>
Thu, 10 Jun 2010 07:30:28 +0000 (07:30 +0000)
committergraham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>
Thu, 10 Jun 2010 07:30:28 +0000 (07:30 +0000)
git-svn-id: http://opkg.googlecode.com/svn/trunk@533 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

libopkg/opkg_install.c

index f67593d387a72171c33dde86228232c4e626964b..4889ad89d353a0dae60c085d5ede2031bdebe96f 100644 (file)
@@ -174,7 +174,7 @@ update_file_ownership(pkg_t *new_pkg, pkg_t *old_pkg)
                   iter = niter, niter = str_list_next(old_list, niter)) {
               char *old_file = (char *)iter->data;
               pkg_t *owner = file_hash_get_file_owner(old_file);
-              if (owner == old_pkg) {
+              if (!owner || (owner == old_pkg)) {
                    /* obsolete */
                    hash_table_insert(&conf->obs_file_hash, old_file, old_pkg);
               }