Make --rmsource actually work.
authormarc <devnull@localhost>
Fri, 3 Apr 1998 17:14:21 +0000 (17:14 +0000)
committermarc <devnull@localhost>
Fri, 3 Apr 1998 17:14:21 +0000 (17:14 +0000)
CVS patchset: 2070
CVS date: 1998/04/03 17:14:21

CHANGES
rpm.c

diff --git a/CHANGES b/CHANGES
index 8c569ae..22aaf5f 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -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
diff --git a/rpm.c b/rpm.c
index 65a8bd8..795f398 100755 (executable)
--- a/rpm.c
+++ b/rpm.c
@@ -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"));