diff options
author | Ales Kozumplik <akozumpl@redhat.com> | 2012-01-24 16:57:01 +0100 |
---|---|---|
committer | Ales Kozumplik <akozumpl@redhat.com> | 2012-01-24 17:07:51 +0100 |
commit | c29144158049f981cfe5fd3f5aa0d76bb508ee7e (patch) | |
tree | 5f63711f4b9cb80d9a19e3fa4553b2619baba4c3 /tools/rpmdb2solv.c | |
parent | 9ebfa0a4a2fd1556bf50c5c73e78c7fa2bf6bbe3 (diff) | |
download | libsolv-c29144158049f981cfe5fd3f5aa0d76bb508ee7e.tar.gz libsolv-c29144158049f981cfe5fd3f5aa0d76bb508ee7e.tar.bz2 libsolv-c29144158049f981cfe5fd3f5aa0d76bb508ee7e.zip |
Fix compilation on Fedora.
if ENABLED_SUSEREPO is disabled, repo_add_products() is not part of the
libsolv_ext. This fails linking for rpmdb2solv.c.
Also treat unused-variable warnings occurring with the conditional blocks.
Diffstat (limited to 'tools/rpmdb2solv.c')
-rw-r--r-- | tools/rpmdb2solv.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/rpmdb2solv.c b/tools/rpmdb2solv.c index 85a9cc6..17895c8 100644 --- a/tools/rpmdb2solv.c +++ b/tools/rpmdb2solv.c @@ -58,7 +58,9 @@ main(int argc, char **argv) const char *root = 0; const char *basefile = 0; const char *refname = 0; +#ifdef ENABLE_SUSEREPO char *proddir = 0; +#endif char *outfile = 0; /* @@ -84,7 +86,9 @@ main(int argc, char **argv) percent = 1; break; case 'p': +#ifdef ENABLE_SUSEREPO proddir = optarg; +#endif break; case 'x': extrapool = 1; @@ -143,6 +147,7 @@ main(int argc, char **argv) if (!nopacks) repo_add_rpmdb(repo, ref, root, REPO_REUSE_REPODATA | REPO_NO_INTERNALIZE | (percent ? RPMDB_REPORT_PROGRESS : 0)); +#ifdef ENABLE_SUSEREPO if (proddir && *proddir) { char *buf = proddir; @@ -163,7 +168,7 @@ main(int argc, char **argv) if (buf != proddir) solv_free(buf); } - +#endif repodata_internalize(data); if (ref) |