From: jbj Date: Tue, 20 Apr 1999 19:17:23 +0000 (+0000) Subject: fix: % before non-alphabetic non-macro special now passed unscathed. X-Git-Tag: tznext/4.11.0.1.tizen20130304~9125 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0cf9b0bdfed25fd22c80b32219b33edd61ed05dc;p=tools%2Flibrpm-tizen.git fix: % before non-alphabetic non-macro special now passed unscathed. CVS patchset: 3023 CVS date: 1999/04/20 19:17:23 --- diff --git a/CHANGES b/CHANGES index a56e8ae..dc42a11 100644 --- 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). diff --git a/build/parseScript.c b/build/parseScript.c index d80339a..7ec9d5d 100644 --- a/build/parseScript.c +++ b/build/parseScript.c @@ -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; diff --git a/configure.in b/configure.in index b781304..61ae291 100644 --- a/configure.in +++ b/configure.in @@ -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 diff --git a/lib/Makefile.am b/lib/Makefile.am index b371105..3a37faa 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -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 $@ $< + diff --git a/lib/macro.c b/lib/macro.c index a6e7f31..0e7d2ea 100644 --- a/lib/macro.c +++ b/lib/macro.c @@ -10,8 +10,14 @@ #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 diff --git a/po/rpm.pot b/po/rpm.pot index 7582f6d..2b37267 100644 --- a/po/rpm.pot +++ b/po/rpm.pot @@ -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 \n" "Language-Team: LANGUAGE \n" diff --git a/rpmio/macro.c b/rpmio/macro.c index a6e7f31..0e7d2ea 100644 --- a/rpmio/macro.c +++ b/rpmio/macro.c @@ -10,8 +10,14 @@ #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