Upgrade to "newer" package

System A has rsync-3.1.3

pkg upgrade says there is no upgrade available

pkg search tells me that there's a pkg named rsync-3.1.3_1

You're trying to tell me that pkg can't upgrade this?

Background: I don't care about upgrading this, but I'm trying to automate building a new system and installing the necessary packages. But some of the packages installed on System A (which is about 3 weeks old) don't exist.

Shouldn't pkg be smart enough to know that 3.1.3_1 is newer than 3.1.3? If I want to sync systems I either have to copy disks, use tarballs or create my own pkg repository?
 
Code:
cat /usr/local/etc/pkg/repos/FreeBSD.conf
FreeBSD: {
  url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",
  mirror_type: "srv",
  enabled: yes
}

Did you use quarterly or latest?
 
Force update the repository catalogue: pkg update -f. net/rsync is at version 3.1.3_1 in quarterly and latest repositories.

[EDIT]: Asuming you haven't neglected to run pkg update first.
 
Quarterly and latest should be relatively the same at this point in time. The new quarterly (2019Q4) was created just a few days ago.
 
Code:
cat /usr/local/etc/pkg/repos/FreeBSD.conf
FreeBSD: {
  url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",
  mirror_type: "srv",
  enabled: yes
}

Did you use quarterly or latest?

Who knows? I don't have this file. What's the default if the file doesnt exist?

Adding this file updates the system to a different repository, but I still have the same exact problem. It tells me that pkg rsync-3.1.3 is up to date.

Code:
# pkg upgrade rsync-3.1.3
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
pkg: No packages available to upgrade matching 'rsync-3.1.3' have been found in the repositories
# pkg upgrade rsync-3.1.3_1
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
pkg: rsync-3.1.3_1 is not installed, therefore upgrade is impossible
Checking integrity... done (0 conflicting)
Your packages are up to date.

You're not answering the question I need answered.

Is there any universe where pkg is smart enough to upgrade installed pkg rsync-3.1.3 to rsync-3.1.3_1 without some sort of manual intervention?
 
Who knows? I don't have this file. What's the default if the file doesn't exist?
Then the information from /etc/pkg/FreeBSD.conf is used.

I suspect your locally cached repository information is stale, run pkg update -f to force it to update the cache.
 
Ok, more info. If I run "pkg upgrade" it tells me about all of the upgrades available. But I can't seem to figure out how to do it for just 1 package.

How can I just run upgrade on a single package? It doesnt seem to find it when specifying a single pkg.
 
More to the point, I don't trust upgrade command to work properly in that case. I'm not quite sure how it handles dependencies.
 
He's not because that's exactly what pkg upgrade <packagename> does.

it's not, because pkg upgrade packagename can't determine the new name of the package automatically (as it should). It seems that it can only get the new package name if a global upgrade is run.

1) I don't want to have to manually determine the names of the 5 packages to be upgraded
2) I don't want to upgrade all packages on the system

So the only way I can see to do this would be to lock the ones that I don't want to upgrade?
 
Because upgrades can mess up some of the custom stuff we have, and we can't just willy-nilly upgrade 30 package and then have to figure out what broke. 1 thing at a time so you can easily determine the culprit.
 
I just did pkg upgrade cmake to update cmake from version 3.15.3 to version 3.15.4.

The pkg tools do just fine without needing to specify the version in the package name.
 
Would a custom local repository with packages built from ports using ports-mgmt/poudriere or ports-mgmt/synth be a better solution for you in the long run? You mentioned customizations, that's why I brought that up.

I've pretty much decided I'm sticking with a master repository for upgrading remote systems. The packages are good for building base systems. I'd like to get 80% of the system as base + needed pkgs and then use the repository for customized stuff and things that need to change regularly.
 
@OP stay with pkg if you don't want custom packages.

Would a custom local repository with packages built from ports using ports-mgmt/poudriere or ports-mgmt/synth be a better solution for you in the long run? You mentioned customizations, that's why I brought that up.
That solution (poudriere or synth) it's OK if you have multiple machines or you don't want to "contaminate" de main system, otherwise ports-mgmt/portmaster it's the best solution for a single PC.
poudriere would have been a good solution to save time and machine resources if it would let you mix packages from FreeBSD official repository and the repository built by the user, but since it can't, the best solution for single desktop is portmaster/portpugrade.
 
Because upgrades can mess up some of the custom stuff we have, and we can't just willy-nilly upgrade 30 package and then have to figure out what broke. 1 thing at a time so you can easily determine the culprit.
Then just upgrade the rest of the packages one by one. When you're done and rsync is the only one left - go with upgrade all.
 
Back
Top