From owner-freebsd-ports@FreeBSD.ORG Wed Apr 2 20:48:40 2014 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E3B74751 for ; Wed, 2 Apr 2014 20:48:40 +0000 (UTC) Received: from be-well.ilk.org (be-well.ilk.org [23.30.133.173]) by mx1.freebsd.org (Postfix) with ESMTP id B9A84AAC for ; Wed, 2 Apr 2014 20:48:40 +0000 (UTC) Received: from lowell-desk.lan (lowell-desk.lan [172.30.250.41]) by be-well.ilk.org (Postfix) with ESMTP id 748AA33C22; Wed, 2 Apr 2014 16:48:29 -0400 (EDT) Received: by lowell-desk.lan (Postfix, from userid 1147) id DD3A739847; Wed, 2 Apr 2014 16:48:27 -0400 (EDT) From: Lowell Gilbert To: Jakob Breivik Grimstveit Subject: Re: Repair pkgng References: Date: Wed, 02 Apr 2014 16:48:27 -0400 In-Reply-To: (Jakob Breivik Grimstveit's message of "Wed, 2 Apr 2014 14:27:16 +0200") Message-ID: <447g775ug4.fsf@lowell-desk.lan> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain Cc: FreeBSD Ports mailing list X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: FreeBSD Ports mailing list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Apr 2014 20:48:41 -0000 Jakob Breivik Grimstveit writes: > Hi, > > After having done some half-hearted pkgng conversions back in the fbsd 9.x > days I'm now on fbsd 10. > > I use `portmaster -a -v -d --delete-packages` to upgrade packages > > Trying to convert to new pkg format fails: > > # pkg2ng > Converting packages from /var/db/pkg > [...] > Converting libyaml-0.1.6... > pkg: Unable to open plist file: /var/db/pkg/libyaml-0.1.6/+CONTENTS > Skipping invalid package: /var/db/pkg/libyaml-0.1.6 > Converting gcc-ecj-4.5... > pkg: Unable to open plist file: /var/db/pkg/gcc-ecj-4.5/+CONTENTS > Skipping invalid package: /var/db/pkg/gcc-ecj-4.5 > Converting cmake-modules-2.8.10.2... > pkg: Unable to open plist file: /var/db/pkg/cmake-modules-2.8.10.2/+CONTENTS > Skipping invalid package: /var/db/pkg/cmake-modules-2.8.10.2 > [...] > Analysing shared libraries, this will take a while... done > > These lines I get for every installed package (I assume). That just sounds like you already were using pkgng. > /etc/make.conf contains WITH_PKGNG=YES > > /var/db/pkg only contains these files: > > $ find /var/db/pkg > [...] > /var/db/pkg/libyaml-0.1.6 > /var/db/pkg/libyaml-0.1.6/distfiles > /var/db/pkg/gcc-ecj-4.5 > /var/db/pkg/gcc-ecj-4.5/distfiles > /var/db/pkg/cmake-modules-2.8.10.2 > /var/db/pkg/cmake-modules-2.8.10.2/distfiles > [...] If you are missing /var/db/pkg/local.sqlite, then you've got a problem. Double-check. > portmaster -l and /contents of /var/db/pkg are also different (not very > strange, I assume): > > $ portmaster -l | wc -l && find /var/db/pkg -type d -maxdepth 1|wc -l > 206 > 267 Only the database matters. I suspect that you actually have one, because I think that portmaster must be depending on it under pkgng, so the fact that it has a clue that you have ports installed probably means that you're okay. Under pkgng, a more useful way to do that second step is "pkg info | wc -l". > How do I get myself safely over to using just pkgng, as I should on fbsd10? I think you already are. Start by running "pkg -N" to give the package database a check. If it reports problems, deal with those. Otherwise, just start using the pkg command instead of the pkg_* commands.