diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2018-12-04 14:04:28 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2018-12-04 14:04:32 +0900 |
commit | e679b515eddb3dd340fb25620de0160211f40fdc (patch) | |
tree | 93271e0bbd40dba805f8270cfc78a3ac10ab2c8f /examples/solv | |
parent | d98199487aa414cb7f965a058c4395235343e20a (diff) | |
download | libsolv-e679b515eddb3dd340fb25620de0160211f40fdc.tar.gz libsolv-e679b515eddb3dd340fb25620de0160211f40fdc.tar.bz2 libsolv-e679b515eddb3dd340fb25620de0160211f40fdc.zip |
Imported Upstream version 0.6.35upstream/0.6.35
Change-Id: Ib7359aa10c08c1469105fbd6a82ea922f46f8b51
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'examples/solv')
-rw-r--r-- | examples/solv/checksig.c | 12 | ||||
-rw-r--r-- | examples/solv/solv.c | 4 |
2 files changed, 14 insertions, 2 deletions
diff --git a/examples/solv/checksig.c b/examples/solv/checksig.c index ff60c66..44603d3 100644 --- a/examples/solv/checksig.c +++ b/examples/solv/checksig.c @@ -27,6 +27,12 @@ cleanupgpg(char *gpgdir) unlink(cmd); snprintf(cmd, sizeof(cmd), "%s/keys", gpgdir); unlink(cmd); + snprintf(cmd, sizeof(cmd), "%s/pubring.kbx", gpgdir); + unlink(cmd); + snprintf(cmd, sizeof(cmd), "%s/pubring.kbx~", gpgdir); + unlink(cmd); + snprintf(cmd, sizeof(cmd), "%s/private-keys-v1.d", gpgdir); + rmdir(cmd); rmdir(gpgdir); } @@ -35,7 +41,7 @@ checksig(Pool *sigpool, FILE *fp, FILE *sigfp) { char *gpgdir; char *keysfile; - const char *pubkey; + const char *pubkey, *pubring; char cmd[256]; FILE *kfp; Solvable *s; @@ -83,7 +89,9 @@ checksig(Pool *sigpool, FILE *fp, FILE *sigfp) lseek(fileno(fp), 0, SEEK_SET); possigfp = lseek(fileno(sigfp), 0, SEEK_CUR); lseek(fileno(sigfp), 0, SEEK_SET); - snprintf(cmd, sizeof(cmd), "gpgv -q --homedir %s --keyring %s/pubring.gpg /dev/fd/%d /dev/fd/%d >/dev/null 2>&1", gpgdir, gpgdir, fileno(sigfp), fileno(fp)); + snprintf(cmd, sizeof(cmd), "%s/pubring.kbx", gpgdir); + pubring = access(cmd, R_OK) == 0 ? "pubring.kbx" : "pubring.gpg"; + snprintf(cmd, sizeof(cmd), "gpgv -q --homedir %s --keyring %s/%s /dev/fd/%d /dev/fd/%d >/dev/null 2>&1", gpgdir, gpgdir, pubring, fileno(sigfp), fileno(fp)); fcntl(fileno(fp), F_SETFD, 0); /* clear CLOEXEC */ fcntl(fileno(sigfp), F_SETFD, 0); /* clear CLOEXEC */ r = system(cmd); diff --git a/examples/solv/solv.c b/examples/solv/solv.c index 627c248..42ab751 100644 --- a/examples/solv/solv.c +++ b/examples/solv/solv.c @@ -459,6 +459,10 @@ main(int argc, char **argv) dataiterator_free(&di); if (repofilter.count) selection_filter(pool, &sel, &repofilter); + if (archfilter.count) + selection_filter(pool, &sel, &archfilter); + if (kindfilter.count) + selection_filter(pool, &sel, &kindfilter); queue_init(&q); selection_solvables(pool, &sel, &q); |