libpkg, sqlite and database problems prevent building any packages

Kimmo Paasiala kpaasial at gmail.com
Mon Aug 5 14:24:16 UTC 2013


On Mon, Aug 5, 2013 at 5:03 PM, Matthew Seaman <matthew at freebsd.org> wrote:
> On 05/08/2013 14:30, Thomas Mueller wrote:
>> I could see my pkg client is out of date, but how do I update it?
>>
>> Attempts to update all gave me those error messages.  Installation fails.
>
> Your package database has got into an inconsistent state.  pkg(8) is
> attempting to auto-update the schema to the latest version, but failing
> because it's trying to remove an 'infos' column from a table where that
> column has apparently already been removed.  (Likely this situation has
> come about because pkg got killed in the middle of doing this update
> previously.)
>
> How happy are you to get down'n'dirty with the source code and running
> SQL from the command line?  If you look at the updates pkg is attempting
> to run shown here:
>
>    https://github.com/freebsd/pkg/blob/master/libpkg/private/db_upgrades.h
>
> would you be capable of looking at the DB schema, working out which of
> those updates had been applied, aplying any outstanding ones by hand and
> then setting the user version to 19 by:
>
>    sql> PRAGMA user_version = 19 ;
>
> ?
>
> If not, check in /var/backups for a good copy of your local.sqlite
> database and try and restore from there.  Unfortunately, there's no
> guarantee that any backup copy doesn't have the same inconsistencies as
> your live copy.
>
> We need to make pkg(8) databases more resilient to the effects of SIGHUP
> or similar while they are elbows-deep in the bowels of the DB schema...
>
>         Cheers,
>
>         Matthew
>
>
>
>
>

Ok this is then different problem than what I saw when I reverted back
from pkg-devel to pkg, the error message was the same though.

-Kimmo


More information about the freebsd-ports mailing list