How to override Prefer?
Hi, It seems that the Prefer directive always prefer the first prefer but ignore later prefers? Since project conf is recursively inherited from repositories used, what is the preferred way to override the Prefer defined in repositories by a different one in my own project conf? Simply putting a Prefer line in my project conf doesn't work as inherited projconfs always appear before my projconf in the buildconfig. Thanks, Kai
Am 14.03.22 um 11:57 schrieb Kai Liu:
Hi,
It seems that the Prefer directive always prefer the first prefer but ignore later prefers?
Since project conf is recursively inherited from repositories used, what is the preferred way to override the Prefer defined in repositories by a different one in my own project conf? Simply putting a Prefer line in my project conf doesn't work as inherited projconfs always appear before my projconf in the buildconfig. Hi,
You need to erase the underlying Prefer by adding it to your config but adding a ! in front. After that you can add your own prefer. Greetings, Stephan
On 2022/03/14 Mon 13:34, Stephan Kulow wrote:
Am 14.03.22 um 11:57 schrieb Kai Liu:
Hi,
It seems that the Prefer directive always prefer the first prefer but ignore later prefers?
Since project conf is recursively inherited from repositories used, what is the preferred way to override the Prefer defined in repositories by a different one in my own project conf? Simply putting a Prefer line in my project conf doesn't work as inherited projconfs always appear before my projconf in the buildconfig. Hi,
You need to erase the underlying Prefer by adding it to your config but adding a ! in front. After that you can add your own prefer.
Thanks! I also found this link: https://en.opensuse.org/openSUSE:Build_Service_prjconf#Prefer Which has more detailed use case explained than the OBS user guide. Here it says a "-" sign can be used to erase the previous Prefer. I tried "!" and "-", both can work. Regards, Kai
On Montag, 14. März 2022, 14:25:55 CET Kai Liu wrote:
On 2022/03/14 Mon 13:34, Stephan Kulow wrote:
Am 14.03.22 um 11:57 schrieb Kai Liu:
Hi,
It seems that the Prefer directive always prefer the first prefer but ignore later prefers?
Since project conf is recursively inherited from repositories used, what is the preferred way to override the Prefer defined in repositories by a different one in my own project conf? Simply putting a Prefer line in my project conf doesn't work as inherited projconfs always appear before my projconf in the buildconfig. Hi,
You need to erase the underlying Prefer by adding it to your config but adding a ! in front. After that you can add your own prefer.
Thanks!
I also found this link:
https://en.opensuse.org/openSUSE:Build_Service_prjconf#Prefer
Which has more detailed use case explained than the OBS user guide. Here it says a "-" sign can be used to erase the previous Prefer. I tried "!" and "-", both can work.
"-" is a de-prefer, so voting it down. while "!" is erasing a former prefer setting. -- Adrian Schroeter <adrian@suse.de> Build Infrastructure Project Manager SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Ivo Totev
On 2022/03/14 Mon 15:05, Adrian Schröter wrote:
"-" is a de-prefer, so voting it down.
while "!" is erasing a former prefer setting.
Thanks! So do these apply to other directives such as Preinstall, Suggest, Substitute etc.? I hope this could be documented in the user guide. Regards, Kai
participants (3)
-
Adrian Schröter
-
Kai Liu
-
Stephan Kulow