RPM Community Forums

Mailing List Message of <rpm-users>

Re: rpm-5.0.2: changing package file name convention

From: Jeff Johnson <n3npq@mac.com>
Date: Wed 06 Feb 2008 - 16:58:20 CET
Message-Id: <43DBB6E8-998B-4D31-9CEB-723791853B35@mac.com>

On Feb 6, 2008, at 10:52 AM, Jeff Johnson wrote:

> On Feb 6, 2008, at 10:40 AM, Stefan Westmeier wrote:
>> Hi,
>> as I want my packages being named different than standard, I  
>> changed the naming convention by
>> setting:
>> %_build_name_fmt %%{NAME}-%%{VERSION}-%%{Project}-%%{Branch}-%% 
>> {RELEASE}.x86.rpm
>> %_repackage_name_fmt %%{NAME}-%%{VERSION}-%%{Project}-%%{Branch}-%% 
>> {RELEASE}.x86.rpm
>> I defined "Project" and "Branch" as additional tags via % 
>> _arbitrary_tags. Here some examples for packages:
>> most-bin-1.0-refprj-tr-0802061556.x86.rpm
>> most-src-1.0-refprj-tr-0802061556.x86.rpm
>> most-trg-1.0-refprj-tr-0802061556.x86.rpm
>> Using rpm -qa --qf '<some string>' showing the additional tags  
>> works fine.

I missed the use of arbitrary tags, apologies. Using arbitrary tags is
superior to changing Release: itself imho, because Release: comparisons
impose additional (and complicated) constraints on how EVR comparisons
determine "newer" in order to decide whether an "upgrade" is necessary.

You can change the default query format to include %{Project} etc

# Default headerSprintf() output format string for rpm -qa
# XXX   Note: escaped %% for use in headerSprintf()
%_query_all_fmt         %%{name}-%%{version}-%%{release}.%%{arch}

to be
     %_query_all_fmt         %%{name}-%%{version}--%%{Project}-%% 

73 de Jeff
Received on Wed Feb 6 16:58:44 2008
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.