Sometimes (very often in my case with about 20 machines) "pkg install" or "pkg upgrade" installed some packages which were not needed and running "pkg autoremove" imediately after previsou upgrade / install command just uninstall those packages. This is simple example from today. I just need to install "pgtop", along with dependencies "libnghttp2" were also installed: root@fido ~/# pkg install pgtop Updating codelab repository catalogue... Fetching meta.txz: 100% 820 B 0.8kB/s 00:01 Fetching packagesite.txz: 100% 136 KiB 139.5kB/s 00:01 Processing entries: 100% codelab repository update completed. 470 packages processed. Updating e2efa repository catalogue... Fetching meta.txz: 100% 820 B 0.8kB/s 00:01 Fetching packagesite.txz: 100% 37 KiB 37.6kB/s 00:01 Processing entries: 100% e2efa repository update completed. 114 packages processed. All repositories are up to date. The following 4 package(s) will be affected (of 0 checked): New packages to be INSTALLED: pgtop: 0.05_3 [e2efa] libnghttp2: 1.22.0 [codelab] p5-DBI: 1.636_1 [e2efa] p5-DBD-Pg: 3.6.2 [e2efa] Number of packages to be installed: 4 The process will require 3 MiB more space. 977 KiB to be downloaded. Proceed with this action? [y/N]: y [1/4] Fetching pgtop-0.05_3.txz: 100% 24 KiB 24.9kB/s 00:01 [2/4] Fetching libnghttp2-1.22.0.txz: 100% 105 KiB 107.1kB/s 00:01 [3/4] Fetching p5-DBI-1.636_1.txz: 100% 685 KiB 701.6kB/s 00:01 [4/4] Fetching p5-DBD-Pg-3.6.2.txz: 100% 163 KiB 166.6kB/s 00:01 Checking integrity... done (0 conflicting) [1/4] Installing p5-DBI-1.636_1... [1/4] Extracting p5-DBI-1.636_1: 100% [2/4] Installing p5-DBD-Pg-3.6.2... [2/4] Extracting p5-DBD-Pg-3.6.2: 100% [3/4] Installing pgtop-0.05_3... [3/4] Extracting pgtop-0.05_3: 100% [4/4] Installing libnghttp2-1.22.0... Extracting libnghttp2-1.22.0: 100% But nobody needs "libnghttpd2" root@fido ~/# pkg info -r -d libnghttp2 libnghttp2-1.22.0 root@fido ~/# pkg autoremove Checking integrity... done (0 conflicting) Deinstallation has been requested for the following 1 packages: Installed packages to be REMOVED: libnghttp2-1.22.0 Number of packages to be removed: 1 Proceed with deinstalling packages? [y/N]: y [1/1] Deinstalling libnghttp2-1.22.0... [1/1] Deleting files for libnghttp2-1.22.0: 100% Similar issue was encountered on last "pkg upgrade" on almost all our machines where "libarchive" was installed and immediately deleted by "pkg autoremove". We are using own Poudriere repo, FreeBSD 10.3, pkg 1.10.1 Let me know how can I debug this issue and I will provide more details.
This is likely an old issue with tracking shared library dependencies. https://github.com/freebsd/pkg/issues/1015
(In reply to Bryan Drewery from comment #1) A found referenced bug before I filed this PR because I thought it was already fixed and this is new one. Is this old issue?
Is there something I can fix / workaround in local pkg database? It is really annoying to run pkg autoremove after each pkg install or pkg upgrade. It always want to install libarchive and some other libs. # pkg install pear-Net_DNS2 Updating codelab repository catalogue... codelab repository is up to date. All repositories are up to date. The following 3 package(s) will be affected (of 0 checked): New packages to be INSTALLED: pear-Net_DNS2: 1.4.3 libarchive: 3.3.1,1 lzo2: 2.10_1 Number of packages to be installed: 3
*** Bug 228389 has been marked as a duplicate of this bug. ***
Still an issue?
(In reply to daniel.engberg.lists from comment #5) I cannot say if it was the same issue or just a similar one but the last month I installed "some package" on bunch of our servers, it pulled "another package" as dependency and then "pkg autoremove" deleted this dependency. Unfortunately I don't remember the exact package names. If you want to close this issue then close it and I will reopen it if I see this again.
Since I moved to using both FreeBSD 12amd64 latest repo and my own internal repo I'm seeing a lot of this with almost every pkg-install or pkg-upgrade. pkg is installing gcc9 (and deps) to only have pkg-autoremove remove them. My current test case is: 1) Use FreeBSD 12amd64 latest repo 2) Create a local repo via 'poudriere bulk -j 12amd64 lang/gcc9' 3) Configure pkg to use both repos 4) 'pkg install py27-sqlite3' This should try to install gcc9.