Fix problem with bzip2/gzip.
authormarc <devnull@localhost>
Thu, 5 Feb 1998 14:35:56 +0000 (14:35 +0000)
committermarc <devnull@localhost>
Thu, 5 Feb 1998 14:35:56 +0000 (14:35 +0000)
Fix problem with prefix/prefixes.

CVS patchset: 1990
CVS date: 1998/02/05 14:35:56

build/parsePreamble.c
build/parsePrep.c

index 58e065f..6f5d4bc 100644 (file)
@@ -475,6 +475,9 @@ static int handlePreambleTag(Spec spec, Package pkg, int tag, char *macro,
     return 0;
 }
 
+/* This table has to be in a peculiar order.  If one tag is the */
+/* same as another, plus a few letters, it must come first.     */
+
 static struct PreambleRec {
     int tag;
     int len;
@@ -511,8 +514,8 @@ static struct PreambleRec {
     {RPMTAG_PREREQ,        0, 0, "prereq"},
     {RPMTAG_CONFLICTFLAGS, 0, 0, "conflicts"},
     {RPMTAG_OBSOLETES,     0, 0, "obsoletes"},
-    {RPMTAG_PREFIXES,      0, 0, "prefix"},
     {RPMTAG_PREFIXES,      0, 0, "prefixes"},
+    {RPMTAG_PREFIXES,      0, 0, "prefix"},
     {RPMTAG_BUILDROOT,     0, 0, "buildroot"},
     {RPMTAG_BUILDARCHS,    0, 0, "buildarchitectures"},
     {RPMTAG_AUTOREQPROV,   0, 0, "autoreqprov"},
index 6935b52..12a403d 100644 (file)
@@ -268,7 +268,7 @@ static char *doUntar(Spec spec, int c, int quietly)
                "  exit $STATUS\n"
                "fi",
                (compressed == COMPRESSED_BZIP2) ?
-               rpmGetVar(RPMVAR_GZIPBIN) : rpmGetVar(RPMVAR_BZIP2BIN),
+               rpmGetVar(RPMVAR_BZIP2BIN) : rpmGetVar(RPMVAR_GZIPBIN),
                file, taropts);
     } else {
        sprintf(buf, "tar %s %s", taropts, file);
@@ -434,7 +434,7 @@ static char *doPatch(Spec spec, int c, int strip, char *db,
                "fi",
                c,
                (compressed == COMPRESSED_BZIP2) ?
-               rpmGetVar(RPMVAR_GZIPBIN) : rpmGetVar(RPMVAR_BZIP2BIN),
+               rpmGetVar(RPMVAR_BZIP2BIN) : rpmGetVar(RPMVAR_GZIPBIN),
                file, strip, args);
     } else {
        sprintf(buf,