Summary: | ports-mgmt/pkg: pkg confused, installs older version over newer | ||
---|---|---|---|
Product: | Ports & Packages | Reporter: | MMacD <scratch65535> |
Component: | Individual Port(s) | Assignee: | freebsd-ports-bugs (Nobody) <ports-bugs> |
Status: | Open --- | ||
Severity: | Affects Some People | CC: | grahamperrin, miwi, pi |
Priority: | --- | Flags: | bugzilla:
maintainer-feedback?
(pkg) |
Version: | Latest | ||
Hardware: | Any | ||
OS: | Any |
Description
MMacD
2017-05-03 11:22:56 UTC
Here's an example of why it's a Bad Idea to package unrelated software. Now I can't restore samba46 without having the newly-reinstalled desktop removed too! 7:29:16 Wed, 03 May [momcat:root]~> pkg install samba46 Updating FreeBSD repository catalogue... FreeBSD repository is up to date. All repositories are up to date. Checking integrity... done (2 conflicting) - samba46-4.6.2 conflicts with samba44-4.4.13 on /usr/local/lib/shared-modules/idmap/autorid.so - samba46-4.6.2 conflicts with samba44-4.4.13 on /usr/local/lib/shared-modules/idmap/autorid.so Checking integrity... done (0 conflicting) The following 5 package(s) will be affected (of 0 checked): Installed packages to be REMOVED: samba44-4.4.13 xfce4-desktop-4.12.3_2 Thunar-1.6.11 gvfs-1.26.3_4 New packages to be INSTALLED: samba46: 4.6.2 Number of packages to be removed: 4 Number of packages to be installed: 1 Proceed with this action? [y/N]: 7:35:17 Wed, 03 May [momcat:root]~> this is not a pkg bug, but an infrastructure bug. samba44 is not an older version of samba46 from pkg point of view this is 2 different software: 2 different names. the library provided by samba44 and samba46 cannot be replaced on binaries as they are do not have the same ABI (iirc). The right solution to avoid such situation is to have a package (only one providing) the default client part: only libraries might be ok. and the other samba ports to be installed elsewhere: /usr/local/samba<version> or with a symlink in /usr/local/bin for all the binaries (suffixed by the version) so they don't conflict with each others and their binaries using a proper RPATH so they find their libs in /usr/local/samba<version>/lib before anything else. That way the user could decide which version of samba they want to install/use and whatever is the version of the libsmb used by default by other packages. From pkg's current viewpoint 44 might be different to 46 rather than older, but that just means the naming conventions need to be fixed! The fact that 44 and 46 may be on different development paths is somewhat unimportant in the context of what the sysmgr chose to install. The sysmgr probably didn't just flip a coin, so casually overriding their choice is insensitive at best. Some apps/utils might have a number as part of their name root, but probably there are none with (e.g.) :::, so pkg could certainly determine that samba:::44-i.j.k whatever is the "same" product as samba:::46-i.j.k, and an older version that should not replace the newer one without special permission. And of course this is a general problem; samba just happened to be the one that got mugged this time. the issue is still there, but should be fixed on the port side For a while, recently, I installed pkg-devel (currently 1.18.99.6) instead of pkg. Later, pkg-devel was automatically replaced by pkg with its (currently) inferior version number. Does this downgrade-like behaviour fall under the umbrella of this bug 219036? |