Bug 888507

Summary: postgresql can't be updated
Product: [openSUSE] openSUSE Tumbleweed Reporter: Stephan Kulow <coolo>
Component: libzyppAssignee: Reinhard Max <max>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: max, mls, suse-beta
Version: 201407*   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Stephan Kulow 2014-07-23 08:06:38 UTC
Looks like postgresql93 is not obsoleting postgresql92, so you get this during update:

File /usr/bin/psql
  from install of
     postgresql93-9.3.4-1.2.x86_64(openSUSE-Oss)
  conflicts with file from package
     postgresql92-9.2.7-4.4.1.x86_64(@System)

(and many more)
Comment 1 Stephan Kulow 2014-07-23 08:07:59 UTC
Even though it's most likely not a real conflict as both 
 /usr/bin/psql -> /etc/alternatives/psql
Comment 2 Michael Andres 2014-07-23 09:10:46 UTC
@Michael: Any idea why?
Comment 3 Michael Schröder 2014-07-23 09:46:40 UTC
Because it's not true what coolo said, postgresql92-9.2.7-4.4.1.x86_64 contains a symlink to ../lib/postgresql92/bin/psql
Comment 4 Stephan Kulow 2014-07-23 09:55:18 UTC
ah
Comment 5 Stephan Kulow 2014-07-23 09:56:10 UTC
so postgresql93 needs to conflict with postgresql92
Comment 6 Reinhard Max 2014-07-23 10:25:43 UTC
They are designed to be installable in parallel and hence MUST NOT conflict or obsolete each other. Neither zypper nor RPM complained back when I introduced this packaging scheme. No idea why zypper is complaining now, but it looks like a regression to me.
Comment 7 Michael Schröder 2014-07-23 10:34:42 UTC
What are you talking about? rpm complains loudly:

$ 
rpm -U --nodeps --test postgresql92-9.2.7-4.4.1.x86_64.rpm postgresql93-9.3.4-1.2.x86_64.rpm 
        file /usr/bin/clusterdb conflicts between attempted installs of postgresql92-9.2.7-4.4.1.x86_64 and postgresql93-9.3.4-1.2.x86_64
        file /usr/bin/createdb conflicts between attempted installs of postgresql92-9.2.7-4.4.1.x86_64 and postgresql93-9.3.4-1.2.x86_64
        file /usr/bin/createlang conflicts between attempted installs of postgresql92-9.2.7-4.4.1.x86_64 and postgresql93-9.3.4-1.2.x86_64
        file /usr/bin/createuser conflicts between attempted installs of postgresql92-9.2.7-4.4.1.x86_64 and postgresql93-9.3.4-1.2.x86_64
        file /usr/bin/dropdb conflicts between attempted installs of postgresql92-9.2.7-4.4.1.x86_64 and postgresql93-9.3.4-1.2.x86_64
        file /usr/bin/droplang conflicts between attempted installs of postgresql92-9.2.7-4.4.1.x86_64 and postgresql93-9.3.4-1.2.x86_64
        file /usr/bin/dropuser conflicts between attempted installs of postgresql92-9.2.7-4.4.1.x86_64 and postgresql93-9.3.4-1.2.x86_64
        file /usr/bin/pg_basebackup conflicts between attempted installs of postgresql92-9.2.7-4.4.1.x86_64 and postgresql93-9.3.4-1.2.x86_64
        file /usr/bin/pg_dump conflicts between attempted installs of postgresql92-9.2.7-4.4.1.x86_64 and postgresql93-9.3.4-1.2.x86_64
        file /usr/bin/pg_dumpall conflicts between attempted installs of postgresql92-9.2.7-4.4.1.x86_64 and postgresql93-9.3.4-1.2.x86_64
        file /usr/bin/pg_receivexlog conflicts between attempted installs of postgresql92-9.2.7-4.4.1.x86_64 and postgresql93-9.3.4-1.2.x86_64
        file /usr/bin/pg_restore conflicts between attempted installs of postgresql92-9.2.7-4.4.1.x86_64 and postgresql93-9.3.4-1.2.x86_64
        file /usr/bin/psql conflicts between attempted installs of postgresql92-9.2.7-4.4.1.x86_64 and postgresql93-9.3.4-1.2.x86_64
        file /usr/bin/reindexdb conflicts between attempted installs of postgresql92-9.2.7-4.4.1.x86_64 and postgresql93-9.3.4-1.2.x86_64
        file /usr/bin/vacuumdb conflicts between attempted installs of postgresql92-9.2.7-4.4.1.x86_64 and postgresql93-9.3.4-1.2.x86_64
Comment 8 Stephan Kulow 2014-07-23 10:51:11 UTC
and yes, zypper used to ignore these problems and called rpm with --force - but that days are gone.
Comment 9 Reinhard Max 2014-07-23 10:55:35 UTC
Where is that postgresql92 package from? PostgreSQL 9.2 is not in Factory anymore and I don't get any complaints with the respective packages from server:database:postgresql.

It might be related to the fact that some new auto-reject mechanism forced me to change the link targets of /usr/bin/psql and friends for Factory some time ago, and your postgresql92 package might date from before that change.
Comment 10 Michael Schröder 2014-07-23 11:02:03 UTC
Why, it comes from 13.1, of course. People want to upgrade, don't they? (And I guess coolo has the same package installed when he reported the bug.)
Comment 11 Stephan Kulow 2014-07-23 11:14:57 UTC
and if can coinstall newer postgresql92 and newer postgresql93, the right fix is a conflict on < 9.2.7-4.4
Comment 12 Reinhard Max 2014-07-23 12:40:33 UTC
This again would defeat the purpose of the parallel installabilty, because we don't have 9.2 packages in Factory and hence need to keep the installed ones until the database files have been converted.

But I think I have a solution: Upstream is about to release new round of patchlevel updates for all recent PostgreSQL versions. We can take this as an opportunity to release a maintenance update for 13.1 that also "fixes" these symlinks so that they don't conflict any longer.

BTW, I still consider this a false positive, because these symlinks will get overwritten by update-alternatives immediately after installation. They're only there to have the packages working even when they get installed without update-alternatives around.
Comment 13 Reinhard Max 2014-08-06 13:17:59 UTC
*** Bug 881858 has been marked as a duplicate of this bug. ***
Comment 14 Reinhard Max 2015-09-15 09:11:20 UTC
Should be fixed by now.