[opensuse-buildservice] package Provides: not taken into consideration sometimes?
Hi, server:database builds libmysqlclient-devel, which has Provides: mysql-devel = %{version}-%{release} It builds against various SUSE Linux versions, which have the old mysql-devel package. Now php5.spec in server:php has BuildRequires: mysql-devel $ osc meta server:php ... <repository name="server_database_SUSE_Linux_10.0"> <path repository="SUSE_Linux_10.0" project="server:database"/> <arch>i586</arch> <arch>x86_64</arch> </repository> <repository name="server_database_SUSE_Linux_10.1"> <path repository="SUSE_Linux_10.1" project="server:database"/> <arch>i586</arch> <arch>x86_64</arch> </repository> ... The problem is that when building against server_database_SUSE_Linux_10.[01], the resolver picks the old mysql-devel package from the base distribution, which in case of 10.0 causes php5-mysql be linked against the old client library and in case of 10.1 breaks init_buildsystem, because mysql-devel pulls in mysql-client (now from server:database) which pulls in libmysqlclient15 (also from server:database), which installs the same files as mysql-shared. So it seems that if a dependency is satisfied by a package name directly, that package is preferred over packages which satisfy the dependency via Provides:. It works as expected if either all packages satisfy the dependency by package name, or all by Provides:. Eg. mysql-devel pulls in the new mysql-client package (via name), and mysql-client pulls in the new libmysqlclient15 package (via libmysqlclient.so.15(libmysqlclient_15)). So a) is this expected or is it a bug? b) can we work around it somehow? Using BuildRequires: libmysqlclient-devel would be tricky, because php5 builds also against pristine distributions. Thanks. Michal --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Michal Marek wrote:
So a) is this expected or is it a bug? b) can we work around it somehow? Using BuildRequires: libmysqlclient-devel would be tricky, because php5 builds also against pristine distributions.
One solution would be to use 'BuildRequires: libmysqlclient-devel' and do 'Substitute: libmysqlclient-devel mysql-devel' in the distro configs. But still I'd like to know whether the described behavior is correct or not. thanks, Michal --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On Mon, Jun 04, 2007 at 09:57:52AM +0200, Michal Marek wrote:
So it seems that if a dependency is satisfied by a package name directly, that package is preferred over packages which satisfy the dependency via Provides:. It works as expected if either all packages satisfy the dependency by package name, or all by Provides:. Eg. mysql-devel pulls in the new mysql-client package (via name), and mysql-client pulls in the new libmysqlclient15 package (via libmysqlclient.so.15(libmysqlclient_15)).
So a) is this expected or is it a bug?
It's expected. It is done to give the user a way to break ambiguities. I.e., if there's an expansion error, you can add the package you want to the BuildRequires and the build will work.
b) can we work around it somehow? Using BuildRequires: libmysqlclient-devel would be tricky, because php5 builds also against pristine distributions.
You can add a "Substitute: mysql-devel libmysqlclient-devel" for your repository. Cheers, Michael. -- Michael Schroeder mls@suse.de SUSE LINUX Products GmbH, GF Markus Rex, HRB 16746 AG Nuernberg main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);} --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On Jun 5, 2007, at 4:16 PM, Michael Schroeder wrote:
On Mon, Jun 04, 2007 at 09:57:52AM +0200, Michal Marek wrote:
So it seems that if a dependency is satisfied by a package name directly, that package is preferred over packages which satisfy the dependency via Provides:. It works as expected if either all packages satisfy the dependency by package name, or all by Provides:. Eg. mysql-devel pulls in the new mysql-client package (via name), and mysql-client pulls in the new libmysqlclient15 package (via libmysqlclient.so.15(libmysqlclient_15)).
So a) is this expected or is it a bug?
It's expected. It is done to give the user a way to break ambiguities. I.e., if there's an expansion error, you can add the package you want to the BuildRequires and the build will work.
b) can we work around it somehow? Using BuildRequires: libmysqlclient-devel would be tricky, because php5 builds also against pristine distributions.
You can add a "Substitute: mysql-devel libmysqlclient-devel" for your repository.
what's the syntax for that? is it used somewhere else that we can use as an example? --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On Tue, Jun 05, 2007 at 04:38:17PM +0200, Andrew Beekhof wrote:
what's the syntax for that? is it used somewhere else that we can use as an example?
The syntax is just: Substitute: <from> [to...] Here are some examples: 1) Delete foo-devel from the BuildRequires Substitute: foo-devel 2) Rename foo-devel to bar-devel Substitute: foo-devel bar-devel 3) Add bar-devel if foo-devel is present Substitute: foo-devel foo-devel bar-devel Cheers, Michael. -- Michael Schroeder mls@suse.de SUSE LINUX Products GmbH, GF Markus Rex, HRB 16746 AG Nuernberg main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);} --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Michael Schroeder wrote:
b) can we work around it somehow? Using BuildRequires: libmysqlclient-devel would be tricky, because php5 builds also against pristine distributions.
You can add a "Substitute: mysql-devel libmysqlclient-devel" for your repository.
I added this line to the server:database repository config and so far it seems to do the right thing. Thanks! Michal --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
participants (3)
-
Andrew Beekhof
-
Michael Schroeder
-
Michal Marek