pkg upgrade "upgrade only; do not reinstall"

Matthew Seaman matthew at FreeBSD.org
Sun Jul 19 08:35:51 UTC 2015


On 18/07/2015 19:01, Miguel C wrote:
> First of all pkgng is awesome :)
> 
> But there's one thing I've been having "issues" with and after looking
> in the man page I didn't found a solution for this, but maybe I'm just
> missing something.
> 
> when "pkg upgrade" is run, is there any flag I can use for it to look
> for "upgrade" candidates only and not reinstall?
> 
> I have so ports installed with different options, and when running pkg
> upgrade this ones always show up, and If I want to full upgrade I have
> to go for it...
> 
> I could probably script it to parse the "upgradable pkgs only" and
> then run pkg install for each... but maybe there's an easier way?

Don't assume that when pkg(8) wants to reinstall a package that it is
doing it for no reason.  Frequently it's necessary because one of the
shared libraries linked against by the package binaries has changed ABI
and the binary won't actually work properly unless recompiled against
the new version.

However, other times it is less important -- perhaps the dependency
package had a version bump but since pkg(8) has no way of knowing what
is important in the interaction between the two packages, it plays safe
and reinstalls whenever the dependency changes.  Ideally in this sort if
situation the 'reinstall' should do very little other than adjusting the
dependency info in the package DB, plus any binaries or other files that
have changed when compiled against the new dependency -- but that
requires 'repeatable builds' in order to work properly.

	Cheers,

	Matthew


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 971 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-pkg/attachments/20150719/ca120010/attachment.bin>


More information about the freebsd-pkg mailing list