summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/deps.c
diff options
context:
space:
mode:
authorNagy Gabor <ngaba@bibl.u-szeged.hu>2008-07-08 10:07:05 +0200
committerDan McGee <dan@archlinux.org>2008-07-13 16:16:55 +0200
commitfd8969f67875ad6854725165b9530f4be26c5d96 (patch)
treefe3d41322943efa8167076fafecb80d83de04558 /lib/libalpm/deps.c
parentf724fb27022551e536496f8f99bc4be33b4ce3b7 (diff)
downloadpacman-fd8969f67875ad6854725165b9530f4be26c5d96.tar.gz
pacman-fd8969f67875ad6854725165b9530f4be26c5d96.tar.xz
sync_addtarget rework
Now '-S provision' handling is done in the back-end. In case of multiple providers, the first one is selected (behavior change: deleted provision002.py). The old processing order was: literal, group, provision; the new one: literal, provision, group. This is more rational, but "pacman -S group" will be slower now. "pacman -S repo/provision" also works. Provision was generalized to dependencies, so you can resolve deps by hand: "pacman -S 'bash>2.0'" or "pacman -S 'core/bash>2.0'" etc. This can be useful in makepkg dependency resolving. The changes were documented in pacman manual. alpm_find_pkg_satisfiers and _alpm_find_dep_satisfiers functions were removed, since they are no longer needed. I added some verbosity to "select provider instead of literal" and "fallback to group". Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/deps.c')
-rw-r--r--lib/libalpm/deps.c28
1 files changed, 2 insertions, 26 deletions
diff --git a/lib/libalpm/deps.c b/lib/libalpm/deps.c
index ab027074..0f3f45c8 100644
--- a/lib/libalpm/deps.c
+++ b/lib/libalpm/deps.c
@@ -202,32 +202,6 @@ pmpkg_t *_alpm_find_dep_satisfier(alpm_list_t *pkgs, pmdepend_t *dep)
return(NULL);
}
-alpm_list_t *_alpm_find_dep_satisfiers(alpm_list_t *pkgs, pmdepend_t *dep)
-{
- alpm_list_t *i, *ret = NULL;
-
- for(i = pkgs; i; i = alpm_list_next(i)) {
- pmpkg_t *pkg = i->data;
- if(alpm_depcmp(pkg, dep)) {
- ret = alpm_list_add(ret, pkg);
- }
- }
- return(ret);
-}
-
-/** Find packages in a list that provide a given package.
- * @param pkgs an alpm_list_t* of package to search
- * @param pkgname the name of the package
- * @return an alpm_list_t* of packages that provide pkgname
- */
-alpm_list_t SYMEXPORT *alpm_find_pkg_satisfiers(alpm_list_t *pkgs, const char *pkgname)
-{
- pmdepend_t *dep = _alpm_splitdep(pkgname);
- alpm_list_t *res = _alpm_find_dep_satisfiers(pkgs, dep);
- _alpm_dep_free(dep);
- return(res);
-}
-
/** Checks dependencies and returns missing ones in a list.
* Dependencies can include versions with depmod operators.
* @param db pointer to the local package database
@@ -567,6 +541,8 @@ pmpkg_t *_alpm_resolvedep(pmdepend_t *dep, alpm_list_t *dbs, alpm_list_t *exclud
continue;
}
}
+ _alpm_log(PM_LOG_WARNING, _("provider package was selected (%s provides %s)\n"),
+ pkg->name, dep->name);
return(pkg);
}
}