Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 154779 - Blocking prevents to upgrade postgresql
Summary: Blocking prevents to upgrade postgresql
Status: VERIFIED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
: 154842 156002 156190 158978 160891 171113 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-11-11 02:46 UTC by radoslaww
Modified: 2007-09-23 00:15 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description radoslaww 2006-11-11 02:46:54 UTC
When you try to upgrade postgresql from 8.1.4 to 8.1.5 running command:

emerge -p postgresql libpq

you get the following message:

[blocks B     ] <=dev-db/postgresql-8.1.4 (is blocking dev-db/libpq-8.1.5)
[ebuild     U ] dev-db/libpq-8.1.5 [8.1.4] USE="-pg-intdatetime%" 
[ebuild     U ] dev-db/postgresql-8.1.5 [8.1.4] USE="-tcl% -test%"

A workaround is to remove postgresql first, with command:

emerge --unmerge postgresql

Than you can install the newer version with the command:

emerge postgresql libpq

I don't know if this is postgresql dependency bug or portage bug but I have faced few similiar cases when I had to uninstall packages to make upgrade.
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2006-11-11 02:49:04 UTC
(In reply to comment #0)
> A workaround is to remove postgresql first, with command:

> I don't know if this is postgresql dependency bug or portage bug but I have
> faced few similiar cases when I had to uninstall packages to make upgrade.

Not a bug; it's intended (pg_config has been moved to libpq and emerge would fail w/ collisions otherwise).
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2006-11-11 14:18:16 UTC
*** Bug 154842 has been marked as a duplicate of this bug. ***
Comment 3 Marti Raudsepp 2006-11-11 14:31:30 UTC
(In reply to comment #1)
> Not a bug; it's intended (pg_config has been moved to libpq and emerge would
> fail w/ collisions otherwise).

Then one could mark libpq-8.1.5 as blocking <=postgresql-8.1.4 and not the other way around - forcing the user to upgrade postgresql first, and then libpq. A mutually exclusive block is not necessary as far as I can tell.
Comment 4 Jakub Moc (RETIRED) gentoo-dev 2006-11-11 14:33:47 UTC
No. Any blocker needs to be mutual.
Comment 5 Jakub Moc (RETIRED) gentoo-dev 2006-11-23 01:20:42 UTC
*** Bug 156002 has been marked as a duplicate of this bug. ***
Comment 6 Rafal Wijata 2006-11-23 01:37:54 UTC
And what, I need to uninstall postgresql first.
It's f***ing impossible. The database is in fact running.
I can't afford for such long delay on my pIII600...
Especially that pgsql keeps users account info...
Damn You!
Comment 7 Marti Raudsepp 2006-11-23 02:02:51 UTC
Use --nodeps to ignore the blocks, worked for me:
# emerge --nodeps postgresql libpq

I was very annoyed by this behavior as well.
Comment 8 Jakub Moc (RETIRED) gentoo-dev 2006-11-23 03:26:41 UTC
(In reply to comment #7)
> Use --nodeps to ignore the blocks, worked for me:
> # emerge --nodeps postgresql libpq

Except that it will bomb out on FEATURES="collision-protect" - which is the whole point of the blocker being in place... ;)
Comment 9 Marti Raudsepp 2006-11-23 03:40:16 UTC
(In reply to comment #8)
> Except that it will bomb out on FEATURES="collision-protect" - which is the
> whole point of the blocker being in place... ;)

Not as far as I understand it. I'm assuming this description is correct:
(From comment #1)
> Not a bug; it's intended (pg_config has been moved to libpq and emerge would
> fail w/ collisions otherwise).

This seems to imply that the pg_config executable (possibly with other files) has moved from the postgresql ebuild to the libpq ebuild. Meaning that if one upgrades postgresql *before*, it will remove the pg_config binary, and when emerging libpq *later*, it will re-add it. I can't see how this could possibly collide -- except that you will not be able to emerge libpq-dependent applications between the two merges.

That's why I explicitly ordered the arguments to emerge postgresql first, and libpq next. And also why I proposed a one-way block, although I can see that the window between the two merges might possibly in some rare cases cause breakage.
Comment 10 Jakub Moc (RETIRED) gentoo-dev 2006-11-23 03:42:09 UTC
As already noted above, one-way blocks don't work. Closing this, won't be changed.
Comment 11 Marti Raudsepp 2006-11-23 04:00:04 UTC
(In reply to comment #10)
> As already noted above, one-way blocks don't work. Closing this, won't be
> changed.

They indeed won't work with 'emerge --upgrade' as Portage cannot resolve blocks without user interaction, as is the case with mutual blocks. But I can't see why it wouldn't work when one explicitly issued 'emerge postgresql' (that is, without --upgrade and without libpq) -- if postgresql didn't block <=libpq-8.1.4, the emerge would go through and would let the user upgrade libpq subsequently, without resorting to --nodeps!

The postgresql-8.1.5 pkg_postinst could inform the user that they also need to upgrade libpq before any libpq-dependent packages.

Fine by me if this bug doesn't get resolved, but "one-way blocks don't work" does not sound like a good justification. Mutual blocks might be necessary in the general case, but an inconsistency with pg_config in the worst case won't kill anyone.

I will shut up now. :)
Comment 12 Jakub Moc (RETIRED) gentoo-dev 2006-11-25 02:35:26 UTC
*** Bug 156190 has been marked as a duplicate of this bug. ***
Comment 13 Jakub Moc (RETIRED) gentoo-dev 2006-12-23 14:25:51 UTC
*** Bug 158978 has been marked as a duplicate of this bug. ***
Comment 14 Jakub Moc (RETIRED) gentoo-dev 2007-01-08 14:29:34 UTC
*** Bug 160891 has been marked as a duplicate of this bug. ***
Comment 15 Jakub Moc (RETIRED) gentoo-dev 2007-03-16 14:14:48 UTC
*** Bug 171113 has been marked as a duplicate of this bug. ***