rpms/rpm/devel rpm-4.7.90-macro-scope.patch, NONE, 1.1 rpm.spec, 1.374, 1.375
Panu Matilainen
pmatilai at fedoraproject.org
Mon Jan 4 11:04:44 UTC 2010
Author: pmatilai
Update of /cvs/pkgs/rpms/rpm/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv10673
Modified Files:
rpm.spec
Added Files:
rpm-4.7.90-macro-scope.patch
Log Message:
- always clear locally defined macros when they go out of scope
rpm-4.7.90-macro-scope.patch:
macro.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
--- NEW FILE rpm-4.7.90-macro-scope.patch ---
commit f895acd285366cf58cc3c97b5f188fecbfd782a8
Author: Panu Matilainen <pmatilai at redhat.com>
Date: Mon Jan 4 12:20:09 2010 +0200
Always free locally defined macros when they go out of scope
- Prior to this, local defines in constructs like %{!?foo: %define foo bar}
would remain defined until a parametrized macro gets called, causing
obscure and confusing errors in specs such as RhBug:551971 and countless
others. Use of %global is now always required for such constructs.
diff --git a/rpmio/macro.c b/rpmio/macro.c
index 88fb583..11db47d 100644
--- a/rpmio/macro.c
+++ b/rpmio/macro.c
@@ -1344,9 +1344,8 @@ expandMacro(MacroBuf mb)
me->used++; /* Mark macro as used */
}
- /* Free args for "%name " macros with opts */
- if (me->opts != NULL)
- freeArgs(mb);
+ /* Free locally defined macros, such as macro options */
+ freeArgs(mb);
s = se;
}
Index: rpm.spec
===================================================================
RCS file: /cvs/pkgs/rpms/rpm/devel/rpm.spec,v
retrieving revision 1.374
retrieving revision 1.375
diff -u -p -r1.374 -r1.375
--- rpm.spec 17 Dec 2009 06:54:51 -0000 1.374
+++ rpm.spec 4 Jan 2010 11:04:44 -0000 1.375
@@ -21,7 +21,7 @@
Summary: The RPM package management system
Name: rpm
Version: %{rpmver}
-Release: 0.%{snapver}.4
+Release: 0.%{snapver}.5
Group: System Environment/Base
Url: http://www.rpm.org/
Source0: http://rpm.org/releases/testing/%{name}-%{srcver}.tar.bz2
@@ -40,6 +40,7 @@ Patch3: rpm-4.7.90-fedora-specspo.patch
Patch200: rpm-4.7.90-python-bytecompile.patch
Patch201: rpm-4.7.90-python-refcounts.patch
Patch202: rpm-4.7.90-spec-allow-unexpanded-macros.patch
+Patch203: rpm-4.7.90-macro-scope.patch
# These are not yet upstream
Patch301: rpm-4.6.0-niagara.patch
@@ -187,6 +188,7 @@ packages on a system.
%patch200 -p1 -b .python-bytecompile
%patch201 -p1 -b .python-refcounts
%patch202 -p1 -b .spec-unexpanded-macros
+%patch203 -p1 -b .macro-scope
%patch301 -p1 -b .niagara
%patch302 -p1 -b .geode
@@ -401,6 +403,9 @@ exit 0
%doc doc/librpm/html/*
%changelog
+* Mon Jan 04 2010 Panu Matilainen <pmatilai at redhat.com> - 4.8.0-0.beta1.5
+- always clear locally defined macros when they go out of scope
+
* Thu Dec 17 2009 Panu Matilainen <pmatilai at redhat.com> - 4.8.0-0.beta1.4
- permit unexpanded macros when parsing spec (#547997)
More information about the fedora-extras-commits
mailing list