Solved pkg asking to install unnecessary packages

Hi all,

Every time I run pkg upgrade or pkg install PKG, pkg() asks me to install some apparently unnecessary packages.

I'm running FreeBSD 11.0-RELEASE-p8, using mainly packages, tracking the quarterly repo, and checking out the quarterly ports tree to match (using svn).

I have compiled exactly 2 ports using ports-mgmt/synth due to needed custom options (multimedia/ffmpeg and graphics/blender). All necessary dependencies (build and runtime) were downloaded and installed as packages by ports-mgmt/synth.

Here is what is happening:

pkg upgrade
Code:
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
Updating Synth repository catalogue...
Synth repository is up-to-date.
All repositories are up-to-date.
Checking for upgrades (3 candidates): 100%
Processing candidates (3 candidates): 100%
Checking integrity... done (0 conflicting)
The following 3 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
   gcc: 4.9.4 [FreeBSD]
   binutils: 2.27_5,1 [FreeBSD]
   gcc-ecj: 4.5 [FreeBSD]

Number of packages to be installed: 3

The process will require 540 MiB more space.

Proceed with this action? [y/N]:
pkg install mpg123
Code:
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
Updating Synth repository catalogue...
Synth repository is up-to-date.
All repositories are up-to-date.
The following 4 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
   mpg123: 1.23.8 [FreeBSD]
   gcc: 4.9.4 [FreeBSD]
   binutils: 2.27_5,1 [FreeBSD]
   gcc-ecj: 4.5 [FreeBSD]

Number of packages to be installed: 4

The process will require 541 MiB more space.
186 KiB to be downloaded.

Proceed with this action? [y/N]:

pkg check -aBdsr shows no missing dependencies or problems of any kind.

After installing base/gcc pkg info -r gcc-4.9.4 shows no packages dependant on gcc.
Code:
gcc-4.9.4:
pkg autoremove suggests I remove it, and the packages on which gcc depends.
Code:
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 5 packages:

Installed packages to be REMOVED:
   gcc-4.9.4
   binutils-2.27_5,1
   gcc-ecj-4.5
   mpc-1.0.3
   mpfr-3.1.5

Number of packages to be removed: 5

The operation will free 542 MiB.

Proceed with deinstalling packages? [y/N]
However, if I do remove them, pkg() asks me to reinstall them again.

After installing base/gcc I get the following message:
Code:
To ensure binaries built with this toolchain find appropriate versions
of the necessary run-time libraries, you may want to link using

  -Wl,-rpath=/usr/local/lib/gcc49

For ports leveraging USE_GCC, USES=compiler, or USES=fortran this happens
transparently.
I'm not sure what to make of this, and I'm reluctant to do so as I don't want to make things worse.

I'm quite happy to leave them installed for now, but I'm worried there may be something more serious going on.

How can I get pkg() to stop asking me to install / remove base/gcc and its dependencies?

EDIT: Don't know it if relevant, but I just discovered pkg upgrade -f gives the following:
Code:
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
Updating Synth repository catalogue...
Synth repository is up-to-date.
All repositories are up-to-date.
Checking for upgrades (510 candidates): 100%
Processing candidates (510 candidates): 100%
Child process pid=86509 terminated abnormally: Segmentation fault
 
Done. Now neither pkg, nor synth is asking about base/gcc and friends.

Just out of interest, two questions:
1. Where did you read/see that this is necessary? Because I still haven't found it.
2. Will this break the "Fetch prebuilt packages" Synth option? I can't check it, as there are no newer versions of my packages to try it with yet.
 
If you look at the pkg(8) output you can tell from which repository it wants to install a package, it's the name in between [ ]. The official repositories are always built using the defaults. This usually conflicts with any custom builds (ports, Synth, Poudriere). So to prevent conflicts you always install everything from the custom source.
 
I saw that repo sources were listed between square brackets. But I had assumed ports like ports-mgmt/synth would allow me to install just one or two custom builds (which is all I need at the moment), while allowing me to continue to use packages from the main repo.

Oh well, I guess I'm just going to have to switch to Synth or something.
 
Back
Top