diff options
author | Michael Schroeder <mls@suse.de> | 2013-04-15 17:57:43 +0200 |
---|---|---|
committer | Michael Schroeder <mls@suse.de> | 2013-04-15 17:57:43 +0200 |
commit | 83145da7966e63a78a5065ec2c186d182488e494 (patch) | |
tree | a8294b0ce66efe7e8c08074e2a03ddfe39307910 /tools | |
parent | 691ceb7b85618205fe6de61f712dd6ab6faf4088 (diff) | |
download | libsolv-83145da7966e63a78a5065ec2c186d182488e494.tar.gz libsolv-83145da7966e63a78a5065ec2c186d182488e494.tar.bz2 libsolv-83145da7966e63a78a5065ec2c186d182488e494.zip |
split ugly pubkey handling into separate repo_rpmdb_pubkey.c
Diffstat (limited to 'tools')
-rw-r--r-- | tools/rpmdb2solv.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/tools/rpmdb2solv.c b/tools/rpmdb2solv.c index 0d00331..1a63755 100644 --- a/tools/rpmdb2solv.c +++ b/tools/rpmdb2solv.c @@ -25,6 +25,9 @@ #include "pool.h" #include "repo.h" #include "repo_rpmdb.h" +#ifdef ENABLE_RPMDB_PUBKEY +#include "repo_rpmdb_pubkey.h" +#endif #include "repo_products.h" #include "repo_solv.h" #include "common_write.h" @@ -61,12 +64,15 @@ main(int argc, char **argv) char *proddir = 0; #endif char *outfile = 0; +#ifdef ENABLE_RPMDB_PUBKEY + int pubkeys = 0; +#endif /* * parse arguments */ - while ((c = getopt(argc, argv, "Phnxb:r:p:o:")) >= 0) + while ((c = getopt(argc, argv, "Phnkxb:r:p:o:")) >= 0) switch (c) { case 'h': @@ -95,6 +101,12 @@ main(int argc, char **argv) case 'o': outfile = optarg; break; +#ifdef ENABLE_RPMDB_PUBKEY + case 'k': + nopacks = 1; + pubkeys = 1; + break; +#endif default: usage(1); } @@ -160,6 +172,16 @@ main(int argc, char **argv) exit(1); } } +#ifdef ENABLE_RPMDB_PUBKEY + if (pubkeys) + { + if (repo_add_rpmdb_pubkeys(repo, REPO_USE_ROOTDIR | REPO_REUSE_REPODATA | REPO_NO_INTERNALIZE)) + { + fprintf(stderr, "rpmdb2solv: %s\n", pool_errstr(pool)); + exit(1); + } + } +#endif #ifdef ENABLE_SUSEREPO if (proddir && *proddir) |