rpmbuild-nonroot %{version} interpreted incorrectly

Leonard den Ottolander leonard at den.ottolander.nl
Mon Jun 21 11:27:00 UTC 2004


Hi,

I wrote,

> I've come up with a patch that fixes the macros %{PACKAGE_VERSION} and
> %{PACKAGE_RELEASE} so one can use
> 
> %_sourcedir	%{_topdir}/%{name}-%{PACKAGE_VERSION}
> 
> Fixing the preferred macros %{version} and %{release} via
> headerAddEntry() is much more intrusive, so I'm not sure if creating
> such a patch is worth the time spent (not even sure if inclusion would
> be considered as the above bug is a WONTFIX).

The patch to fix the other macros was not as intrusive as I thought. The
attached patch now distinguishes between PART_PREAMBLE and PART_PACKAGE
(newly introduced). It sets initialPackage to 0 only after the first
%package tag is found and sets the macros conditionally.

This patch seems to work as intended. You can now use
%_sourcedir	%{_topdir}/%{name}-%{version}

The only question remaining is if there are other macros apart from
%{version} and %{release} that should not be overwritten when a next
package is parsed.

Leonard.

-- 
mount -t life -o ro /dev/dna /genetic/research

-------------- next part --------------
A non-text attachment was scrubbed...
Name: rpm-4.2.1-initialpackage.patch
Type: text/x-patch
Size: 3455 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-devel-list/attachments/20040621/1dbb9e40/attachment.bin>


More information about the fedora-devel-list mailing list