[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [CONFIGURATION] missing openSUSE_Leap_15.6 for OBS
[Thread Prev] | [Thread Next]
- Subject: Re: [CONFIGURATION] missing openSUSE_Leap_15.6 for OBS
- From: munix9 <munix9@xxxxxxxxxxxxxx>
- Date: Tue, 3 Dec 2024 13:46:06 +0100
- To: user@xxxxxxxxxxxxxxxxxxxxxx
Am 03.12.24 um 13:32 schrieb Benoît Minisini:
Le 03/12/2024 à 12:23, Benoît Minisini a écrit :Actually it's better to generate different files for different versions, because the list of packages that must be generated for one version can only be elaborated by 'gambas-package-config' outside of the configuration files.But if I add conditional commands (@{if}@ @{else}@ @{endif}@), the same template file can be used to generate all openSUSE spec files. So we get the flexibility back.Regards,I have added conditional commands inside the openSUSE spec template file to manage the difference between Tumbleweed and Leap 15.6.I don't think what I done is correct, but it's there so that you can look and understand how it works.The file parsing is now done with some global symbol defined. For OpenSUSE, I just defined the "version" symbol with "15.6", or "99" for Tumbleweed. And I test that version with the "{@if@}" command and comparison operators (that know how to compare version strings, using the natural comparison feature of Gambas).For example: @{if version > 15.6}@ ... @{endif}@ Regards,
Uh, sorry, I don't understand: You are trying to recreate the logic that rpm-spec already offers in Gambas.
There's a saying for that too: reinventing the wheel.But if that's what you want to do, then go ahead - I don't see any simplification of the configuration here, but rather an unnecessary complication.
Regards
Re: [CONFIGURATION] missing openSUSE_Leap_15.6 for OBS | munix9 <munix9@xxxxxxxxxxxxxx> |
[CONFIGURATION] missing openSUSE_Leap_15.6 for OBS | munix9 <munix9@xxxxxxxxxxxxxx> |
Re: [CONFIGURATION] missing openSUSE_Leap_15.6 for OBS | Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx> |
Re: [CONFIGURATION] missing openSUSE_Leap_15.6 for OBS | Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx> |