# pkg upgrade wants to install X11



## b4gt (Jan 5, 2015)

I have installed FreeBSD 10.1 without X11 so I can use it as a headless server. I want absolutely no X11, just plain command line. I also have built Deluge torrent client from ports without X11 and removed the GTK option.

Now when I do `pkg update && pkg upgrade` I see that it wants to install a bunch of *new packages* that are related to X11.


> libXaw: 1.0.12_2,2
> printproto: 1.0.5
> libXp: 1.0.2_2,1
> libGL: 9.1.7_4
> ...



I suspect that it has to do with the fact that it also wants to upgrade Deluge from the binary repo which is built with X11 and GTK support. This is exactly what I don't want.

How can I prevent this but also upgrade the rest of the system?


----------



## junovitch@ (Jan 6, 2015)

The port options try to be best for most but can't be perfect for everybody.  You'll have to compile your packages on your own.  If you have more than just a couple systems, setting up Poudriere ports-mgmt/poudriere is fairly trivial and you can just use a /usr/local/etc/poudriere.d/<jailname>-make.conf that unsets the X11 flag on all ports you build.

```
OPTIONS_UNSET+=X11
```
The rest of the steps far covered in the Handbook.
https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/ports-poudriere.html


----------



## ljboiler (Jan 6, 2015)

What about trying a `pkg lock deluge` to tell `pkg` that it is not to touch your custom-built Deluge package?


----------



## b4gt (Jan 6, 2015)

I upgraded deluge manually from ports but still pkg wanted to upgrade it from binary with all the X11. `pkg lock deluge` did the trick. But is there any simpler way to notify pkg that generally the packages that are compiled from ports should not be upgraded by it?


----------



## SirDice (Jan 6, 2015)

b4gt said:


> But is there any simpler way to notify pkg that generally the packages that are compiled from ports should not be upgraded by it?


No, there isn't. And it's the reason why a lot of us build their own package repositories. Which is a lot easier to do than it sounds.


----------



## kpa (Jan 6, 2015)

b4gt said:


> I upgraded deluge manually from ports but still pkg wanted to upgrade it from binary with all the X11. `pkg lock deluge` did the trick. But is there any simpler way to notify pkg that generally the packages that are compiled from ports should not be upgraded by it?



Ideally the ports system would have something called "virtual" dependencies where any compatible port/package could satisfy a dependency as long as the port/package providing the depency had the suitable shared libraries and other features required. Unfortunately this is all still in on planning state and we have to do with "concrete" dependencies that can not be changed after the package is created.


----------

