I cannot understand the inconsistent nuances between
NOTICE:
Yes . . .I have read the
To ensure that the FreeBSD Ports Collection registers new software with
in
Once
Unfortunately, there is not much information in the Handbook, Chapter 5.6.3.1. Upgrading Ports Using Portmaster (see http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/ports-using.html) regarding specific examples of how to use the application.
There are two commands that can generate lists of installed ports and packages:
Additionally,
(From the man pages) the output of
There are apparently three databases effecting the results:
/usr/ports/packages is the default directory pointed to by the PACKAGES variable of
I'm not sure how the /var/db/ports database is maintained or updated, but I do know that to check for stale entries in /var/db/ports,
Ran
. . .still has corresponding sub-dir in /var/db/ports that contains an options file. Why?
Running
Note that two versions existed for python:
===>>> Checking lang_python27: Ok
===>>> Checking lang_python33: Ok
python33 is the latest version. How to remove python27? (Used
Again, had to run
The
Regardless, I have produced a four-column report listing the output of ls /var/db/pkg, ls /var/db/ports, pkg info, and pkg_info. None of them agree with each of the others! This document is a 56K PDF and this forum will not let me upload it, so here is a URL to the same: http://archaxis.net/htdocs/RTWingfield/htdocs/FreeBSD/ports-pkgs/FreeBSD_Port_and_Package_Management_Lists.pdf.
If you look at (relative) page 15 of 19, you will see four columns:
ls /var/db/pkg (360 total) -- ls /var/db/ports (84 total) -- pkg info (376 total) -- pkg_info (358 total)
(The numbers are the number of rows or objects in each column.)
MySQL Example: Neither the mysql-server or mysql-client is listed in the ls /var/db/ports column.
The versions, 5.6.14, are correct for both client and server in the ls /var/db/pkg and pkg_info columns; however, the pkg info column identifies the mysql-server-5.5.33 version! Where did it get this???
Continuing re. Perl: I've tried to install perl5.18 via portmaster, but it seems to insist on reinstalling perl5.14.
Only perl5.14 is listed in the ls /var/db/pkg and pkg_info columns; doesn't appear in either the ls /var/db/ports or pkg info columns. I've just restarted (~5:20 PM) using
Final Example re. PHP5: This has been a real "bear"! I'm going to try a "remake" using
It is very annoying that the number and versions in the example columns do not balance.
Why are they so different?
What I suspect: Some make files (when run from a
How to synchronize the results?
pkgng and portmaster. With apologies, this is a long and complicated post (I actually have over forty typed pages of examples, test results, and notes accumulated over a period of five man-days. Very frustrating!)NOTICE:
pkgng is installed on this system portmaster is installed on this system portupgrade is not installed on this system.Yes . . .I have read the
man pages and Handbook, et al. pkgng is the next generation replacement for the traditional FreeBSD package management tools, offering many features that make dealing with binary packages faster and easier. pkgng is not a replacement for port management tools like ports-mgmt/ portmaster or ports-mgmt/ portupgrade. These tools can be used to install third-party software from both binary packages and the Ports Collection, while pkgng installs only binary packages. To ensure that the FreeBSD Ports Collection registers new software with
pkgng, and not the traditional packages format, FreeBSD versions earlier than 10.X require this line,
Code:
WITH_PKGNG= yes
/etc/make.conf: Once
pkgng is installed, the package database must be converted from the traditional format to the new format by running the command. pkg2ng.Unfortunately, there is not much information in the Handbook, Chapter 5.6.3.1. Upgrading Ports Using Portmaster (see http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/ports-using.html) regarding specific examples of how to use the application.
There are two commands that can generate lists of installed ports and packages:
pkg_info
pkg infoAdditionally,
ls listings of the /var/db/pkg and /var/db/ports databases do not agree with the lists generated by pkg_info and pkg info commands.(From the man pages) the output of
PKG_INFO(1) is either extracted from package files named on the command line, or from already installed package information in /var/db/pkg/<pkg-name>.There are apparently three databases effecting the results:
/var/db/pkg
/var/db/ports
/usr/ports/packages
/var/db/ports
/usr/ports/packages
/usr/ports/packages is the default directory pointed to by the PACKAGES variable of
PORTMASTER(8) and is used to store new and backup packages. The content of this database seems to be volatile or transient. I'm not sure how the /var/db/ports database is maintained or updated, but I do know that to check for stale entries in /var/db/ports,
# portmaster -v --check-port-dbdir apparently tries to clean up the database. For example:Ran
make deinstall in /usr/ports/lang/perl5.14. . .still has corresponding sub-dir in /var/db/ports that contains an options file. Why?
Running
portmaster -v --check-port-dbdir prompted to delete the db for perl5.14.Note that two versions existed for python:
===>>> Checking lang_python27: Ok
===>>> Checking lang_python33: Ok
python33 is the latest version. How to remove python27? (Used
make deinstall.)Again, had to run
portmaster -v --check-port-dbdir to remove from /var/db/ports.The
portmaster --delete-packages argument sounds dangerous. If there is . . .what is the correct syntax to instruct portmaster to delete only one specific port? If portmaster can delete only one specific port, will it update the /var/db/ports database with having to run portmaster -v --check-port-dbdir? (Every time I've tried to delete a specific single port with portmaster, it launches into a (re)install of the port.) The only way I've been able to delete an installed port is to make deinstall, and apparently the make process does not update the /var/db/ports database (or others uniformily).Regardless, I have produced a four-column report listing the output of ls /var/db/pkg, ls /var/db/ports, pkg info, and pkg_info. None of them agree with each of the others! This document is a 56K PDF and this forum will not let me upload it, so here is a URL to the same: http://archaxis.net/htdocs/RTWingfield/htdocs/FreeBSD/ports-pkgs/FreeBSD_Port_and_Package_Management_Lists.pdf.
If you look at (relative) page 15 of 19, you will see four columns:
ls /var/db/pkg (360 total) -- ls /var/db/ports (84 total) -- pkg info (376 total) -- pkg_info (358 total)
(The numbers are the number of rows or objects in each column.)
MySQL Example: Neither the mysql-server or mysql-client is listed in the ls /var/db/ports column.
The versions, 5.6.14, are correct for both client and server in the ls /var/db/pkg and pkg_info columns; however, the pkg info column identifies the mysql-server-5.5.33 version! Where did it get this???
Continuing re. Perl: I've tried to install perl5.18 via portmaster, but it seems to insist on reinstalling perl5.14.
Only perl5.14 is listed in the ls /var/db/pkg and pkg_info columns; doesn't appear in either the ls /var/db/ports or pkg info columns. I've just restarted (~5:20 PM) using
portmaster -i /usr/ports/lang/perl5.18. This will take a while. It will be interesting to see what changes. See my followup post.Final Example re. PHP5: This has been a real "bear"! I'm going to try a "remake" using
portmaster instead of make deinstall and make build install clean. Currently, the only php5-* objects show up in the pkg info column as "extensions". I will start this once the Perl compiles and (hopefully) installation finish. It will be interesting to see what changes.It is very annoying that the number and versions in the example columns do not balance.
Why are they so different?
What I suspect: Some make files (when run from a
make command) do not consistently update the databases as per pkgng and portmaster hopefully do. How to synchronize the results?