[fedpkg/f17] use eval to undefine dist macro instead of nil
Tom Callaway
spot at fedoraproject.org
Tue Jan 8 17:40:05 UTC 2013
commit ec6187827f56867583fcea4fe0d87109be59ffc0
Author: Tom Callaway <spot at fedoraproject.org>
Date: Tue Jan 8 12:42:06 2013 -0500
use eval to undefine dist macro instead of nil
fedpkg-1.11-eval-undefine.patch | 18 ++++++++++++++++++
fedpkg.spec | 8 ++++++--
2 files changed, 24 insertions(+), 2 deletions(-)
---
diff --git a/fedpkg-1.11-eval-undefine.patch b/fedpkg-1.11-eval-undefine.patch
new file mode 100644
index 0000000..243de31
--- /dev/null
+++ b/fedpkg-1.11-eval-undefine.patch
@@ -0,0 +1,18 @@
+--- a/src/pyrpkg/fedpkg/__init__.py
++++ a/src/pyrpkg/fedpkg/__init__.py
+@@ -201,13 +201,13 @@ class Commands(pyrpkg.Commands):
+ "--define '_rpmdir %s'" % self.path,
+ "--define 'dist .%s'" % self.dist,
+ "--define '%s %s'" % (self._distvar, self._distval),
+- "--define '%s %%{nil}'" % self._distunset,
++ "--eval '%%undefine %s'" % self._distunset,
+ "--define '%s 1'" % self.dist]
+ if self._runtime_disttag:
+ if self.dist != self._runtime_disttag:
+ # This means that the runtime is known, and is different from
+ # the target, so we need to unset the _runtime_disttag
+- self._rpmdefines.append("--define '%s %%{nil}'" %
++ self._rpmdefines.append("--eval '%%undefine %s'" %
+ self._runtime_disttag)
+
+ def load_target(self):
diff --git a/fedpkg.spec b/fedpkg.spec
index 3a88fb2..b6f3bdf 100644
--- a/fedpkg.spec
+++ b/fedpkg.spec
@@ -3,7 +3,7 @@
Name: fedpkg
Version: 1.11
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Fedora utility for working with dist-git
Group: Applications/System
@@ -11,6 +11,7 @@ License: GPLv2+
URL: http://fedorahosted.org/fedpkg
Source0: http://fedorahosted.org/releases/f/e/fedpkg/fedpkg-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Patch0: fedpkg-1.11-eval-undefine.patch
Requires: pyrpkg >= 1.13, redhat-rpm-config
Requires: python-pycurl, koji, python-fedora
@@ -33,7 +34,7 @@ Provides the fedpkg command for working with dist-git
%prep
%setup -q
-
+%patch0 -p1
%build
%{__python} setup.py build
@@ -65,6 +66,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Tue Jan 6 2013 Tom Callaway <spot at fedoraproject.org> - 1.11-2
+- use --eval '%%undefine to unset dist values instead of nil (bz876308)
+
* Tue Nov 06 2012 Jesse Keating <jkeating at redhat.com> - 1.11-1
- Unset runtime disttag (spot)
- use nil to unset dist values. (spot)
More information about the scm-commits
mailing list