Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 Jun 2014 13:42:10 -0700
From:      Kevin Oberman <rkoberman@gmail.com>
To:        "Montgomery-Smith, Stephen" <stephen@missouri.edu>
Cc:        "freebsd-ports@freebsd.org" <freebsd-ports@freebsd.org>
Subject:   Re: pkg 2 ng conversion
Message-ID:  <CAN6yY1ua1wYsZNLAbrpUMsYUPw7PPLL5iU6-72C=iaRVeYBGkw@mail.gmail.com>
In-Reply-To: <5394C0A9.5090903@missouri.edu>
References:  <5394B89A.4040607@paz.bz> <5394C0A9.5090903@missouri.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Jun 8, 2014 at 12:59 PM, Montgomery-Smith, Stephen <
stephen@missouri.edu> wrote:

> 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.
>
>
There are many advantages and speed is a minor one.

The one that I see as most significant is that the database schema will not
allow any port or package to be installed if there is a file that has the
same path as an installed one. This was actually a fairly common problem.
It was often noticed, perhaps fairly quickly, but often not, and a
CONFLICTS was added to the port, but until them, the second port simply
overwrote the older file. This seemed to happen most frequently with
documentation files.

The new database has blocks the installation of the new port until the
conflict is resolved. It does not prevent a port from being committed with
a conflict, but the conflict will be noted the first time someone tries to
install the ports and will them be fixed in one of several ways.
-- 
R. Kevin Oberman, Network Engineer, Retired
E-mail: rkoberman@gmail.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAN6yY1ua1wYsZNLAbrpUMsYUPw7PPLL5iU6-72C=iaRVeYBGkw>