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.
>
> Whenever I install packages with
>
> rpm -i most-bin-1.0-refprj-tr-0802061556.x86.rpm
> the package being installed is reported in the output as
>
> most-bin-1.0-0802061556
>
> Is there any way to get the additional parts of the package being
> displayed ?
>
Sure.
Don't bother redefining %_build_name_fmt et al, you want/need to
change Release:
instead.
Change the spec file to look something like
Release: %{?Project:%{Project}_}%{?Branch:%{Branch}_}0802061556
Note the use of underscore '_' rather than dash '-'. rpmbuild forbids
'-' in Version: and Release:
so that a dash '-' character can be used as a separator in dependency
EVR strings with possibly
unspecified V and R.
You could also simplify to
Release: %{?Project}%{?Branch}0802061556
if you chose to add the trailing underscore '_' in the macro
definitions.
73 de Jeff
Received on Wed Feb 6 16:52:38 2008