diff options
author | William Pitcock <nenolod@dereferenced.org> | 2017-05-27 20:55:12 +0000 |
---|---|---|
committer | William Pitcock <nenolod@dereferenced.org> | 2017-05-27 20:55:31 +0000 |
commit | 46c2693468bfa6d4de8236e5594eb47f82d81c44 (patch) | |
tree | 6e77445a8ff251853bdcf469c6950c3841882cc7 /src/manifest.c | |
parent | ede5165833b94051ecbc35e9ac4a359f54cc0116 (diff) | |
download | apk-tools-46c2693468bfa6d4de8236e5594eb47f82d81c44.tar.gz apk-tools-46c2693468bfa6d4de8236e5594eb47f82d81c44.tar.bz2 apk-tools-46c2693468bfa6d4de8236e5594eb47f82d81c44.tar.xz apk-tools-46c2693468bfa6d4de8236e5594eb47f82d81c44.zip |
manifest: dump checksum type too
Diffstat (limited to 'src/manifest.c')
-rw-r--r-- | src/manifest.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/manifest.c b/src/manifest.c index cf122af..ac86936 100644 --- a/src/manifest.c +++ b/src/manifest.c @@ -18,6 +18,10 @@ #include "apk_print.h" /* TODO: support package files as well as generating manifest from the installed DB. */ +static char *csum_types[APK_CHECKSUM_SHA1 + 1] = { + [APK_CHECKSUM_MD5] = "md5", + [APK_CHECKSUM_SHA1] = "sha1", +}; static void process_package(struct apk_database *db, struct apk_package *pkg) { @@ -42,7 +46,7 @@ static void process_package(struct apk_database *db, struct apk_package *pkg) if (apk_verbosity > 1) printf("%s: ", pkg->name->name); - printf("%s " DIR_FILE_FMT "\n", csum_buf, DIR_FILE_PRINTF(diri->dir, file)); + printf("%s:%s " DIR_FILE_FMT "\n", csum_types[file->csum.type], csum_buf, DIR_FILE_PRINTF(diri->dir, file)); } } } |