index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Nagy Gabor <ngaba@petra.hos.u-szeged.hu> | 2007-07-16 20:58:58 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2007-08-20 15:23:53 -0400 |
commit | b1808930ce45a034981626fc20bbc7920890899e (patch) | |
tree | 7bdcb9fe684c0a9f508abe4503cc93c8ae31b2b5 /lib/libalpm/add.c | |
parent | 17d9122e01f5a675f4c7882e68ceae65aae7b5aa (diff) |
-rw-r--r-- | lib/libalpm/add.c | 37 |
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); |