Suggestion to add build/revision number to "pkg stats"

mfv mfv at
Wed Sep 16 20:49:35 UTC 2015


I've been using pkg from an early release and have been very impressed
with it ease of use.  All but a handful of my programs are installed and
upgraded with it.  I only have a handful of programs with custom
configurations and use portmaster to upgrade them.

Before upgrading a port in the ports tree, I've read that it is best
to make certain that the ports tree is in sync with the build number of
the packages.  This was achieved by modifying a script that I found on
the web.

However, this approach seems to be putting the horse before the cart.
The build number is only available when the build begins, but the
package upgrade is not possible until the build process ends many
hours later.  Moreover, it is also possible to update the port tree to
a particular release and then do a follow up port upgrade to a
different release.

A simple solution would be to have the build number available as part
of a port upgrade and made available in "pkg stats".  Its output
could look like this:

Local package database:
    Installed packages: 780
    Disk space occupied: 6 GiB

Remote package database(s):
    Number of repositories: 1
    Packages available: 24561
    Unique packages: 24561
    Total size of packages: 44 GiB
    Latest revision number: 123456

Even better would be an argument to "pkg stats" that would only output
the revision number, say "pkg stats -n"

After running "pkg upgrade", it would then be an easy to extract the
build number of that particular upgrade and then sync the ports tree to
that number using subversion or, my favourite, svnup.

If I had a large number of machines to upgrade I would use poudriere
within a jail but this seem to be overkill for a single computer.

Many thanks for producing a well thought out set of programs.

    Cheers ...                                 __O
                                             _ \<,_
    Marek                                   (+)/ (+)

More information about the freebsd-questions mailing list