[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: Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
- Date: Tue, 3 Dec 2024 14:26:56 +0100
- To: user@xxxxxxxxxxxxxxxxxxxxxx
Le 03/12/2024 à 14:12, munix9 a écrit :
Am 03.12.24 um 13:46 schrieb munix9: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.RegardsPlease throw out all the stuff about 'gb-mongodb' completely from the specs, both 15.6 and TW.The purpose of '%bcond_with gb_mongodb' in spec-files is to allow people to build packages other than the default.But since this has now been removed, it no longer makes any sense to supply the configuration for it.'mongodb' (more precisely: mongo-c-driver) is currently neither in Leap nor in TW in the official repo, so everything except '--disable-mongodb' can be removed.The situation is similar for 'gb-qt5-webkit': This is available in Leap, but not in TW. So either it is thrown out completely, or configured differently via Gambas-Magic for 15.6 and TW.
OK, I didn't know. I just added the commands to show how to use them. And test them.
So no 'gb-mongo-db' at all. And 'gb-qt5-webkit' only for 15.6.By the way, I am not reinventing the wheel. The spec file with the conditional commands is not a spec file, it is a template for spec files. So these conditional commands (@{if}@...) are not at the same level of abstraction of the spec files conditionals (%bcond...).
You have to use the @{if}@ commands when there are differences in the which packages are made, because the package description is generated.
Otherwise the spec files %bcond can be used for every other conditional need.
Regards, -- Benoît Minisini.
[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> |
Re: [CONFIGURATION] missing openSUSE_Leap_15.6 for OBS | munix9 <munix9@xxxxxxxxxxxxxx> |
Re: [CONFIGURATION] missing openSUSE_Leap_15.6 for OBS | munix9 <munix9@xxxxxxxxxxxxxx> |