summaryrefslogtreecommitdiff
path: root/lib/libalpm/remove.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2007-11-12 19:40:08 -0600
committerDan McGee <dan@archlinux.org>2007-11-14 18:49:50 -0600
commit7219326dd4d01d7e49b8a40746f5495c1c329c9c (patch)
tree01cefb7c433105ba88850dc272ea7791d9954c0b /lib/libalpm/remove.c
parentf5fcaf0b3c8d05e94d08d6357324cfa69d8ceae7 (diff)
downloadpacman-7219326dd4d01d7e49b8a40746f5495c1c329c9c.tar.xz
Remove REQUIREDBY usage from libalpm
Instead of using the often-busted REQUIREDBY entries in the pacman database, compute them each time they are required. This should help many things: 1. Simplify the codebase 2. Prevent future database corruption 3. Ensure when we do use requiredby, it is always correct 4. Shrink the pmpkg_t memory overhead Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/remove.c')
-rw-r--r--lib/libalpm/remove.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/libalpm/remove.c b/lib/libalpm/remove.c
index 86cfee68..66a1527c 100644
--- a/lib/libalpm/remove.c
+++ b/lib/libalpm/remove.c
@@ -249,7 +249,7 @@ static void unlink_file(pmpkg_t *info, alpm_list_t *lp, pmtrans_t *trans)
int _alpm_remove_commit(pmtrans_t *trans, pmdb_t *db)
{
- pmpkg_t *info, *infodup;
+ pmpkg_t *info;
alpm_list_t *targ, *lp;
int pkg_count;
@@ -331,9 +331,6 @@ int _alpm_remove_commit(pmtrans_t *trans, pmdb_t *db)
}
}
- /* duplicate the package so we can remove the requiredby fields later */
- infodup = _alpm_pkg_dup(info);
-
/* remove the package from the database */
_alpm_log(PM_LOG_DEBUG, "updating database\n");
_alpm_log(PM_LOG_DEBUG, "removing database entry '%s'\n", pkgname);
@@ -347,10 +344,6 @@ int _alpm_remove_commit(pmtrans_t *trans, pmdb_t *db)
pkgname);
}
- /* update dependency packages' REQUIREDBY fields */
- _alpm_trans_update_depends(trans, infodup);
- _alpm_pkg_free(infodup);
-
/* call a done event if this isn't an upgrade */
if(trans->type != PM_TRANS_TYPE_REMOVEUPGRADE) {
EVENT(trans, PM_TRANS_EVT_REMOVE_DONE, info, NULL);