On 10/22/2012 12:09 PM, Ralf Corsepius wrote: >> There is currently no way to "undefine" a macro at the rpm commandline, > > rpmbuild --define "xxxx %{nil}" ? Huh, I swear I knew that once. :) Attached is a patch to use the %{nil} behavior instead of setting the unused dist macro to 0. I smoke tested and confirmed that the %{rhel} macro is unset on Fedora with this patch applied. ~tom == Fedora Project
diff -up fedpkg-1.10/src/pyrpkg/fedpkg/__init__.py.nil fedpkg-1.10/src/pyrpkg/fedpkg/__init__.py --- fedpkg-1.10/src/pyrpkg/fedpkg/__init__.py.nil 2012-10-22 13:51:28.706781587 -0400 +++ fedpkg-1.10/src/pyrpkg/fedpkg/__init__.py 2012-10-22 13:54:23.750857940 -0400 @@ -197,7 +197,7 @@ class Commands(pyrpkg.Commands): "--define '_rpmdir %s'" % self.path, "--define 'dist .%s'" % self.dist, "--define '%s %s'" % (self._distvar, self._distval), - "--define '%s 0'" % self._distunset, + "--define '%s %%{nil}'" % self._distunset, "--define '%s 1'" % self.dist] def load_target(self):
-- devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/devel