Understanding pkg version

I'm having a problem understanding a subcommand of pkg.
If I do pkg verrsion -v | grep '<', I get

realtek-re-kmod-1101.00.1501000 < needs updating (remote has 1102.01.1500068_1)

and if I do pkg upgrade, I get

Updating FreeBSD-ports repository catalogue...
FreeBSD-ports repository is up to date.
Updating FreeBSD-ports-kmods repository catalogue...
FreeBSD-ports-kmods repository is up to date.
All repositories are up to date.
Checking for upgrades (1 candidates): 100%
Processing candidates (1 candidates): 100%
Checking integrity... done (0 conflicting)
Your packages are up to date.

If I do the upgrade with debug, it says

removing realtek-re-kmod from the request as it is the same as local

Can someone explain what is going on?
 
Speculating here:
pkg works against the configuration, the configuration has a list of repos.
a package (by name) may live in multiple repos, especially if it's a kmod.
Why? Look at quarterly. 15.0 is not yet EoL, 15.1 is released, so packages are built
against 15.0 which means a kmod like realtek may exist in multiple repos.

Look at the output:
realtek-re-kmod-1101.00.1501000 < needs updating (remote has 1102.01.1500068_1)

I'm guessing you are running on 15.1-RELEASE, so pkg version looks at all the repos and finds a newer version but it's actually newer for 15.0 not 15.1.
The pkg upgrade is looking at the repos against 15.1 so it finds nothing to do.

It means the "pkg version" command needs to be updated to only look at repos for "currently running version" instead of all of them.

When 15.0 goes EoL and quarterly pkgs start to get built against 15.1, pkg version should do the right thing and give same output as pkg upgrade. At least until 15.2 :)
 
man pkg-version says in the example section that a pkg version -v checks against the local ports index (and so not against available packages). To check against available packages the command is pkg version -vR.
 
man pkg-version says in the example section that a pkg version -v checks against the local ports index (and so not against available packages). To check against available packages the command is pkg version -vR.
Does pkg bootstrap update local indexes? If it does and rebuilds the local index, then I think the 2 commands should give same output. I'm speculating because I've never looked at output of pkg version, just pkg upgrade.
 
I don't understand this. First. pkg version -vR gives the same result as pkg version -v.
If I do pkg bootstrap, I get

pkg already bootstrapped at /usr/local/sbin/pkg
 
I don't understand this. First. pkg version -vR gives the same result as pkg version -v.
If I do pkg bootstrap, I get

pkg already bootstrapped at /usr/local/sbin/pkg
I just don't know. I just pay attention to the ouput of "pkg upgrade" because that has always been correct. I'm not actually convinced there is a use for pkg version
 
BTW, If I do pkg search realtek-re-kmod, I get

realtek-re-kmod-1102.01.1500068_1 Kernel driver for Realtek PCIe Ethernet Controllers
realtek-re-kmod198-198.00.1500068 Kernel driver for Realtek PCIe Ethernet Controllers
realtek-re-kmod-1101.00.1501000 Kernel driver for Realtek PCIe Ethernet Controllers
realtek-re-kmod198-198.00.1501000 Kernel driver for Realtek PCIe Ethernet Controllers
 
From the man page:
The database of available packages and versions to compare against the installed packages may be chosen by specifying one of -P, -R or -I or by setting VERSION_SOURCE in pkg.conf(5). If not specified then the ports index file will be used if it exists (-I). Otherwise, should a ports tree exist that will be used to compare versions (-P). Failing either of those two choices, the repository catalogue will be used (-R).
I suggested the OPs command is compared to the ports tree. And that is not what a package repository offers.
 
I do not understand how the system works. I have installed all *kmods for 15.1-RELEASE from FreeBSD-ports-kmods and now complaining that are in FreeBSD-ports repository newer versions and I have 'candidates". Should I upgrade them and than will be complaining again from
FreeBSD-ports-kmods...
 
realtek-re-kmod-1101.00.1501000 < needs updating (remote has 1102.01.1500068_1)
The reason is that while 'latest' and 'quarterly' have been updated to 1102.01, 'kmods' remains at old 1101.00.
Code:
$ w3m -dump http://pkg.freebsd.org/FreeBSD:15:amd64/|grep kmod
kmods_latest/      -              2026-May-21 12:06
kmods_latest_0/    -              2026-May-20 12:04
kmods_latest_1/    -              2026-May-20 12:04
kmods_quarterly/   -              2026-May-21 00:08
kmods_quarterly_0/ -              2026-May-21 00:08
kmods_quarterly_1/ -              2026-May-21 00:09

$ w3m -dump http://pkg.freebsd.org/FreeBSD:15:amd64/|grep -e ^latest -e ^quarterly
latest/            -              2026-Jul-12 04:04
quarterly/         -              2026-Jul-16 13:09
Edit:
fernandel:
Please install from ports until the kmods repo is updated or FreeBSD-ports is built for 15.1.
 
Look at the output:
realtek-re-kmod-1101.00.1501000 < needs updating (remote has 1102.01.1500068_1)

I'm guessing you are running on 15.1-RELEASE, so pkg version looks at all the repos and finds a newer version but it's actually newer for 15.0 not 15.1.
The pkg upgrade is looking at the repos against 15.1 so it finds nothing to do.
Yes. So, I don't see any problem here. pkg took the right decision.

Maybe, it shouldn't say there is a new version if this version isn't in sync with the actual kernel, but it's a comestic detail.

There's nothing to install from ports, one can keep the previous version of any kmod. The repos will update later. Or, if you want absolutely the last version and you are on quarterly repo, you can switch to the latest repo (I do not advise this).

All is working here, relax.
 
  • Like
Reactions: mer
This is the commit message.
Code:
net/realtek-re-kmod: update to 1.102.01 release (add support for 10G cards)

This forked version includes many fixes and performance improvements
over the previous 1.101.00 release. If you previously disabled the
checksum offloading due to crashes, you should now be able to re-add it.
 
It removes bugs and likely adds anothers. So, if there is no problem with the current version of realtek-re-kmod... Well, you know my opinion.
 
Well, you know my opinion.
All I know about you is that you are the sort of person who arbitrarily changes a URL and then complains that it doesn't work.
 
(...) I don't see your point. Nothing related to this subject, furthermore you made a personnal attack.
There is nothing to answer to this, except I'm sorry you were and are angry against me. It's not reciprocal.
 
The reason is that while 'latest' and 'quarterly' have been updated to 1102.01, 'kmods' remains at old 1101.00.
Code:
$ w3m -dump http://pkg.freebsd.org/FreeBSD:15:amd64/|grep kmod
kmods_latest/      -              2026-May-21 12:06
kmods_latest_0/    -              2026-May-20 12:04
kmods_latest_1/    -              2026-May-20 12:04
kmods_quarterly/   -              2026-May-21 00:08
kmods_quarterly_0/ -              2026-May-21 00:08
kmods_quarterly_1/ -              2026-May-21 00:09

$ w3m -dump http://pkg.freebsd.org/FreeBSD:15:amd64/|grep -e ^latest -e ^quarterly
latest/            -              2026-Jul-12 04:04
quarterly/         -              2026-Jul-16 13:09
Edit:

Please install from ports until the kmods repo is updated or FreeBSD-ports is built for 15.1.
Files in FreeBSD-ports-kmods latest are for amd with date from 2025 for freeBSD 15.1
 
Back
Top