diff options
author | Aaron Griffin <aaron@archlinux.org> | 2007-01-03 06:13:08 +0000 |
---|---|---|
committer | Aaron Griffin <aaron@archlinux.org> | 2007-01-03 06:13:08 +0000 |
commit | 50030f778a59394c5aab2ee484e0123f88581fcc (patch) | |
tree | 1ad3c4429a29fd4db0fcbc89240b3618905616f2 /lib/libalpm/add.c | |
parent | 65e086e0e31ff0b09c33adc06fd1a43581f5f36a (diff) | |
download | pacman-50030f778a59394c5aab2ee484e0123f88581fcc.tar.xz |
* Bug fix FS#6058
properly remove entries from "Required By" instead of wiping it out entirely
Diffstat (limited to 'lib/libalpm/add.c')
-rw-r--r-- | lib/libalpm/add.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c index 84bf4c3a..778bb888 100644 --- a/lib/libalpm/add.c +++ b/lib/libalpm/add.c @@ -782,6 +782,7 @@ int _alpm_add_commit(pmtrans_t *trans, pmdb_t *db) _alpm_log(PM_LOG_ERROR, _("could not add entry '%s' in cache"), info->name); } + /* XXX: This is copy-pasta from remove.c - refactor */ /* update dependency packages' REQUIREDBY fields */ if(info->depends) { _alpm_log(PM_LOG_FLOW2, _("updating dependency packages 'requiredby' fields")); @@ -810,6 +811,10 @@ int _alpm_add_commit(pmtrans_t *trans, pmdb_t *db) continue; } } + + /* Ensure package has the right info */ + _alpm_db_read(db, INFRQ_DEPENDS, depinfo); + _alpm_log(PM_LOG_DEBUG, _("adding '%s' in requiredby field for '%s'"), info->name, depinfo->name); depinfo->requiredby = _alpm_list_add(depinfo->requiredby, strdup(info->name)); if(_alpm_db_write(db, depinfo, INFRQ_DEPENDS)) { |