diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/pacman/query.c | 2 | ||||
-rw-r--r-- | src/pacman/sync.c | 5 | ||||
-rw-r--r-- | src/util/testpkg.c | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/src/pacman/query.c b/src/pacman/query.c index 26a1bd8f..4e4002cf 100644 --- a/src/pacman/query.c +++ b/src/pacman/query.c @@ -369,7 +369,7 @@ int pacman_query(alpm_list_t *targets) pmpkg_t *pkg = NULL; if(config->op_q_isfile) { - alpm_pkg_load(strname, &pkg); + alpm_pkg_load(strname, 1, &pkg); } else { pkg = alpm_db_get_pkg(db_local, strname); } diff --git a/src/pacman/sync.c b/src/pacman/sync.c index bb4926e2..11941eb3 100644 --- a/src/pacman/sync.c +++ b/src/pacman/sync.c @@ -82,8 +82,9 @@ static int sync_cleancache(int level) snprintf(path, PATH_MAX, "%s/%s", cachedir, ent->d_name); /* attempt to load the package, skip file on failures as we may have - * files here that aren't valid packages */ - if(alpm_pkg_load(path, &localpkg) != 0 || localpkg == NULL) { + * files here that aren't valid packages. we also don't need a full + * load of the package, just the metadata. */ + if(alpm_pkg_load(path, 0, &localpkg) != 0 || localpkg == NULL) { continue; } /* check if this package is in the local DB */ diff --git a/src/util/testpkg.c b/src/util/testpkg.c index 7da18ca6..7d844e85 100644 --- a/src/util/testpkg.c +++ b/src/util/testpkg.c @@ -57,7 +57,7 @@ int main(int argc, char **argv) /* let us get log messages from libalpm */ alpm_option_set_logcb(output_cb); - if(alpm_pkg_load(argv[1], &pkg) == -1 || pkg == NULL) { + if(alpm_pkg_load(argv[1], 1, &pkg) == -1 || pkg == NULL) { retval = 1; } else { alpm_pkg_free(pkg); |