pkg wants to reinstall over port

vaskark

New Member


Messages: 11

Hello. New user here.
I recently switched to the latest branch of 12.2-RELEASE-p4 and updated all my installed pkgs. Then, I installed the port system because I wanted a version of berry (x11-wm/berry) with my own patches applied. All of it worked exactly as planned and installed fine.
However, the next time I ran sudo pkg upgrade I received this message:

Code:
Installed packages to be REINSTALLED:
          berry-0.1.7 (options changed)
Number of packages to be reinstalled: 1

This would obviously override my custom port. Shouldn't my port take precedence over a pkg?
Any help/advice would be greatly appreciated.
Thanks.

Code:
uname -a: FreeBSD freebsd 12.2-RELEASE-p4 FreeBSD 12.2-RELEASE-p4 GENERIC amd64
pkg -v: 1.16.3
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 11,637
Messages: 38,017

There is no difference between a port and a package. Ports build packages and a package is just a pre-compiled port. If there's a newer version then it's going to get updated, regardless if you previously built it from a port or installed it as a package.
 
OP
vaskark

vaskark

New Member


Messages: 11

Thanks for the quick reply.
So basically I have to reinstall the pkg and then reinstall my custom port every time that berry is updated?
Ah.

Edit: Wait. I just rebuilt and installed my custom port again. And it wants to reinstall berry again, but it hasn't been updated.
 

ljboiler

Well-Known Member

Reaction score: 160
Messages: 440

pkg lock is your friend when you need specific options for a port. Building the port actually created a local "package" which then got installed on your system. pkg lock <package> tells pkg not to touch that one, ever, if there's a difference between what is installed locally and what is in the FreeBSD pkg repository.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 11,637
Messages: 38,017

I just rebuilt and installed my custom port again. And it wants to reinstall berry again, but it hasn't been updated.
Did you add or remove options in your custom port? Because the message is claiming the options changed.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 11,637
Messages: 38,017

Alternatively, you can just increase the PORTREVISION of the custom port. That will make it newer than the version that's in ports. But keep in mind that if the version of application actually changes that would mean it's newer and it'll get upgraded again. But it's always a good idea to keep an eye on the list of packages before actually committing to the upgrade.
 

Zirias

Daemon

Reaction score: 1,346
Messages: 2,370

The elegant solution for this problem would be to build your own local repository and configure it for pkg with a higher priority than the official one.

Unfortunately, as of now, ports-mgmt/poudriere has to build all dependencies in order to build a package, and they will all end up in the repository built. There are two pull requests for changing that: #797 and #798.

AFAIK, ports-mgmt/synth already has these features, but I'm not sure and have no experience with it.
 
OP
vaskark

vaskark

New Member


Messages: 11

Alternatively, you can just increase the PORTREVISION of the custom port. That will make it newer than the version that's in ports. But keep in mind that if the version of application actually changes that would mean it's newer and it'll get upgraded again. But it's always a good idea to keep an eye on the list of packages before actually committing to the upgrade.
I think this works best for me. Thanks for the advice.
 
Top