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 - 17:19:05 CET
Message-Id: <8F70258B-F090-4954-9DCF-037B4EED5DBC@mac.com>

>
> to be
>     %_query_all_fmt         %%{name}-%%{version}--%%{Project}-%% 
> {Branch}-%%{release}.%%{arch}
>

Ad one more change is needed to skip if package does not have  
Project: and Branch: tags,
as well as to add the trailing '-' dash characters in display output.

That I can't type that queryformat directly without errors of some sort.

Here's an example from rpmpopt that prints details of %post
iff %post is included in a package:

%|POSTIN?{postinstall scriptlet\
%|POSTINPROG?{ (using %{POSTINPROG})}|:\n%{POSTIN}\n}:\
{%|POSTINPROG?{postinstall program: %{POSTINPROG}\n}|}|\

So something like (untested) needs to be added:

    %|Project?{-%{Project}}:{}|

Here's my shot (watch for typos and line wrap) at the complete  
definition:

%_query_all_fmt         %%{name}-%%{version}%%|Project?{-%%{Project}}: 
{}|%%|Branch?{-%%{Branch}}:{}|-%%{release}.%%{arch}

hth

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