Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/db.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/db.c')
-rw-r--r--lib/libalpm/db.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/libalpm/db.c b/lib/libalpm/db.c
index a44e079d..ab828614 100644
--- a/lib/libalpm/db.c
+++ b/lib/libalpm/db.c
@@ -71,7 +71,7 @@ pmdb_t *_alpm_db_new(const char *root, const char *dbpath, const char *treename)
FREE(db);
RET_ERR(PM_ERR_MEMORY, NULL);
}
- sprintf(db->path, "%s%s%s", root, dbpath, treename);
+ sprintf(db->path, "%s%s%s/", root, dbpath, treename);
STRNCPY(db->treename, treename, PATH_MAX);
@@ -115,23 +115,23 @@ alpm_list_t *_alpm_db_search(pmdb_t *db, alpm_list_t *needles)
RET_ERR(PM_ERR_INVALID_REGEX, NULL);
}
- for(j = _alpm_db_get_pkgcache(db, INFRQ_DESC|INFRQ_DEPENDS); j; j = j->next) {
+ for(j = _alpm_db_get_pkgcache(db); j; j = j->next) {
pmpkg_t *pkg = j->data;
- char *matched = NULL;
+ const char *matched = NULL;
/* check name */
- if (regexec(&reg, pkg->name, 0, 0, 0) == 0) {
- matched = pkg->name;
+ if (regexec(&reg, alpm_pkg_get_name(pkg), 0, 0, 0) == 0) {
+ matched = alpm_pkg_get_name(pkg);
}
/* check desc */
- else if (regexec(&reg, pkg->desc, 0, 0, 0) == 0) {
- matched = pkg->desc;
+ else if (regexec(&reg, alpm_pkg_get_desc(pkg), 0, 0, 0) == 0) {
+ matched = alpm_pkg_get_desc(pkg);
}
/* check provides */
/* TODO: should we be doing this, and should we print something
* differently when we do match it since it isn't currently printed? */
else {
- for(k = pkg->provides; k; k = k->next) {
+ for(k = alpm_pkg_get_provides(pkg); k; k = k->next) {
if (regexec(&reg, k->data, 0, 0, 0) == 0) {
matched = k->data;
break;