Mailinglist Archive: opensuse-buildservice (306 mails)
| < Previous | Next > |
RE: [opensuse-buildservice] %{?dist} in obs
- From: <Michael_E_Brown@xxxxxxxx>
- Date: Tue, 26 Jan 2010 15:53:46 -0600
- Message-id: <F757EE5C3631ED4DBDFD7709119219FE012E10EC19@xxxxxxxxxxxxxxxxxxxxxxxxxx>
That works just fine. As long as you have it in the prjconf with the doubled-up
'%', it will do whatever you want:
Given example rpm:
name: foo
version: 1.0
checkin count = 42
build count = 3
with Prjconf:
Release: 1%%{?dist}
== foo-1.0-1.dist
Release: 123.<CI_CNT>%%dist
== foo-1.0-123.42.dist
Release: 42
== foo-1.0-42
etc. You should see the pattern. The key is that you have to %% or else
%{?dist} gets evaluated *before* it is substituted into the SPEC file, which
ends up being a nil string.
--
Michael
________________________________________
From: Robert Xu [robxu9@xxxxxxxxx]
Sent: Tuesday, January 26, 2010 2:42 PM
To: Brown, Michael E; opensuse-buildservice@xxxxxxxxxxxx
Subject: Re: [opensuse-buildservice] %{?dist} in obs
well, does that expand right?
because i would like to do something like this:
Release: <release#>%{dist}
and when %{dist} expands, i want the result:
packagename-3.6-1.dist.rpm
where ".dist" is %{dist}
On 1/26/2010 10:07 AM, Michael_E_Brown@xxxxxxxx wrote:
Robert Xu
Ever tried Linux? :)
--
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-buildservice+help@xxxxxxxxxxxx
'%', it will do whatever you want:
Given example rpm:
name: foo
version: 1.0
checkin count = 42
build count = 3
with Prjconf:
Release: 1%%{?dist}
== foo-1.0-1.dist
Release: 123.<CI_CNT>%%dist
== foo-1.0-123.42.dist
Release: 42
== foo-1.0-42
etc. You should see the pattern. The key is that you have to %% or else
%{?dist} gets evaluated *before* it is substituted into the SPEC file, which
ends up being a nil string.
--
Michael
________________________________________
From: Robert Xu [robxu9@xxxxxxxxx]
Sent: Tuesday, January 26, 2010 2:42 PM
To: Brown, Michael E; opensuse-buildservice@xxxxxxxxxxxx
Subject: Re: [opensuse-buildservice] %{?dist} in obs
well, does that expand right?
because i would like to do something like this:
Release: <release#>%{dist}
and when %{dist} expands, i want the result:
packagename-3.6-1.dist.rpm
where ".dist" is %{dist}
On 1/26/2010 10:07 AM, Michael_E_Brown@xxxxxxxx wrote:
I assume you want to do something like this:--
Release:<CI_CNT>.<B_CNT>%%{?dist}
Note the double %%, or else %{?dist} is expanded too early, resulting in a
nil string. This is how I have my projects configured.
--
Michael
________________________________________
From: Robert Xu [robxu9@xxxxxxxxx]
Sent: Tuesday, January 26, 2010 5:58 AM
To: opensuse-buildservice@xxxxxxxxxxxx
Subject: [opensuse-buildservice] %{?dist} in obs
Hello all,
As you know, the Fedora macros have a dist macro in the release of
their packages. So I set my own dist macro in the Project Config and
everytime it builds, it changes dist to a random number. Help?
Robert Xu
Ever tried Linux? :)
--
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-buildservice+help@xxxxxxxxxxxx
Robert Xu
Ever tried Linux? :)
--
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-buildservice+help@xxxxxxxxxxxx
| < Previous | Next > |