[opensuse-factory] Prevent Postgres 10 from installation

Morning, I have a package that requires postgresql96-server (as defined in spec file) postgresql96-server < 10 When I install it, zypper automatically selects postgres10 as recommended package. This will lead to a malfunction. Adding --no-recommends will probably fix this on a one-time-basis, but I would prefer a behaviour that is more bullet-proof Any ideas? Thanks Axel -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org

On Wednesday, 6 June 2018 09:35:55 BST Axel Braun wrote:
Thanks Axel
-- opensuse:tumbleweed:20180530 Qt: 5.10.0 KDE Frameworks: 5.46.0 - KDE Plasma: 5.12.5 - kwin 5.12.5 kmail2 5.8.1 - akonadiserver 5.8.1 - Kernel: 4.16.12-1-default - xf86-video-nouveau: 1.0.15 -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org

On Wednesday, 6 June 2018 09:43:54 BST Axel Braun wrote:
only once. You could also find out the file it updates and send that out with whatever you are doing - there is also a "cli" way of updating the config. I came across this issue months ago as i use postgresl96 with akonadi and i configured it then and i've not had an issue since.
Thanks Axel
-- opensuse:tumbleweed:20180530 Qt: 5.10.0 KDE Frameworks: 5.46.0 - KDE Plasma: 5.12.5 - kwin 5.12.5 kmail2 5.8.1 - akonadiserver 5.8.1 - Kernel: 4.16.12-1-default - xf86-video-nouveau: 1.0.15 -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org

On Jun 06 2018, Axel Braun <axel.braun@gmx.de> wrote:
Malfunction in which way? If postgresql10 doesn't conflict with postgresql96-server then there is no reason not to install it. Andreas. -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different." -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org

Am Mittwoch, 6. Juni 2018, 11:05:58 CEST schrieb Andreas Schwab:
The application shows a malfunction, which is fixed in a later version (but we cant update it right now). So how would you then recommend to make sure that postgres96 is started if both are installed? Currently it picks 10 by default Second, where does the recommendation for postgres10 come from? Thanks Axel -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org

Op woensdag 6 juni 2018 13:05:33 CEST schreef Axel Braun:
There are 2 choices for the alternative postgresql (providing /usr/lib/ postgresql). Selection Path Priority Status ------------------------------------------------------------ 0 /usr/lib/postgresql10 100 auto mode 1 /usr/lib/postgresql10 100 manual mode * 2 /usr/lib/postgresql96 96 manual mode My dedicated guess is that you could even do that from the package concerned. But, update-alternatives is what is setting pg10 to start. -- Gertjan Lettink a.k.a. Knurpht openSUSE Board Member openSUSE Forums Team -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org

On Jun 06 2018, Axel Braun <axel.braun@gmx.de> wrote:
The application shows a malfunction, which is fixed in a later version (but we cant update it right now).
If your package conflicts with another package you need to tell that the solver. Andreas. -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different." -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org

And how would I do that? A statement like Conflicts: postgresql10 in the spec file does not fix it Thanks Axel -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org

On Jun 06 2018, "Axel Braun" <Axel.Braun@gmx.de> wrote:
Without details there is nothing that can be done. Andreas. -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different." -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org

Am Donnerstag, 7. Juni 2018, 08:40:53 CEST schrieb Andreas Schwab:
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 But - postgresql96-server is now an unresolvable dependency: localhost:/home/test/Downloads # zypper in trytond-4.2.11- lp150.25.1.noarch.rpm Loading repository data... Reading installed packages... Resolving package dependencies... Problem: trytond-4.2.11-lp150.25.1.noarch requires postgresql96-server, but this requirement cannot be provided not installable providers: postgresql96-server-9.6.8- lp150.1.2.x86_64[openSUSE-Leap-15.0-1] postgresql96-server-9.6.8-lp150.1.2.x86_64[repo-oss] Solution 1: do not install trytond-4.2.11-lp150.25.1.noarch Solution 2: break trytond-4.2.11-lp150.25.1.noarch by ignoring some of its dependencies localhost:/home/test/Downloads # zypper if postgresql96-server Loading repository data... Reading installed packages... Information for package postgresql96-server: -------------------------------------------- Repository : openSUSE-Leap-15.0-1 Name : postgresql96-server Version : 9.6.8-lp150.1.2 Arch : x86_64 Vendor : openSUSE Installed Size : 18.3 MiB Installed : No Status : not installed Source package : postgresql96-9.6.8-lp150.1.2.src Summary : The Programs Needed to Create and Run a PostgreSQL Server Description : PostgreSQL is an advanced object-relational database management system that supports an extended subset of the SQL standard, including transactions, foreign keys, sub-queries, triggers, and user-defined types and functions. This package includes the programs needed to create and run a PostgreSQL server, which will in turn allow you to create and maintain PostgreSQL databases. -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org

On Thu, 2018-06-07 at 09:39 +0200, Axel Braun wrote:
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. cheers Dominique

Am Donnerstag, 7. Juni 2018, 09:50:53 CEST schrieb Dominique Leuenberger / DimStar:
...but if I dont conflict it, it installs version 10. -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org

On Thu, 07 Jun 2018 09:54:04 +0200 Axel Braun <axel.braun@gmx.de> wrote:
I think that your problem is that you conflict with client tools and not with server. So what about Conflicts: postgresql10-server ? -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org

On Thu, 2018-06-07 at 09:54 +0200, Axel Braun wrote:
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. Cheers Dominqiue

Am Donnerstag, 7. Juni 2018, 09:58:04 CEST schrieb Dominique Leuenberger / DimStar:
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 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 Any expert advice? Thanks Axel -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org

Hi Axel, On Thu, 07 Jun 2018, 12:25:05 +0200, Axel Braun wrote:
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.
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.
HTH, cheers. l8er manfred

Hello Manfred, Am Donnerstag, 7. Juni 2018, 15:49:41 CEST schrieb Manfred Hollstein:
I need the server in the first hand. So, if I define Requires: postgresql96-server and Conflicts: postgresql10-server Conflicts: postgresql10 (which should cover the relevant cases) it still tries to install: [...] The following 5 NEW packages are going to be installed: postgresql postgresql-server postgresql96 postgresql96-server trytond 5 new packages to install. Overall download size: 6.1 MiB. Already cached: 0 B. After the operation, additional 28.3 MiB will be used. Continue? [y/n/...? shows all options] (y): Retrieving package postgresql-10-lp150.4.4.noarch (1/5), 11.8 KiB ( 713 B unpacked) Retrieving: postgresql-10-lp150.4.4.noarch.rpm -> still postgres 10.
looking at meta-package postgres-server: test@localhost:/var/cache/zypp/packages/openSUSE-Leap-15.0-1/noarch> rpm -qp postgresql-server-10-lp150 .4.4.noarch.rpm --provides config(postgresql-server) = 10-lp150.4.4 postgresql-init = 10.0-lp150.4.4 postgresql-server = 10-lp150.4.4 postgresql-server-noarch = 10-lp150.4.4 -> postgres 10 seems to come always through the meta package -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org

Hi Dominique, Am Freitag, 8. Juni 2018, 12:25:12 CEST schrieb Dominique Leuenberger / DimStar:
OK, seems the package name was misleading to me. seems that finally the specfile settings are correct, this time only postgres96 was installed! @all, thanks for you help! Axel -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org

Hi Axel, On Thu, 07 Jun 2018, 09:39:12 +0200, Axel Braun wrote:
The second conflict is wrong because it's too broad; "postgresql" is provided by postgresql96-server and since trytond doesn't want a package installed which provides "postgresql", it cannot be installed. What happens if you remove the second Conflicts:? HTH, cheers. l8er manfred

On Wednesday, 6 June 2018 09:35:55 BST Axel Braun wrote:
Thanks Axel
-- opensuse:tumbleweed:20180530 Qt: 5.10.0 KDE Frameworks: 5.46.0 - KDE Plasma: 5.12.5 - kwin 5.12.5 kmail2 5.8.1 - akonadiserver 5.8.1 - Kernel: 4.16.12-1-default - xf86-video-nouveau: 1.0.15 -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org

On Wednesday, 6 June 2018 09:43:54 BST Axel Braun wrote:
only once. You could also find out the file it updates and send that out with whatever you are doing - there is also a "cli" way of updating the config. I came across this issue months ago as i use postgresl96 with akonadi and i configured it then and i've not had an issue since.
Thanks Axel
-- opensuse:tumbleweed:20180530 Qt: 5.10.0 KDE Frameworks: 5.46.0 - KDE Plasma: 5.12.5 - kwin 5.12.5 kmail2 5.8.1 - akonadiserver 5.8.1 - Kernel: 4.16.12-1-default - xf86-video-nouveau: 1.0.15 -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org

On Jun 06 2018, Axel Braun <axel.braun@gmx.de> wrote:
Malfunction in which way? If postgresql10 doesn't conflict with postgresql96-server then there is no reason not to install it. Andreas. -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different." -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org

Am Mittwoch, 6. Juni 2018, 11:05:58 CEST schrieb Andreas Schwab:
The application shows a malfunction, which is fixed in a later version (but we cant update it right now). So how would you then recommend to make sure that postgres96 is started if both are installed? Currently it picks 10 by default Second, where does the recommendation for postgres10 come from? Thanks Axel -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org

Op woensdag 6 juni 2018 13:05:33 CEST schreef Axel Braun:
There are 2 choices for the alternative postgresql (providing /usr/lib/ postgresql). Selection Path Priority Status ------------------------------------------------------------ 0 /usr/lib/postgresql10 100 auto mode 1 /usr/lib/postgresql10 100 manual mode * 2 /usr/lib/postgresql96 96 manual mode My dedicated guess is that you could even do that from the package concerned. But, update-alternatives is what is setting pg10 to start. -- Gertjan Lettink a.k.a. Knurpht openSUSE Board Member openSUSE Forums Team -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
participants (10)
-
Andreas Schwab
-
Axel Braun
-
Axel Braun
-
Dominique Leuenberger / DimStar
-
Dr. Axel Braun
-
Ianseeks
-
Josef Reidinger
-
Knurpht @ openSUSE
-
Manfred Hollstein
-
martin@pluskal.org