summaryrefslogtreecommitdiff
path: root/lib/libalpm/add.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/add.c')
-rw-r--r--lib/libalpm/add.c37
1 files changed, 0 insertions, 37 deletions
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c
index 9ef83d91..398839a6 100644
--- a/lib/libalpm/add.c
+++ b/lib/libalpm/add.c
@@ -827,43 +827,6 @@ static int commit_single_pkg(pmpkg_t *newpkg, int pkg_current, int pkg_count,
* looking for packages depending on the package to add */
_alpm_pkg_update_requiredby(newpkg);
- /* special case: if our provides list has changed from oldpkg to newpkg AND
- * we get here, we need to make sure we find the actual provision that
- * still satisfies this case, and update its 'requiredby' field... ugh */
- /* TODO this seems really messy and should be taken care of elsewhere */
- alpm_list_t *provdiff, *prov;
- provdiff = alpm_list_diff(alpm_pkg_get_provides(oldpkg),
- alpm_pkg_get_provides(newpkg),
- _alpm_str_cmp);
- for(prov = provdiff; prov; prov = prov->next) {
- const char *provname = prov->data;
- _alpm_log(PM_LOG_DEBUG, "provision '%s' has been removed from package %s (%s => %s)",
- provname, alpm_pkg_get_name(oldpkg),
- alpm_pkg_get_version(oldpkg), alpm_pkg_get_version(newpkg));
-
- alpm_list_t *p = _alpm_db_whatprovides(handle->db_local, provname);
- if(p) {
- /* we now have all the provisions in the local DB for this virtual
- * package... seeing as we can't really determine which is the 'correct'
- * provision, we'll use the FIRST for now.
- * TODO figure out a way to find a "correct" provision */
- pmpkg_t *provpkg = p->data;
- const char *pkgname = alpm_pkg_get_name(provpkg);
- _alpm_log(PM_LOG_DEBUG, "updating '%s' due to provision change (%s)",
- pkgname, provname);
- _alpm_pkg_update_requiredby(provpkg);
-
- if(_alpm_db_write(db, provpkg, INFRQ_DEPENDS)) {
- _alpm_log(PM_LOG_ERROR, _("could not update provision '%s' from '%s'"),
- provname, pkgname);
- alpm_logaction("error: could not update provision '%s' from '%s'",
- provname, pkgname);
- RET_ERR(PM_ERR_DB_WRITE, -1);
- }
- }
- }
- alpm_list_free(provdiff);
-
/* make an install date (in UTC) */
time_t t = time(NULL);
strncpy(newpkg->installdate, asctime(gmtime(&t)), PKG_DATE_LEN);