Hi Axel, On Thu, 07 Jun 2018, 12:25:05 +0200, Axel Braun wrote:
Am Donnerstag, 7. Juni 2018, 09:58:04 CEST schrieb Dominique Leuenberger / DimStar:
On Thu, 2018-06-07 at 09:54 +0200, Axel Braun wrote:
Am Donnerstag, 7. Juni 2018, 09:50:53 CEST schrieb Dominique Leuenberger /
DimStar:
Sure. The package is: https://build.opensuse.org/package/show/ home:DocB:branches:Application:ERP:GNUHealth:Factory/trytond
Conflicts is fixed in between by considering all postgresql[10] entries: Conflicts: postgresql10 Conflicts: postgresql
Don't conflict postgresql: this is only a meta-package bringing in the various scripts to switch between the PGSQL versions. Every postgresql* requires its presence.
...but if I dont conflict it, it installs version 10.
postgresql (the meta package) has version 10; but it has no (direct) relation to postgresql10. The verison of the meta package is only the relevant to the solver to find a possible default, if nothing else can be found.
Well, I've tried different conditions like Requires: postgresql-server < 10 Result: Problem: nothing provides postgresql-server < 10 needed by trytond-4.2.11- lp150.27.1.noarch
Conflicts: postgresql10-server Results - installs postgres 10
What exactly do you need from PostgreSQL? Is it the server part or the client part or both? If you know that, you can either (a) Conflicts: postgresql10-server postgresql10, or (b) Requires: postgresql96-server postgresql96 But again, I don't know if you need server and/or client part, so (b) could pull in the client part which you don't actually need. Clarify that first, please.
Additionally I tried setting the update-alternatives in the %post section update-alternatives --set postgresql /usr/lib/postgresql96 which resulted in a build error
After all there seems no clean way to install postgres96 without user interaction
The update-alternatives thing comes way too late, the solver has already decided by then. What you need is a Requires: postgresql96-server and get rid of the other Conflicts: and the Requires: postgresql-server < 10. As a hint, you can find out what a particular RPM package provides itself by running "rpm -qp <downloaded-package> --provides"; then choose a symbol which appears to be as specific as you need it, but still looks like a symbol with some "meta"-like service, so will be provided by maintenance updates of that series, too.
Any expert advice? Thanks Axel
HTH, cheers. l8er manfred