summaryrefslogtreecommitdiffstats
path: root/lib/libalpm
diff options
context:
space:
mode:
authorChantry Xavier <shiningxc@gmail.com>2008-01-14 20:28:29 +0100
committerDan McGee <dan@archlinux.org>2008-01-14 22:03:03 -0600
commit0c5b68877b107f4844f29eb77a9ea5bf7b73fe01 (patch)
tree6908dd557033cc9547a060b0903ebf673f870d24 /lib/libalpm
parent6eee9e987a2dc6eba183f61fb596b7e0b8cc1645 (diff)
downloadpacman-0c5b68877b107f4844f29eb77a9ea5bf7b73fe01.tar.xz
Change the versioned provision format.
Change the 'provname provver' format to 'provname=provver'. In .PKGINFO, the provisions are copied from the PKGBUILD without quotes. So the provision version was actually handled as a different provision... See FS#9171. Dan: Unfortunately we have to change our original specification for versioned provisions with this patch, but it ends up being the simpler and cleaner solution in the long run, and if there is any time to change it the time is now before many packages have been built. Keeping the ' ' based format would have required us to do special parsing in repo-add, as well as being susceptible to users not using quotes in their provides array. Hopefully this will resolve the issues we had with our initial plan. Sorry for the confusion. Acked-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/db.c2
-rw-r--r--lib/libalpm/deps.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/libalpm/db.c b/lib/libalpm/db.c
index d8e770b8..1485c34a 100644
--- a/lib/libalpm/db.c
+++ b/lib/libalpm/db.c
@@ -650,7 +650,7 @@ int _alpm_prov_cmp(const void *provision, const void *needle)
char *tmpptr;
char *provname = strdup(provision);
int retval = 0;
- tmpptr = strchr(provname, ' ');
+ tmpptr = strchr(provname, '=');
if(tmpptr != NULL) { /* provision-version */
*tmpptr='\0';
diff --git a/lib/libalpm/deps.c b/lib/libalpm/deps.c
index 8c302b69..ec52083e 100644
--- a/lib/libalpm/deps.c
+++ b/lib/libalpm/deps.c
@@ -336,10 +336,10 @@ int SYMEXPORT alpm_depcmp(pmpkg_t *pkg, pmdepend_t *dep)
satisfy = (strcmp(pkgname, dep->name) == 0
&& dep_vercmp(pkgversion, dep->mod, dep->version));
- /* check provisions, format : "name version" */
+ /* check provisions, format : "name=version" */
for(i = alpm_pkg_get_provides(pkg); i && !satisfy; i = i->next) {
char *provname = strdup(i->data);
- char *provver = strchr(provname, ' ');
+ char *provver = strchr(provname, '=');
if(provver == NULL) { /* no provision version */
satisfy = (dep->mod == PM_DEP_MOD_ANY