From owner-freebsd-ports@FreeBSD.ORG Sun Jun 8 20:42:11 2014 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1DD2443C for ; Sun, 8 Jun 2014 20:42:11 +0000 (UTC) Received: from mail-ob0-x233.google.com (mail-ob0-x233.google.com [IPv6:2607:f8b0:4003:c01::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D9F75275C for ; Sun, 8 Jun 2014 20:42:10 +0000 (UTC) Received: by mail-ob0-f179.google.com with SMTP id uz6so233796obc.38 for ; Sun, 08 Jun 2014 13:42:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=Enj77Y3bMIBUTkvoxKu7Qtt8uXOh2XqA0bUn7wsSSXM=; b=RvvtjgN0LmkUxl1uHVWwyxRED0CDoaM7SYrYdGC1SYOwARZcAYf8/UoEh4JWfKZDLm tmUwULMunWXu0PcxWhZwkBdsA0sxJQbfNh3juF7F2tgLXnCD1OCT2EwNUf1fpXBUnkC8 J06tbZxUBI95K6c+SvVyTql3FV67VNJJ5KoTxs2NKQN8vhQn/RlZHCAQqSX+Bz1G/16C fFfzYsb8ZrPIw6kSvfF+kJC+wMCWKCtMtul8DWF6p2bWU66lr2ljTMr4hNuNoKjB9zD/ PQhWd+hsXbo44jIJQM58CV4G6oiUma4tMAHf4yicJwG8ZWNUGY+NiwL+a81LD6IoclrQ EQUA== MIME-Version: 1.0 X-Received: by 10.60.56.98 with SMTP id z2mr5170654oep.62.1402260130167; Sun, 08 Jun 2014 13:42:10 -0700 (PDT) Sender: kob6558@gmail.com Received: by 10.202.171.73 with HTTP; Sun, 8 Jun 2014 13:42:10 -0700 (PDT) In-Reply-To: <5394C0A9.5090903@missouri.edu> References: <5394B89A.4040607@paz.bz> <5394C0A9.5090903@missouri.edu> Date: Sun, 8 Jun 2014 13:42:10 -0700 X-Google-Sender-Auth: hCNVlAGCKX06omAXKvgCpunGAao Message-ID: Subject: Re: pkg 2 ng conversion From: Kevin Oberman To: "Montgomery-Smith, Stephen" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18 Cc: "freebsd-ports@freebsd.org" X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jun 2014 20:42:11 -0000 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