summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2011-07-30 11:02:16 -0400
committerDave Reisner <dreisner@archlinux.org>2011-08-17 15:22:29 -0400
commit5815335293456381b70ddbd4fdffed8819b3f0c5 (patch)
treec1514a5a33c3bf2443e94156131b125e8defeb36
parentc69f13673e7e35386f7e386b130a38a4940ab9bf (diff)
downloadexpac-5815335293456381b70ddbd4fdffed8819b3f0c5.tar.xz
filelist stuff for alpm7
-rw-r--r--expac.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/expac.c b/expac.c
index 579d13b..e180847 100644
--- a/expac.c
+++ b/expac.c
@@ -355,6 +355,18 @@ static int print_time(time_t timestamp) {
return out;
}
+static int print_filelist(alpm_filelist_t *filelist) {
+ int out = 0;
+ size_t i;
+
+ for (i = 0; i < filelist->count; i++) {
+ out += printf("%s", (filelist->files + i)->name);
+ out += print_escaped(listdelim);
+ }
+
+ return out;
+}
+
static int print_pkg(alpm_pkg_t *pkg, const char *format) {
const char *f, *end;
char fmt[32];
@@ -427,6 +439,9 @@ static int print_pkg(alpm_pkg_t *pkg, const char *format) {
break;
/* lists */
+ case 'F': /* files */
+ out += print_filelist(alpm_pkg_get_files(pkg));
+ break;
case 'N': /* requiredby */
out += print_list(alpm_pkg_compute_requiredby(pkg), NULL, shortdeps);
break;
@@ -459,9 +474,6 @@ static int print_pkg(alpm_pkg_t *pkg, const char *format) {
case 'R': /* replaces */
out += print_list(alpm_pkg_get_replaces(pkg), NULL, shortdeps);
break;
- case 'F': /* files */
- out += print_list(alpm_pkg_get_files(pkg), NULL, shortdeps);
- break;
case 'B': /* backup */
out += print_list(alpm_pkg_get_backup(pkg), NULL, shortdeps);
break;