Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 08 Dec 2013 17:24:08 +0000
From:      james <james@mansionfamily.plus.com>
To:        Matthew Seaman <matthew@FreeBSD.org>
Cc:        FreeBSD Mailing List <freebsd-questions@freebsd.org>
Subject:   Infinite pkg loop, was Re: pkg-ng problem, how do I recover?
Message-ID:  <52A4AB38.1020505@mansionfamily.plus.com>
In-Reply-To: <529B7A6B.6020800@FreeBSD.org>
References:  <529B4657.3040201@mansionfamily.plus.com> <529B7A6B.6020800@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 01/12/2013 18:05, Matthew Seaman wrote:
> On 01/12/2013 14:23, james wrote:
>> >How can I recover from this?
>> >
>> >root@nas:~ # pkg update -f
>> >Updating repository catalogue
>> >digests.txz 100% 1093KB   1.1MB/s   1.1MB/s   00:01
>> >packagesite.txz 100% 5886KB   1.4MB/s   2.0MB/s   00:04
>> >pkg: sqlite: database disk image is malformed (pkgdb_repo.c:545)
>> >Incremental update completed, 0 packages processed:
>> >0 packages updated, 372 removed and 13769 added.
>> >pkg: No digest falling back on legacy catalog format
>> >pkg:http://pkg.FreeBSD.org/freebsd:9:x86:64/latest/repo.txz: Not Found
>> >root@nas:~ #
>> >
>> >Earlier, I tried to pkgupgrade, but it seemed to get into a loop with
>> >docbook claiming malformed info, so I quit that.
>> >
>> >This is:
>> >
>> >root@nas:~ # uname -a
>> >FreeBSD nas 9.2-RELEASE FreeBSD 9.2-RELEASE #0 r255898: Thu Sep 26
>> >22:50:31 UTC 2013
>> >root@bake.isc.freebsd.org:/usr/obj/usr/src/sys/GENERIC   amd64
>> >root@nas:~ #
> If pkg(8) complains about a corrupted database, the first thing to try is:
>
>     # rm /var/db/pkg/repo-*.sqlite
>
> The vast majority of the time this will cure the problem, and it's safe
> enough to do, as everything in those repo-*.sqlite databases is derived
> from repository catalogues which you can just download again.
>
> 	Cheers,
>
> 	Matthew
>
> -- Dr Matthew J Seaman MA, D.Phil. PGP: 
> http://www.infracaninophile.co.uk/pgpkey
Thanks, I tried but when I do the original problem persists:

root@nas:~ # pkg upgrade
Updating repository catalogue
digests.txz 100% 1092KB   1.1MB/s   1.1MB/s   00:01
packagesite.txz 100% 5877KB   1.9MB/s   1.4MB/s   00:03
pkg: Skipping malformed dependency docbook-xml
pkg: Skipping malformed dependency docbook
pkg: Skipping malformed dependency docbook-xml
pkg: Skipping malformed dependency docbook
pkg: Skipping malformed dependency docbook-xml
pkg: Skipping malformed dependency docbook
pkg: Skipping malformed dependency docbook-xml
pkg: Skipping malformed dependency docbook
pkg: Skipping malformed dependency docbook-xml
pkg: Skipping malformed dependency docbook
pkg: Skipping malformed dependency docbook-xml
pkg: Skipping malformed dependency docbook
pkg: Skipping malformed dependency docbook-xml
pkg: Skipping malformed dependency docbook
pkg: Skipping malformed dependency docbook-xml
pkg: Skipping malformed dependency docbook
pkg: Skipping malformed dependency docbook-xml
pkg: Skipping malformed dependency docbook

and so on, until I press Ctrl-C.  And then then retry gives:

root@nas:~ # pkg upgrade
Updating repository catalogue
pkg: sqlite: database disk image is malformed (pkgdb.c:3069)
pkg: Unable to query repository
root@nas:~ #

pkg info thinks I don't have docbook or docbook-xml installed.

Any ideas what I should do now?

Its entirely repeatable if I delete the repo sqlite.

James



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?52A4AB38.1020505>