public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/fedpkg] 1.48-1: use eval to undefine dist macro instead of nil
@ 2026-08-10 21:45 Tom Callaway
  0 siblings, 0 replies; only message in thread
From: Tom Callaway @ 2026-08-10 21:45 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/fedpkg
Branch : 1.48-1
Commit : 4b7ae71bf9792d22a30e1ac219a0375d253d8ef1
Author : Tom Callaway <spot@fedoraproject.org>
Date   : 2013-01-08T12:52:04-05:00
Stats  : +24/-2 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/fedpkg/c/4b7ae71bf9792d22a30e1ac219a0375d253d8ef1?branch=1.48-1

Log:
use eval to undefine dist macro instead of nil

---
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@fedoraproject.org> - 1.11-2
+- use --eval '%%undefine to unset dist values instead of nil (bz876308)
+
 * Tue Nov 06 2012 Jesse Keating <jkeating@redhat.com> - 1.11-1
 - Unset runtime disttag (spot)
 - use nil to unset dist values. (spot)

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-10 21:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-10 21:45 [rpms/fedpkg] 1.48-1: use eval to undefine dist macro instead of nil Tom Callaway

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox