pkgng dependencies change / update
matthew at FreeBSD.org
Sat Jun 1 00:40:00 UTC 2013
On 31/05/2013 16:26, bsd at todoo.biz wrote:
> I am trying to figure out how to change / update the dependencies on a package.
> I have a postfix package which comes from a server where mysql-client is in version 5.1
> And I would like to install the same package on a server where mysql-client is in version 5.6
> I am not sure if this is feasible.
> Of course when I try to install this package on the server, it tells me :
>> jail: ns3 15:03:57 /home/gregober # pkg add postfix-2.10.0,1.txz
>> Installing postfix-2.10.0,1...missing dependency mysql-client-5.1.68
>> Failed to install the following 1 package(s): postfix-2.10.0,1.txz
> I have tried to set the dependency to an updated version of the port :
>> jail: ns3 15:04:16 /home/gregober # pkg set -o databases/mysql51-client:databases/mysql56-client
>> Change origin from databases/mysql51-client to databases/mysql56-client for all dependencies? [y/N]: y
> But no luck !!
> Any idea how to do that ?
Well, the best way is generally to use a package compiled against the
correct set of dependencies in the first place.
postfix will be linking against the MySQL client shared libraries.
Those have different ABI versions between mysql51 and mysql56. Meaning
you can't simply swap one for the other and expect things to still work.
'pkg set -o' looks like it does what you want, but really, it doesn't.
What it does is allow smoothly replacing one complete dependency tree
with another. So, running:
# pkg set -o databases/mysql51-client:databases/mysql56-client
is fine and dandy, and a necessary prerequisite to then running an
upgrade against a package repo where everything that links against mysql
client has been linked against mysql56-client specifically.
In fact, you're doing things the wrong way round. 'pkg set -o' works on
what has already been installed. You could in principle use 'pkg set
-o' to switch your mysql56-client machine to using mysql51-client --
which means running 'pkg set -o ...' and then *reinstalling all the
packages that depend on mysql56-client with equivalent packages linked
against mysql51-client*. After that, your postfix package should
Ultimate plans are that the need to use 'pkg set -o' should disappear
entirely, as the package dependency solver should be clever enough to
work out all this stuff for itself. There's also ideas about making
more finely grained binary packages -- several packages from one port
essentially. So out of each mysqlXX-client port there'd be several
packages created, one of which contains just the shared libraries. The
good thing about that is it will be possible to install shared libraries
for several different mysqlXX versions simultaneously, which would make
your postfix problem fairly trivial to solve.
Dr Matthew J Seaman MA, D.Phil.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 268 bytes
Desc: OpenPGP digital signature
More information about the freebsd-questions