Solved Does pkg and ports have the same version for each package?

After # pkg update && # portsnap fetch update, does pkg and ports have the same version for each package?
 
jronald, pkg's typically lag behind ports so ... ehrm .. yes and no. :D

I suppose it depends on how fast a pkg is created from an updated port.

What are you seeing?
 
jronald, pkg's typically lag behind ports so ... ehrm .. yes and no. :D

I suppose it depends on how fast a pkg is created from an updated port.

What are you seeing?

When installing phpPgAdmin-php73, it needs php73-pgsql, the one in pkg doesn't support postresql11-server. I installed it from ports, but I hadn't tried pkg update first.
It's said mixed use of pkg and ports is not good for dependency maintenance. I'd like to use ports only, but my laptop doesn't have disk space large enough. It seems that mixed use of pkg and port is the only choice for me now, and another problem, when make install, it'll also make install its dependencies, but how to make clean for the dependencies? It's hard to find them out. And do make clean in /usr/ports is not efficient, it checks every port.
 
does pkg and ports have the same version for each package?
It depends. By default a -RELEASE version will use a quarterly branch for packages. These are created once every three months and only updated for security or stability issues. Ports are a "rolling release", i.e. they are constantly updated. There are quarterly branches for ports too but you will need to use Subversion, you can't get them with portsnap(8). There can be big version differences between a quarterly and a latest branch.
 
It depends. By default a -RELEASE version will use a quarterly branch for packages. These are created once every three months and only updated for security or stability issues. Ports are a "rolling release", i.e. they are constantly updated. There are quarterly branches for ports too but you will need to use Subversion, you can't get them with portsnap(8). There can be big version differences between a quarterly and a latest branch.
What if both pkg or ports are latest?
I think it's not promised that a package's version in pkg is the same to that in ports.
 
What if both pkg or ports are latest?
Packages are built every few days I believe, I honestly don't know what the current schedule is. But everything starts with a port, so ports are always the most up to date. Packages can lag a few days until a new package build run is done.
 
Packages are built every few days I believe, I honestly don't know what the current schedule is. But everything starts with a port, so ports are always the most up to date. Packages can lag a few days until a new package build run is done.

Quite a while ago I found the Poudriere web front-end for one of the build machines (can't recall how I found this now), and inspecting the builds my observation was that a build starts the morning after the last build finished. A fictional example:
  1. Build ONE starts on 2019-01-01, it's a small number of Ports and finishes later on 2019-01-01
  2. Build TWO starts on 2019-01-02, there are a large number of updated Ports and/or there are a number of large Ports to compile, this Build takes >24hrs to complete, finsihes on 2019-01-03
  3. Build THREE starts on 2019-01-04, the morning after Build TWO finished
So depending on when a Port update is committed, and depending on how long the already queued Ports take to build, my guess/experience is that a Package can be a 2-4 days behind the Port (possibly give or take a day).
 
So depending on when a Port update is committed, and depending on how long the already queued Ports take to build, my guess/experience is that a Package can be a 2-4 days behind the Port (possibly give or take a day).
The pkg's update follows the ports' update so quickly, and pkg must try to choose the most preferrable configure, so its good for common use, especially with relatively small disk space pkg is preferred. ports is more advanced, I'll learn & try it out. Thanks.
 
pkg must try to choose the most preferrable configure
Packages are always built using the port's default options. This is the main reason why you shouldn't mix ports and packages. The only reason to build from ports is because you want to deviate from the default options. As packages are built using the defaults you can get a difference in dependencies (PortA, with custom options, depends on PortB but PackageA; built from a default PortA; depends on PackageC).
 
After # pkg update && # portsnap fetch update, does pkg and ports have the same version for each package?
Yes and no.

Yes, if I install shells/pdksh using either method then I'll get the same version (5.2 at the time of writing).

The problem though is that versions don't really mean anything:

No, because the resulting packages don't have to be the same. A port gets build based on your system whereas a package got build with default settings. But this also manifests itself with the system itself. Example:

Code:
$ pkg info -rx samba                                                           
samba46-4.6.16_1:
        fusefs-smbnetfs-0.6.1_1
        squid-4.3_1
        mplayer-1.3.0.20180920_2
        kodi-17.6_7
Here you see that smbnetfs, as it is installed on my system, depends on Samba 4.6. But...
Code:
root@psi:/ # pkg search -dx smbnetfs
fusefs-smbnetfs-0.6.1_1
Comment        : Mount smb shares (Fuse filesystem)
Depends on     :
        fusefs-libs-2.9.9
        samba47-4.7.12
        glib-2.56.3_2,1
        gettext-runtime-0.19.8.1_2
... this is the official package as it is available in the FreeBSD repository. This one depends on Samba 4.7 (which is the current default version). So even though they're the same version they still differ from each other.

This is a very important issue when it comes to understanding the differences between ports & packages.
 
Back
Top