fix: % before non-alphabetic non-macro special now passed unscathed.
authorjbj <devnull@localhost>
Tue, 20 Apr 1999 19:17:23 +0000 (19:17 +0000)
committerjbj <devnull@localhost>
Tue, 20 Apr 1999 19:17:23 +0000 (19:17 +0000)
CVS patchset: 3023
CVS date: 1999/04/20 19:17:23

CHANGES
build/parseScript.c
configure.in
lib/Makefile.am
lib/macro.c
po/rpm.pot
rpmio/macro.c

diff --git a/CHANGES b/CHANGES
index a56e8ae..dc42a11 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,7 @@
+3.0 -> 3.0.1
+       - fix: %verifyscript resurrected. (Shing-Gene Yung).
+       - fix: % before non-alphabetic non-macro special now passed unscathed.
+
 2.94 -> 2.95
        - fix: last update transaction set segfault bug in installer.
        - improved checks for statfs (Tim Mooney).
index d80339a..7ec9d5d 100644 (file)
@@ -107,7 +107,7 @@ int parseScript(Spec spec, int parsePart)
        partname = "%postun";
        break;
       case PART_VERIFYSCRIPT:
-       tag = PART_VERIFYSCRIPT;
+       tag = RPMTAG_VERIFYSCRIPT;
        progtag = RPMTAG_VERIFYSCRIPTPROG;
        partname = "%verifyscript";
        break;
index b781304..61ae291 100644 (file)
@@ -665,6 +665,9 @@ fi
 #
 # get rid of the 4-th tuple, if config.guess returned "linux-gnu" for build_os
 #
+if echo "$build_os" | grep '.*-gnulibc1' > /dev/null ; then
+       build_os=`echo "${build_os}" | sed 's/-gnulibc1$//'`
+fi
 if echo "$build_os" | grep '.*-gnu' > /dev/null ; then
        build_os=`echo "${build_os}" | sed 's/-gnu$//'`
 fi
index b371105..3a37faa 100644 (file)
@@ -43,3 +43,7 @@ BUILT_SOURCES = tagtable.c
 .PHONY:        lclint
 lclint:
        lclint ${DEFS} ${INCLUDES} ${librpm_la_SOURCES}
+
+tmacro: macro.c
+       $(CC) $(CFLAGS) ${DEFS} -DDEBUG_MACROS ${INCLUDES} -o $@ $<
+
index a6e7f31..0e7d2ea 100644 (file)
 #ifdef DEBUG_MACROS
 #define rpmError fprintf
 #define RPMERR_BADSPEC stderr
+#undef _
 #define        _(x)    x
 #define        xfree(_p)       free((void *)_p)
+typedef        int FD_t;
+#define        fdFileno(_x)    (_x)
+#define        fdOpen          open
+#define        fdRead          read
+#define        fdClose         close
 #else
 #include "rpmlib.h"
 #endif
@@ -902,7 +908,12 @@ expandMacro(MacroBuf *mb)
        fn = (fe - f);
        gn = (ge - g);
        if (fn <= 0) {
+/* XXX Process % in unknown context */
+               c = '%';        /* XXX only need to save % */
+               SAVECHAR(mb, c);
+#if 0
                rpmError(RPMERR_BADSPEC, _("A %% is followed by an unparseable macro"));
+#endif
                s = se;
                continue;
        }
@@ -1369,7 +1380,7 @@ rpmGetPath(const char *path, ...)
 #ifdef DEBUG_MACROS
 
 MacroContext mc = { NULL, 0, 0};
-char *macrofiles = "./paths:./environment:./macros";
+char *macrofiles = "../macros";
 char *testfile = "./test";
 
 int
index 7582f6d..2b37267 100644 (file)
@@ -6,7 +6,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 1999-04-18 16:57-0400\n"
+"POT-Creation-Date: 1999-04-20 14:43-0400\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
index a6e7f31..0e7d2ea 100644 (file)
 #ifdef DEBUG_MACROS
 #define rpmError fprintf
 #define RPMERR_BADSPEC stderr
+#undef _
 #define        _(x)    x
 #define        xfree(_p)       free((void *)_p)
+typedef        int FD_t;
+#define        fdFileno(_x)    (_x)
+#define        fdOpen          open
+#define        fdRead          read
+#define        fdClose         close
 #else
 #include "rpmlib.h"
 #endif
@@ -902,7 +908,12 @@ expandMacro(MacroBuf *mb)
        fn = (fe - f);
        gn = (ge - g);
        if (fn <= 0) {
+/* XXX Process % in unknown context */
+               c = '%';        /* XXX only need to save % */
+               SAVECHAR(mb, c);
+#if 0
                rpmError(RPMERR_BADSPEC, _("A %% is followed by an unparseable macro"));
+#endif
                s = se;
                continue;
        }
@@ -1369,7 +1380,7 @@ rpmGetPath(const char *path, ...)
 #ifdef DEBUG_MACROS
 
 MacroContext mc = { NULL, 0, 0};
-char *macrofiles = "./paths:./environment:./macros";
+char *macrofiles = "../macros";
 char *testfile = "./test";
 
 int