Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 306155 - dev-db/mysql-5.1.44 is blocked by media-sound/amarok-2.2.2.90 with USE=embedded
Summary: dev-db/mysql-5.1.44 is blocked by media-sound/amarok-2.2.2.90 with USE=embedded
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal with 1 vote (vote)
Assignee: Gentoo Linux MySQL bugs team
URL:
Whiteboard:
Keywords:
: 306507 306509 (view as bug list)
Depends on:
Blocks: 306315
  Show dependency tree
 
Reported: 2010-02-21 09:48 UTC by saft
Modified: 2010-09-04 10:22 UTC (History)
23 users (show)

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


Attachments
emerge --info (emergeInfo,6.70 KB, text/plain)
2010-02-21 09:56 UTC, saft
Details
stdout of 'emerge -uDpdvN @world' (emerge.log.gz,489.87 KB, text/plain)
2010-02-22 20:00 UTC, Leonid Podolny
Details
stderr of 'emerge -uDpdvN @world' (emerge.err.gz,164.13 KB, text/plain)
2010-02-22 20:00 UTC, Leonid Podolny
Details

Note You need to log in before you can comment on or make changes to this bug.
Description saft 2010-02-21 09:48:52 UTC
updating mysql from 5.0 to 5.1 while amarok is already updated and build with embedded USEflag amarok blocks the mysql update.

('ebuild', '/', 'dev-db/mysql-5.1.44', 'merge') pulled in by
    >=dev-db/mysql-5.0.76-r1[-minimal,embedded] required by ('installed', '/', 'media-sound/amarok-2.2.2.90', 'nomerge')
    =dev-db/mysql-5.1* required by ('ebuild', '/', 'virtual/mysql-5.1', 'merge')
    dev-db/mysql required by world

  ('installed', '/', 'media-sound/amarok-2.2.2.90', 'nomerge') pulled in by
    media-sound/amarok required by world

emerging with -embedded does not effect anything

Reproducible: Always

Steps to Reproduce:
1.emerge mysql 5.0 and amarok 2.2.2.90
2.update from mysql 5.0 to 5.1
3.see amarok blocking updateprocess
Comment 1 saft 2010-02-21 09:56:43 UTC
Created attachment 220587 [details]
emerge --info
Comment 2 FL 2010-02-21 12:56:55 UTC
amarok activates embedded automatically in its ebuild, even if you deactivate it via USE or env USE at buildtime.

I solved the problem by: 
1. unmerging amarok 
2. emerging mysql with USE="embedded"
3. reinstalling amarok 

Also make sure you compile mysql with -fPIC in your CFLAGS or amarok will fail with: Linking CXX shared module ../../../../lib/amarok_collection-mysqlservercollection.so

Sadly I have no other idea of how to solve this problem.

Comment 3 saft 2010-02-21 13:37:10 UTC
(In reply to comment #2)
Thanks anyway! I will try it out and report then...
Comment 4 Leonid Podolny 2010-02-21 17:50:54 UTC
Probably a dupe for bug 303109
Comment 5 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2010-02-21 19:12:34 UTC
(In reply to comment #2)
> amarok activates embedded automatically in its ebuild, even if you deactivate
> it via USE or env USE at buildtime.

The ebuild allows you to disable mysql embedded. You'll have to configure amarok to use the external db, though.

> I solved the problem by: 
> 1. unmerging amarok 
> 2. emerging mysql with USE="embedded"
> 3. reinstalling amarok 

> Also make sure you compile mysql with -fPIC in your CFLAGS or amarok will fail
> with: Linking CXX shared module
> ../../../../lib/amarok_collection-mysqlservercollection.so

No, please don't. That's a hack, a *bad* hack even.
You can read what's going on in my last comment on bug 303109

(In reply to comment #4)
> Probably a dupe for bug 303109

Yes, it is a dupe of that bug.
Comment 6 FL 2010-02-21 21:55:21 UTC
Yes, I remember faintly now. But it must have been at least 1.5 to 2 years ago so I forgot. This problem seemed to have been fixed and didn't show up anymore at that time. Sorry.
Comment 7 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2010-02-22 01:17:42 UTC
The issue was fixed by a patch for mysql-5.0.76/mysql-community-5.0.77 as discussed on bug 238487.
It doesn't work with mysql-5.1 as there were quite a few changes to the tree structure in 5.1. I'm still trying to get an updated patch that applies to mysql-5.1.
Comment 8 Victor Mataré 2010-02-22 17:58:27 UTC
Why does mysql-5.1 block amarok? This breaks portage-2.2's update conflict detection. Why not make amarok block mysql-5.1? After all, it's amarok that's incompatible with vanilla mysql-5.1 and not the other way round. It also doesn't make sense maintenance-wise. Suppose amarok gets fixed to work with 5.1, then you have to change every mysql ebuild to reflect that. Even if you do patch mysql to support amarok (wtf btw...) it's still amarok that depends on mysql and not mysql that depends on amarok. But that's just my 2 cents, feel free to ignore it.
Comment 9 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2010-02-22 18:51:34 UTC
DEPs in Amarok updated now.
Comment 10 Leonid Podolny 2010-02-22 19:58:12 UTC
(In reply to comment #9)
> DEPs in Amarok updated now.
> 

Now there are dependencies conflicts:

top ~ % sudo emerge -uDpvN --backtrack=30 @world

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N    ] sys-apps/ed-1.4  89 kB
[ebuild  N    ] dev-db/mysql-5.0.90-r2  USE="berkdb community embedded extraengine perl ssl -big-tables -cluster -debug -latin1 -max-idx-128 -minimal -profiling (-selinux) -static -test" 0 kB
[ebuild  N    ] virtual/mysql-5.0  0 kB                                                                                                                                                        
[ebuild  N    ] dev-db/mysql-5.1.44  USE="community embedded extraengine perl ssl -big-tables -cluster -debug -latin1 -max-idx-128 -minimal -profiling (-selinux) -static -test" 0 kB          
[ebuild  N    ] virtual/mysql-5.1  0 kB                                                                                                                                                        
[ebuild   R   ] media-sound/amarok-2.2.2.90  USE="cdda embedded* lastfm opengl (-aqua) -daap -debug -ipod (-kdeenablefinal) -mp3tunes -mtp -semantic-desktop" LINGUAS="ru -bg -ca -cs -da -de -en_GB -es -et -eu -fi -fr -it -ja -km -nb -nds -nl -pa -pl -pt -pt_BR -sl -sr -sr@latin -sv -th -tr -uk -wa -zh_TW" 0 kB                                                                                                       

Total: 6 packages (5 new, 1 reinstall), Size of downloads: 89 kB

!!! Multiple package instances within a single package slot have been pulled
!!! into the dependency graph, resulting in a slot conflict:                

dev-db/mysql:0

  ('ebuild', '/', 'dev-db/mysql-5.1.44', 'merge') pulled in by
    =dev-db/mysql-5.1* required by ('ebuild', '/', 'virtual/mysql-5.1', 'merge')
    (and 1 more)                                                                

  ('ebuild', '/', 'dev-db/mysql-5.0.90-r2', 'merge') pulled in by
    <dev-db/mysql-5.1 required by ('ebuild', '/', 'media-sound/amarok-2.2.2.90', 'merge')
    =dev-db/mysql-5.0* required by ('ebuild', '/', 'virtual/mysql-5.0', 'merge')         
    (and 1 more)                                                                         

virtual/mysql:0

  ('ebuild', '/', 'virtual/mysql-5.1', 'merge') pulled in by
    =virtual/mysql-5.1 required by ('installed', '/', 'mail-mta/postfix-2.6.5', 'nomerge')
    =virtual/mysql-5.1 required by ('installed', '/', 'dev-libs/apr-util-1.3.9', 'nomerge')
    =virtual/mysql-5.1 required by ('installed', '/', 'dev-libs/redland-1.0.10-r2', 'nomerge')
    (and 4 more)                                                                              

  ('ebuild', '/', 'virtual/mysql-5.0', 'merge') pulled in by
    =virtual/mysql-5.0 required by ('ebuild', '/', 'dev-db/mysql-5.0.90-r2', 'merge')
Comment 11 Leonid Podolny 2010-02-22 20:00:11 UTC
Created attachment 220743 [details]
stdout of 'emerge -uDpdvN @world'
Comment 12 Leonid Podolny 2010-02-22 20:00:36 UTC
Created attachment 220745 [details]
stderr of 'emerge -uDpdvN @world'
Comment 13 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2010-02-22 20:12:23 UTC
Let me repeat my comment on bug 303109:

You have 2 choices for now:

 * mask the mysql-5.1 ebuilds
 * disable the embedded use flag in amarok and use mysql as a "full fledged" db

Until we get a new patch to enable building libmysqld as a shared lib, there's
no option to allow amarok to work with an embedded mysql db.
Comment 14 Victor Mataré 2010-02-22 21:52:21 UTC
>  * mask the mysql-5.1 ebuilds

Please enlighten me if I'm missing the concept behind that inverted blocker specification. Otherwise, please allow the portage-2.2 users to benefit from their newly gained usability by removing the blocker from the mysql ebuild.
Thanks for your time.
Comment 15 Leonid Podolny 2010-02-23 06:51:02 UTC
(In reply to comment #13)
> Let me repeat my comment on bug 303109:
>  * disable the embedded use flag in amarok and use mysql as a "full fledged" db

That's exactly what I'm trying to do.
However, amarok with "-embedded" tries to pull in either mysql-5.1 with "embedded", which is wrong, it needs either mysql-5.0 with "embedded" or mysql-5.1 without "embedded".
Comment 16 Samuli Suominen (RETIRED) gentoo-dev 2010-02-23 10:53:28 UTC
*** Bug 306509 has been marked as a duplicate of this bug. ***
Comment 17 Rafał Mużyło 2010-02-23 14:51:22 UTC
*** Bug 306507 has been marked as a duplicate of this bug. ***
Comment 18 Marios Andreopoulos 2010-02-23 14:53:34 UTC
I emerged amarok 2.2.2.90 a few days ago. MySQL was also going to get upgraded in the emerge -uD world process. So portage informed me that amarok does not support the embedded use flag with mysql 5.1 and I removed it, no problem there since I use the external mysql.

Amarok works great with mysql 5.1 and everything was fine until I synced portage again.

Because of this bug you changed the ebuild and now amarok wants to downgrade my mysql everytime I want to upgrade my system. Of course mysql downgrading isn't a good idea since I had to upgrade all my databases and repair the tables with the new version.
Comment 19 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2010-02-23 17:07:55 UTC
I've fixed the deps now so that amarok[embedded] will pull mysql-5.0 and amarok[-embedded] will work with mysql-5.1.
I wasn't aware of the changes in Portage that allow it to backtrack and pick the correct version and prevent the older up/down cycles.
Comment 20 Martin von Gagern 2010-02-23 17:51:51 UTC
(In reply to comment #19)
> I've fixed the deps now so that amarok[embedded] will pull mysql-5.0 and
> amarok[-embedded] will work with mysql-5.1.

The dep currently contains:
  embedded? (     <=dev-db/mysql-5.1[embedded,-minimal] )
  !embedded? ( dev-db/mysql[-embedded,-minimal] )

I think the first line is confusing and the second plain wrong.

<=dev-db/mysql-5.1 sounds like there were a version 5.1 which would work. But there is no such version in the portage tree. At first glance, people might read it as mysql-5.1.* or similar. I'd prefer a <dev-db/mysql-5.1 instead of <=.

The -embedded restriction on mysql is probably wrong: You can build mysql with support for embedded servers and still use amarok without an embedded mysql. The embedded flag to mysql doesn't disable the standalone server, after all, nor the client libs used for accessing standalone servers. Therefore it is perfectly valid to install amarok[-embedded] with mysql[embedded].

I'd suggest these lines instead of those quoted above:
  >=dev-db/mysql-5.0.76-r1[embedded?,-minimal]
  embedded? ( <dev-db/mysql-5.1 )

The meaning is this:

1. we ant mysql, at least 5.0.76-r1. There are even older versions in the tree, after all, and I assume there was a reason this version requirement was there in the past. Haven't checked, though.

2. we want mysql to be never minimal, and to support embedded if we use embedded for amarok.

3. If we are using embedded, we want a pre-5.1 version of mysql. This line can be adjusted once mysql 5.1 provides a mysqld.so again.
Comment 21 Graham Murray 2010-02-23 18:35:31 UTC
(In reply to comment #13)
> Let me repeat my comment on bug 303109:
> 
> You have 2 choices for now:
> 
>  * mask the mysql-5.1 ebuilds
>  * disable the embedded use flag in amarok and use mysql as a "full fledged" db
> 
> Until we get a new patch to enable building libmysqld as a shared lib, there's
> no option to allow amarok to work with an embedded mysql db.
> 

Are you absolutely sure of that?? 

When mysql-5.1 was unmasked, I followed the instructions in comment #2, unmerging amarok, merging mysql-5.1.44 with embedded and re-emerging amarok-2.2.2.90.

As I write this, I am listening to music via amarok which built and runs fine with mysql-5.1 and embedded db.
Comment 22 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2010-02-23 23:03:11 UTC
I've reviewed the mysql deps again and in the process dropped the -embedded and -minimal use deps, thus I've added some warnings to postinst.


(In reply to comment #21)
> Are you absolutely sure of that?? 

Are you sure that Portage didn't preserved the libmysqld.so files from previous mysql version?
Comment 23 Bartosz Brachaczek 2010-03-10 19:49:48 UTC
Why can't we allow Amarok to statically link with mysqld.a?

I have dev-db/mysql-5.1.44-r1[embedded] installed, I'm absolutely sure I have no libmysqld.so file on disk, I have media-sound/amarok-2.2.2.90[embedded] (modified ebuild to not block >=mysql-5.1) built against mysql-5.1 and it works with embedded database (I'm absolutely sure Amarok doesn't use external database).

I checked what does CMake when building Amarok and it just links amarok_collection-mysqlecollection.so statically with mysqld.a and amarok_collection-mysqlservercollection.so dynamically with libmysqlclient.so.16.
Comment 24 Bartosz Brachaczek 2010-03-10 19:51:38 UTC
(In reply to comment #23)
> [...] mysqld.a [...]

Of course I meant libmysqld.a.
Comment 25 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2010-03-10 21:19:48 UTC
Because libmysqld.a is 16+ MB, and then you also end up with sec vulns statically compiled into amarok...

We also need to compile two entire copies of it on some platforms one with -fPIC, and one without -fPIC, because amarok goes and links the .a into a .so.
Comment 26 Bartosz Brachaczek 2010-03-10 21:49:05 UTC
OK, thanks for explanation.