[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[PATCH] version and release macros



Hi,

(Same message with attachment waits for moderator approval as "Message
body is too big: 4423 bytes with a limit of 4 KB". Referring you to
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=124364 for the
patch.)

Using a non root build root setup I noticed the macros %{version} and
%{release} get overwritten when another package is defined in the spec
file.

Attached is a patch that fixes this issue for the above macros, as well
as the backward compatibility macros %{PACKAGE_VERSION} and
%{PACKAGE_RELEASE}.

To achieve this it sets (the already available variable) initialPackage
to 0 only when a %package tag is found in the spec file by introducing a
PART_PACKAGE besides a PART_PREAMBLE. The mentioned macros are now
conditionally set.

This patch seems to work as intended. You can now use
%_sourcedir %{_topdir}/%{name}-%{version}
without rpm getting confused about the version in case more than one
package version is defined in the spec file.

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




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]