pkg question - Difference pkg vs port
Matthew Seaman
matthew at FreeBSD.org
Thu Sep 4 06:04:30 UTC 2014
On 04/09/2014 01:36, Gary Palmer wrote:
> On Wed, Sep 03, 2014 at 07:32:48PM -0400, Brandon Allbery wrote:
>> On Wed, Sep 3, 2014 at 7:24 PM, Michael Ross <gmx at ross.cx> wrote:
>>
>>> "Anything that provides" I think is the key to where I started thinking
>>> wrong:
>>>
>>> The dependency is not "Shared libs required" libmysqlclient.so.18,
>>> but one specific port that provides libmysqlclient.so.18 - mysql55-client.
>>>
>>
>> Ports can do "provides library" dependencies. Packages can only depend on
>> packages. You can try to force it but you could also confuse your package
>> database rather badly.
>
> Why can't packages check to see if the library exists and use it if it
> does? RPM does something like that, although I think they go much
> further with that process.
>
> In this case, AFAIK the mysql client library API is stable - the 5.5 and
> 5.6 library versions should have the same API so the requirement to
> install the 5.5 package is a bit silly.
>
> (I'm dreading this e-mail taking us down the RPM path of dozens of
> different packages that make up one program, foo-devel, foo-libs,
> foo-client, etc)
The problem here is that pkg(8) at the moment respects both the shared
library dependencies discovered by analysing what all the binaries
actually need to link against, and all the RUN_DEPENDS inherited from
ports. It's the latter which effectively 'bakes in' a dependency on a
specific version of another port.
However, change is coming. There's a GSoC project to allow dependency
ranges for pkg(8) -- not a complete solution, but it will help.
Sub-packages and flavours are imminently due to appear, now that
pkg_tools are dead; again not a complete solution in itself. There's
also the 'Provides/Requires/Conflicts' idea about dependency tracking,
which I think is the long-term answer, but needs (yet another set of)
ports tree-wide sweeping changes.
At the moment, if you want to use other than the default version of eg.
MySQL, the recommendation is that you build your own package sets. It
is possible to build your own packages for just the things that depend
on MySQL and use the regular FreeBSD pkg repositories for everything
else. poudriere is the best tool for doing this.
Cheers,
Matthew
--
Dr Matthew J Seaman MA, D.Phil.
PGP: http://www.infracaninophile.co.uk/pgpkey
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 971 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20140904/2cfce1e5/attachment.sig>
More information about the freebsd-stable
mailing list