Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 02 Apr 2014 16:48:27 -0400
From:      Lowell Gilbert <freebsd-ports-local@be-well.ilk.org>
To:        Jakob Breivik Grimstveit <jakob@grimstveit.no>
Cc:        FreeBSD Ports mailing list <freebsd-ports@freebsd.org>
Subject:   Re: Repair pkgng
Message-ID:  <447g775ug4.fsf@lowell-desk.lan>
In-Reply-To: <CAFVH1KULq8wfn4HDTE6L6v5hg0XQhYZFOj4QVfsCVUMZ9hTKGw@mail.gmail.com> (Jakob Breivik Grimstveit's message of "Wed, 2 Apr 2014 14:27:16 %2B0200")
References:  <CAFVH1KULq8wfn4HDTE6L6v5hg0XQhYZFOj4QVfsCVUMZ9hTKGw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Jakob Breivik Grimstveit <jakob@grimstveit.no> 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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?447g775ug4.fsf>