after pkgng update, daily run still using pkg_info
matthew at FreeBSD.org
Mon Sep 30 07:15:58 UTC 2013
On 30/09/2013 06:09, Gary Aitken wrote:
>>> On 09/28/13 10:52, Gary Aitken wrote:
>>> After switching to pkgng, I noticed that my daily run output constantly
>>> complains about the installed packages being corrupt, e.g.:
>>> "pkg_info: the package info for package 'asciidoc-8.6.8_1' is corrupt"
>>> The problem is with
>>> which is still using "pkg_info" instead of "pkg info"
>>> Was this script supposed to be automatically updated as part of the
>>> conversion? What's the "right" way to upgrade this on a 9.1 release
>>> system? Or should I just edit the script by hand and be done with it?
>> On 09/28/13 13:57, Mark Felder wrote:
>> Run pkg_info. If there is anything listed you have not fully converted
>> to pkgng and have some old broken/corrupt packages. You'll want to clean
>> this up.
> What does "clean this up" mean, and how does one go about it, given the
> system is converted to using pkgng? There is no /var/db/pkg/pkgdb.db
> Some of the packages reported as corrupt were installed *after* the
> conversion to pkgng, so why is pkg_info even noticing them?
> "pkg info" reports 705 packages installed, and installs and re-installs
> using portmaster seem to be working. "pkg_info" reports 14 "good"
> packages and 658 "corrupt" packages. If pkg_info is picking up packages
> installed after the conversion, why doesn't the sum of good and corrupt
> packages equal the number pkg reports?
> It was my understanding that after switching to pkgng, the pkg_* cmds should
> no longer be used. If that's the case, shouldn't the daily script have been
> modified by the upgrade process?
Yes, you're correct that the pkg_info command should no longer be used
after pkgng-ifying your system. Not because it's harmful or lead to any
sort of breakage but simply because it won't return any meaningful
Ideally, there shouldn't really be any of the old style package metadata
left in /var/db/pkg after running pkg2ng but the conversion process may
occasionaly stumble over the odd port or two. (In which case force the
port in question to re-install. If you're using a package repository,
that's 'pkg install -f pkgname' -- otherwise, just
use the normal portmaster / portupgrade command you'ld have used pre-pkgng.)
If you are a portmaster user be aware that it does store various bits to
do with managing distfiles in /var/db/pkg/pkgname-ver/ subdirectories.
These shouldn't be confused with old style pkg_install metadata -- the
distinguishing feature is if they contain a +CONTENTS file.
As to why pkg2ng doesn't disable pkg_install related periodic jobs --
pretty much because no one has implemented that. pkg comes with it's own
set of periodic job scripts which should give you the equivalent set of
reports via the pkg local database, so all we'd need to do is turn off
any old pkg_install script and turn on the pkg equivalent.
I've just created a new issue on github for that:
Patches -- or even better, pull requests -- are welcome.
Dr Matthew J Seaman MA, D.Phil.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 398 bytes
Desc: OpenPGP digital signature
More information about the freebsd-questions