Commit 293762ea authored by Andrew Gregory's avatar Andrew Gregory Committed by Allan McRae
Browse files

query: only strip leading local/ for db packages


Signed-off-by: default avatarAndrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae's avatarAllan McRae <allan@archlinux.org>
parent 40583ebe
......@@ -468,11 +468,6 @@ int pacman_query(alpm_list_t *targets)
for(i = targets; i; i = alpm_list_next(i)) {
const char *strname = i->data;
/* strip leading part of "local/pkgname" */
if(strncmp(strname, LOCAL_PREFIX, strlen(LOCAL_PREFIX)) == 0) {
strname += strlen(LOCAL_PREFIX);
}
if(config->op_q_isfile) {
alpm_pkg_load(config->handle, strname, 1, 0, &pkg);
......@@ -482,6 +477,11 @@ int pacman_query(alpm_list_t *targets)
alpm_strerror(alpm_errno(config->handle)));
}
} else {
/* strip leading part of "local/pkgname" */
if(strncmp(strname, LOCAL_PREFIX, strlen(LOCAL_PREFIX)) == 0) {
strname += strlen(LOCAL_PREFIX);
}
pkg = alpm_db_get_pkg(db_local, strname);
if(pkg == NULL) {
pkg = alpm_find_satisfier(alpm_db_get_pkgcache(db_local), strname);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment