Make --rmsource actually work.

CVS patchset: 2070
CVS date: 1998/04/03 17:14:21
This commit is contained in:
marc 1998-04-03 17:14:21 +00:00
parent f51eda0636
commit a1aba0f11d
2 changed files with 8 additions and 3 deletions

View File

@ -1,9 +1,10 @@
2.4.106 -> 2.4.107:
- --nomd5 wasn't handled properly
- updated configure.in find-req and find-prov checks (Tim Mooney)
- make --rmsource actually work
2.4.105 -> 2.4.106:
- build: inly check for non-printables in first 128 chars
- build: only check for non-printables in first 128 chars
- added %triggerpostun
- linux.req generates deps for shared libs
- added a CC=@CC@ to popt/Makefile.in

8
rpm.c
View File

@ -151,6 +151,7 @@ static struct poptOption optionsTable[] = {
{ "replacefiles", '\0', 0, &replaceFiles, 0 },
{ "replacepkgs", '\0', 0, &replacePackages, 0 },
{ "resign", '\0', 0, 0, GETOPT_RESIGN },
{ "rmsource", '\0', 0, 0, GETOPT_RMSOURCE },
{ "root", 'r', POPT_ARG_STRING, &rootdir, 0 },
{ "short-circuit", '\0', 0, &shortCircuit, 0 },
{ "showrc", '\0', 0, 0, 0 },
@ -801,9 +802,9 @@ int main(int argc, char ** argv) {
break;
case GETOPT_RMSOURCE:
if (bigMode != MODE_UNKNOWN && bigMode != MODE_BUILD)
if (bigMode != MODE_UNKNOWN && bigMode != MODE_BUILD &&
bigMode != MODE_TARBUILD)
argerror(_("only one major mode may be specified"));
bigMode = MODE_BUILD;
rmsource = 1;
break;
@ -900,6 +901,9 @@ int main(int argc, char ** argv) {
exit(1);
}
if (rmsource && bigMode == MODE_UNKNOWN)
bigMode = MODE_BUILD;
if (initdb)
if (bigMode != MODE_UNKNOWN)
argerror(_("only one major mode may be specified"));