- handle files with spaces (put double quotes around them)
- new rpmrc setting, buildshell, can be used to set shell
used for build scripts (default is /bin/sh)
+ - fix bug where macros were being improperly set for
+ Patch: and Source: lines
2.4.99 -> 2.4.100:
- fixed handling of --rebuild and --recompile
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
+#include <stdio.h>
#include "macro.h"
#include "misc.h"
#ifdef DEBUG_MACROS
-#include <stdio.h>
#define rpmError fprintf
#define RPMERR_BADSPEC stderr
-static void dumpTable(void);
#else
#include "lib/rpmlib.h"
#endif
+static void dumpTable(struct MacroContext *mc);
static void expandMacroTable(struct MacroContext *mc);
static int compareMacros(const void *ap, const void *bp);
static struct MacroEntry *findEntry(struct MacroContext *mc, char *name);
/***********************************************************************/
-#ifdef DEBUG_MACROS
-static void dumpTable()
+static void dumpTable(struct MacroContext *mc)
{
int i;
- for (i = 0; i < firstFree; i++) {
- printf("%s->%s.\n", macroTable[i].name,
- macroTable[i].expansion);
+ for (i = 0; i < mc->firstFree; i++) {
+ printf("%s->%s.\n", mc->macroTable[i].name,
+ mc->macroTable[i].expansion);
}
}
+#ifdef DEBUG_MACROS
void main(void)
{
char buf[1024];
multiToken = 1;
}
- if (macro) {
- addMacro(&spec->macros, macro, field);
- }
-
switch (tag) {
case RPMTAG_NAME:
case RPMTAG_VERSION:
case RPMTAG_SOURCE:
case RPMTAG_PATCH:
SINGLE_TOKEN_ONLY;
+ macro = NULL;
if ((rc = addSource(spec, pkg, field, tag))) {
return rc;
}
return RPMERR_INTERNAL;
}
+ if (macro) {
+ addMacro(&spec->macros, macro, field);
+ }
+
return 0;
}