Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 03 Aug 2009 11:22:41 -0700
From:      Doug Barton <dougb@FreeBSD.org>
To:        eculp <eculp@encontacto.net>
Cc:        freebsd-ports <freebsd-ports@freebsd.org>
Subject:   Re: Getting a lot of - pkg_version: corrupted record (pkgdep line without argument), ignoring
Message-ID:  <4A772AF1.7060400@FreeBSD.org>
In-Reply-To: <20090802203144.20053xv5f9w3ea68@econet.encontacto.net>
References:  <20090802203144.20053xv5f9w3ea68@econet.encontacto.net>

next in thread | previous in thread | raw e-mail | index | archive | help
eculp wrote:
> I'm getting a lot of the following messages and have no idea how to find
> which package is causing the problem. 

This is one of those times that opening up the files and having a look
for yourself might be a good way to start. :)

> pkg_version: corrupted record (pkgdep line without argument), ignoring

egrep '(pkgdep$|pkgdep $)' /var/db/pkg/*/+CONTENTS

However, you indicate below that you are using 'portmaster
--check-depends' which should be fixing those for you. So try this:

cd /var/db/
cp -Rp pkg pkg-before
portmaster --check-depends
diff -ur pkg-before pkg > ~/pkg-dir.diff1
cp -Rp pkg pkg-after
portmaster --check-depends
diff -ur pkg-after pkg > ~/pkg-dir.diff2
cd pkg
egrep -l '(pkgdep$|pkgdep $)' */+CONTENTS > ~/pkg-dir.egrep

Ideally pkg-dir.diff2 pkg-dir.egrep should both be empty there. If
not, you will need to rebuild all of the ports listed in the egrep
file. One easy way to do that would be to use vi to strip everything
but the directory name out of that file then do this:

portmaster `cat ~/pkg-dir.egrep`

> While I'm bothering you, could someone give me some tips on the best
> ways to find corrupted files in /var/db/pkgs, /var/db/ports and any
> other places that they might be hiding.  I run
>      portmaster --check-depends
>      portmaster --check-port-dbdir

Those are both good examples from my perspective. :)  One thing
though, --check-port-dbdir won't find anything that is corrupt, it
will only find things that don't apply to your currently installed ports.


hth,

Doug

-- 

    This .signature sanitized for your protection




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4A772AF1.7060400>