]> git.pld-linux.org Git - packages/rpm.git/blame - rpm-5.4.4-glob-wildcards-for-loading-macro-files.patch
- fix build with semanage and no other embedded interpreters
[packages/rpm.git] / rpm-5.4.4-glob-wildcards-for-loading-macro-files.patch
CommitLineData
70f8787d
JR
1--- rpm-5.4.4/rpmio/macro.c.glob~ 2011-09-30 20:40:18.000000000 +0200
2+++ rpm-5.4.4/rpmio/macro.c 2011-11-17 16:49:16.870465121 +0100
3@@ -2798,6 +2798,9 @@ rpmLoadMacroFile(MacroContext mc, const
4 /* Parse %{load:...} immediately recursively. */
5 if (s[1] == '{' && !strncmp(s+2, "load:", sizeof("load:")-1)) {
6 char * se = (char *) matchchar(s, '{', '}');
7+ const char ** argv = NULL;
8+ int argc = 0;
9+ int i;
10 if (se == NULL) {
11 rpmlog(RPMLOG_WARNING,
12 _("%s:%u Missing '}' in \"%s\", skipping.\n"),
13@@ -2814,7 +2817,10 @@ rpmLoadMacroFile(MacroContext mc, const
14 continue;
15 }
16 se = rpmMCExpand(mc, s, NULL);
17- rc = rpmLoadMacroFile(mc, se, nesting - 1);
18+ rc = rpmGlob(se, &argc, &argv);
19+ for(i = 0; i < argc; i++)
20+ rc |= rpmLoadMacroFile(mc, argv[i], nesting - 1);
21+ argv = _free(argv);
22 se = _free(se);
23 if (rc != 0)
24 goto exit;
This page took 0.033209 seconds and 4 git commands to generate.