prjconf Release + OBS-DCH-RELEASE = 💥; if statement in prjconf not working as expected

In our prjconf we do the classic:

Release: %%{?release_prefix}.<CI_CNT>.<B_CNT>

Now we are building debs and do

OBS-DCH-RELEASE = 1

in the dsc to get the same effect (DEBTRANSFORM was very buggy so we can’t use that until the github issues I created are solved)

The problem now is that w/ the Release bit in prjconf is that the debs lose the

<CI_CNT>.<B_CNT>

.

If we take out Release bit from prjconf the debs are fine but the RPMs lose the

release_prefix

To solve this, based on the %{debian} entry in the table at https://en.opensuse.org/openSUSE:Build_Service_cross_distribution_howto we tried this:


|%if !0%{?debian}|
|---|
|Release: %%{?release_prefix}.<CI_CNT>.<B_CNT>.cpanel|
|%endif|



That behaved as if %{debian} was not true when it tried to build the debs (i.e. the RPMS were fine but the debs were missing

<CI_CNT>.<B_CNT>

.

Is there a way to have projconf’s Release: only apply to RPMs and not apply to debs?

Or is there any other way (besides RPMs in one project and debs in another project, may have to do that but would require a lot of changes to tooling and consumers) to get both RPMs and debs to have release prefix and

<CI_CNT>.<B_CNT>

?

TIA!

Correction: I meant we do OBS-DCH-RELEASE: 1 in the dsc file not OBS-DCH-RELEASE = 1.

sorry if that caused any confusion

pretty sure this is a bug ➜ https://github.com/openSUSE/obs-build/issues/695

would still be nice to have a work around until it is fixed, the if statement for example :confused:

That is 100% the problem, added a patch that will work for standard release_prefix format but the regex will need to be smarter unless that is the only Release format OBS wants to support in prjconf