RPM Package Manager, CVS Repository
http://rpm5.org/cvs/
____________________________________________________________________________
Server: rpm5.org Name: Jeff Johnson
Root: /v/rpm/cvs Email: jbj@rpm5.org
Module: rpm Date: 04-Feb-2008 17:37:17
Branch: HEAD Handle: 2008020416371700
Modified files:
rpm CHANGES
rpm/rpmio macro.c
Log:
- jbj: include rpmuuid.h to remove warning.
- jbj: add %{!?load:...} syntax, display error if %{load:...} fails.
Summary:
Revision Changes Path
1.2133 +2 -0 rpm/CHANGES
2.183 +5 -0 rpm/rpmio/macro.c
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: rpm/CHANGES
============================================================================
$ cvs diff -u -r1.2132 -r1.2133 CHANGES
--- rpm/CHANGES 4 Feb 2008 16:05:59 -0000 1.2132
+++ rpm/CHANGES 4 Feb 2008 16:37:17 -0000 1.2133
@@ -1,4 +1,6 @@
5.0.0 -> 5.1a1:
+ - jbj: include rpmuuid.h to remove warning.
+ - jbj: add %{!?load:...} syntax, display error if %{load:...} fails.
- jbj: updated sv.po (Translation Project).
- jbj: fix: permit #%patchN comments by forcing single line expansion.
- jbj: document newer macro builtins (%{@foo:...}, %{uuid:...}, and %{lua:...} todo).
@@ .
patch -p0 <<'@@ .'
Index: rpm/rpmio/macro.c
============================================================================
$ cvs diff -u -r2.182 -r2.183 macro.c
--- rpm/rpmio/macro.c 1 Feb 2008 13:51:24 -0000 2.182
+++ rpm/rpmio/macro.c 4 Feb 2008 16:37:17 -0000 2.183
@@ -64,6 +64,7 @@
#define _RPMLUA_INTERNAL /* XXX lua->printbuf access */
#include <rpmlua.h>
#endif
+#include <rpmuuid.h>
#endif
@@ -1589,6 +1590,9 @@
int xx;
mfn[gn] = '\0';
xx = rpmLoadMacroFile(NULL, mfn);
+ /* Print failure iff %{load:...} or %{!?load:...} */
+ if (xx != 0 && chkexist == negate)
+ rpmlog(RPMLOG_ERR, _("%s: load macros failed\n"), mfn);
}
s = se;
continue;
@@ -2259,6 +2263,7 @@
int
rpmLoadMacroFile(MacroContext mc, const char * fn)
{
+ /* XXX TODO: teach rdcl() to read through a URI, eliminate ".fpio". */
FD_t fd = Fopen(fn, "r.fpio");
size_t bufn = _macro_BUFSIZ;
char *buf = alloca(bufn);
@@ .
Received on Mon Feb 4 17:37:17 2008