pkg 2 ng conversion

Montgomery-Smith, Stephen stephen at missouri.edu
Sun Jun 8 20:01:03 UTC 2014


On 06/08/2014 02:25 PM, Jim Pazarena wrote:
> On 2014-06-08 10:55 AM, Warren Block wrote:
>> On Sun, 8 Jun 2014, Jim Pazarena wrote:
>>
>>
>> No.  pkg is just a package manager.  It does not replace ports, it just
>> handles packages.  Like the old package manager, binary packages can be
>> downloaded and installed rather than ports, but the choice is yours.
> 
> Ahh.. therein lies the confusion. I have been compiling ports for many
> years. However the compilations began nagging about converting pkg2ng.
> So I investigated, and set the appropriate "WITH_PKGNG=yes" and ran
> pkg2ng. But I never use packages. I always compile from ports.
> 
> So the warning appearing in each and every compile was & is very
> misleading. Unless I am *still* confused !!

I still think you are confused.  pkg manages the database that stores
which ports/packages are installed on your system.  Whether that
particular piece of software came from building it using a port, or from
downloading a binary package is immaterial.

I think part of the confusion comes from the double use of the words
package and/or port.  When you have, say, xorg-7.7 installed on your
system, do you say you have the port xorg installed, or the package xorg
installed?  Once it is installed it doesn't matter where it came from -
port or package.  For whatever reason, people tend to call it a package
once it is installed, even if it came from a port.

For example, when you write "pkg info" in the new system, or "pkg_info"
in the old system, it reads the database to tell you the list of
packages/ports installed.  Now "pkg_info" and "pkg" assume a very
different structure for the database.  That is why, if you have
installed any ports or packages using the old system, you have to run
pkg2ng.  It converts the database from one form to the other.  And that
is why if you are using FreeBSD-9 or an older system, you have to add
"WITH_PKGNG=yes" to make.conf, so that when more ports/packages are
installed, it will update the new database and not the old.

Why did the change the database structure?  The old way had a separate
directory for each port/package built.  The new way is to use a modern
relational database.  So one advantage is the the new pkg database is
much faster.  Maybe there are other advantages too.


More information about the freebsd-ports mailing list