diff options
author | Dan McGee <dan@archlinux.org> | 2011-06-16 20:16:49 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-07-03 21:29:30 +0200 |
commit | 6a6fc3107f477e579b0dd21553d48e073e3efdf4 (patch) | |
tree | a7c5ad4c723f7d2ceea76ebc7ff8214257ae8fe5 /src/pacman/query.c | |
parent | a2995f586e492e0d2cb85e7e9ebb5f3857891465 (diff) | |
download | pacman-6a6fc3107f477e579b0dd21553d48e073e3efdf4.tar.gz pacman-6a6fc3107f477e579b0dd21553d48e073e3efdf4.tar.xz |
Move alpm filelists to a struct object
This allows us to capture size and mode data when building filelists
from package files. Future patches will take advantage of this newly
available information, and frontends can use it as well.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src/pacman/query.c')
-rw-r--r-- | src/pacman/query.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/pacman/query.c b/src/pacman/query.c index 826c2262..1547c247 100644 --- a/src/pacman/query.c +++ b/src/pacman/query.c @@ -193,7 +193,8 @@ static int query_fileowner(alpm_list_t *targets) for(j = alpm_pkg_get_files(info); j && !found; j = alpm_list_next(j)) { char *ppath, *pdname; - const char *pkgfile = alpm_list_getdata(j); + const alpm_file_t *file = alpm_list_getdata(j); + const char *pkgfile = file->name; /* avoid the costly resolve_path usage if the basenames don't match */ if(strcmp(mbasename(pkgfile), bname) != 0) { @@ -416,7 +417,8 @@ static int check(alpm_pkg_t *pkg) const char *pkgname = alpm_pkg_get_name(pkg); for(i = alpm_pkg_get_files(pkg); i; i = alpm_list_next(i)) { struct stat st; - const char *path = alpm_list_getdata(i); + const alpm_file_t *file = alpm_list_getdata(i); + const char *path = file->name; if(rootlen + 1 + strlen(path) > PATH_MAX) { pm_fprintf(stderr, PM_LOG_WARNING, _("path too long: %s%s\n"), root, path); |