Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Getting a lot of - pkg_version: corrupted record (pkgdep line without argument), ignoring

148 views
Skip to first unread message

eculp

unread,
Aug 2, 2009, 9:31:44 PM8/2/09
to freebsd-ports
I'm getting a lot of the following messages and have no idea how to
find which package is causing the problem. I'm afraid that this could
become serious.

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

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
pkgdb -Fu
regularly but I'm sure there is more.

Thanks,

ed

Doug Barton

unread,
Aug 3, 2009, 2:22:41 PM8/3/09
to eculp, freebsd-ports
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

eculp

unread,
Aug 4, 2009, 9:31:45 AM8/4/09
to Doug Barton, freebsd-ports
Quoting Doug Barton <do...@FreeBSD.org>:

> 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
>

Doug, thanks for taking the time to answer and write the scripts.
I've been both hesitant and probably lazy to look under the hood
especially in /var/db/* ports stuff but the script worked as expected
and got me looking at the files, something I should have done years
ago but THANKS to PORTMASTER I hadn't needed to. In this case I was
trying to remove everything in kde3 and simultaneously try to not
affect kde4 with pkg_deinstall -r and that really turned to shit. I
started seeing this after that failed attempt.

I rebuilt the packages and all is well.

Thanks again for the explanation, the script and especially for
Postmaster that I have been using almost exclusively since the first
version and has been improving .with each subsequent release.

ed

> 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
>
>

--
�Cuentas con empleados o colaboradores?

Doug Barton

unread,
Aug 4, 2009, 11:40:38 AM8/4/09
to eculp, freebsd-ports
eculp wrote:

> I rebuilt the packages and all is well.

Glad to hear that it worked out for you. :)

> Thanks again for the explanation, the script and especially for
> Postmaster that I have been using almost exclusively since the first
> version and has been improving .with each subsequent release.

Thank you for the kind words, they are appreciated.

0 new messages