diff options
author | jbj <devnull@localhost> | 2000-06-11 19:15:27 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 2000-06-11 19:15:27 +0000 |
commit | bed61632d7a89025e5854810e768d5c4e4e4996d (patch) | |
tree | 5927b66e9010346e2acc195fc4e4fc51ddfc9dd6 /rpm.c | |
parent | 812fe275491c81cf4f9532d223fc5ed7a6b48e28 (diff) | |
download | librpm-tizen-bed61632d7a89025e5854810e768d5c4e4e4996d.tar.gz librpm-tizen-bed61632d7a89025e5854810e768d5c4e4e4996d.tar.bz2 librpm-tizen-bed61632d7a89025e5854810e768d5c4e4e4996d.zip |
Fix db return code handling, majorly horked.
Autoconf detection of db-3.1.
Move --all to query/verify popt table.
CVS patchset: 3829
CVS date: 2000/06/11 19:15:27
Diffstat (limited to 'rpm.c')
-rwxr-xr-x | rpm.c | 22 |
1 files changed, 15 insertions, 7 deletions
@@ -100,7 +100,9 @@ extern struct rpmBuildArguments rpmBTArgs; static struct poptOption optionsTable[] = { { "addsign", '\0', 0, 0, GETOPT_ADDSIGN, NULL, NULL}, /* all and allmatches both using 'a' is dumb */ +#ifdef DYING { "all", 'a', 0, 0, 'a', NULL, NULL}, +#endif { "allfiles", '\0', 0, &allFiles, 0, NULL, NULL}, { "allmatches", '\0', 0, &allMatches, 0, NULL, NULL}, { "badreloc", '\0', 0, &badReloc, 0, NULL, NULL}, @@ -539,7 +541,9 @@ int main(int argc, const char ** argv) { enum modes bigMode = MODE_UNKNOWN; QVA_t *qva = &rpmQVArgs; +#ifdef DYING enum rpmQVSources QVSource = RPMQV_PACKAGE; +#endif int arg; int installFlags = 0, uninstallFlags = 0, interfaceFlags = 0; int verifyFlags; @@ -658,6 +662,7 @@ int main(int argc, const char ** argv) if (qva->qva_queryFormat) xfree(qva->qva_queryFormat); memset(qva, 0, sizeof(*qva)); + qva->qva_source = RPMQV_PACKAGE; qva->qva_mode = ' '; qva->qva_char = ' '; @@ -671,6 +676,7 @@ int main(int argc, const char ** argv) bigMode = MODE_CHECKSIG; break; +#ifdef DYING case 'q': if (bigMode != MODE_UNKNOWN && bigMode != MODE_QUERY) argerror(_("only one major mode may be specified")); @@ -683,6 +689,7 @@ int main(int argc, const char ** argv) argerror(_("only one major mode may be specified")); bigMode = MODE_VERIFY; break; +#endif case 'u': if (bigMode != MODE_UNKNOWN && bigMode != MODE_UNINSTALL) @@ -728,6 +735,7 @@ int main(int argc, const char ** argv) upgrade = 1; break; +#ifdef DYING case 'p': if (QVSource != RPMQV_PACKAGE && QVSource != RPMQV_RPM) argerror(_("one type of query/verify may be performed at a " "time")); @@ -754,6 +762,7 @@ int main(int argc, const char ** argv) "time")); QVSource = RPMQV_ALL; break; +#endif case GETOPT_RESIGN: if (bigMode != MODE_UNKNOWN && bigMode != MODE_RESIGN) @@ -849,10 +858,9 @@ int main(int argc, const char ** argv) } if (qva->qva_sourceCount) { - if (QVSource != RPMQV_PACKAGE || qva->qva_sourceCount > 1) + if (qva->qva_sourceCount > 1) argerror(_("one type of query/verify may be performed at a " "time")); - QVSource = qva->qva_source; } if (qva->qva_flags && (bigMode & ~MODES_QV)) @@ -861,7 +869,7 @@ int main(int argc, const char ** argv) if (qva->qva_queryFormat && (bigMode & ~MODES_QV)) argerror(_("unexpected query format")); - if (QVSource != RPMQV_PACKAGE && (bigMode & ~MODES_QV)) + if (qva->qva_source != RPMQV_PACKAGE && (bigMode & ~MODES_QV)) argerror(_("unexpected query source")); if (!(bigMode == MODE_INSTALL) && force) @@ -1174,7 +1182,7 @@ int main(int argc, const char ** argv) case MODE_QUERY: qva->qva_prefix = rootdir; - if (QVSource == RPMQV_ALL) { + if (qva->qva_source == RPMQV_ALL) { if (poptPeekArg(optCon)) argerror(_("extra arguments given for query of all packages")); @@ -1183,7 +1191,7 @@ int main(int argc, const char ** argv) if (!poptPeekArg(optCon)) argerror(_("no arguments given for query")); while ((pkg = poptGetArg(optCon))) - ec += rpmQuery(qva, QVSource, pkg); + ec += rpmQuery(qva, qva->qva_source, pkg); } break; @@ -1196,7 +1204,7 @@ int main(int argc, const char ** argv) qva->qva_prefix = rootdir; qva->qva_flags = verifyFlags; - if (QVSource == RPMQV_ALL) { + if (qva->qva_source == RPMQV_ALL) { if (poptPeekArg(optCon)) argerror(_("extra arguments given for verify of all packages")); ec = rpmVerify(qva, RPMQV_ALL, NULL); @@ -1204,7 +1212,7 @@ int main(int argc, const char ** argv) if (!poptPeekArg(optCon)) argerror(_("no arguments given for verify")); while ((pkg = poptGetArg(optCon))) - ec += rpmVerify(qva, QVSource, pkg); + ec += rpmVerify(qva, qva->qva_source, pkg); } break; } |