Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Oct 2017 16:15:16 -0700
From:      Kevin Oberman <rkoberman@gmail.com>
To:        Jos Chrispijn <bsdports@cloudzeeland.nl>
Cc:        FreeBSD Ports ML <freebsd-ports@freebsd.org>
Subject:   Re: pkg: sqlite error while executing sqlite open in file pkgdb.c:1126: unable to open database file
Message-ID:  <CAN6yY1sm65vPbqK6sNmnxLv0C7ohvNkLy-gAWOhoPhyUzquAbw@mail.gmail.com>
In-Reply-To: <fc394181-fede-ce16-16d4-535306d59bfe@cloudzeeland.nl>
References:  <fc394181-fede-ce16-16d4-535306d59bfe@cloudzeeland.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Oct 11, 2017 at 11:15 AM, Jos Chrispijn <bsdports@cloudzeeland.nl>
wrote:

> Dear group,
>
> Apparently I have an issue when finalizing the ports with portmanager.
>
> When I run this batch to update my ports:
>
> portmaster -y --clean-distfiles
> portmaster -y --clean-packages
> portmaster -y --check-depends
> portmaster -a
>
> At the end or the update (everything goes well) I sometimes get this
> display:
>
> --- cut ---
>
> ===>>> Returning to update check of installed ports
> ===>>> Update check of installed ports complete
> pkg: sqlite error while executing sqlite open in file pkgdb.c:1126: unable
> to open database file
> ===>>> Done displaying pkg-message files
> ===>>> The following actions were performed:
>
> < list with ports updates (successful) >
>
> --- cut ---
>
> I checked numerous solutions, but most of them refer to a solution done
> with the pkg command, while I am using portmaster to upgrade.
>
> Can someone tell me how I can solve this issue without risking my ports
> collection being corrupted by some pkg command?
>
> Thanks for your help!
> Jos Chrispijn
>

While you are using portmaster(8), portmaster, in turn, uses pkg and the
pkg database which is sqlite  So the pkg suggestions are likely reasonable.
It looks like the db is missing, seriously damaged, has protections that
keep portmaster from accessing it, or your db is not in the right pkg is
looking for it.

That said, it's not clear exactly where in the process these occurred. If
you had already installed ports, pkg had already accessed the db several
times. If you can't figure out why the db could not be opened, providing a
bit more information might help.  So might a "pkg check -B" which will read
the db many  times. If you can narrow it down, you can also use sqlite(1)
to issue db queries directly if you are familiar with its commands (mostly
SQL, of course).
--
Kevin Oberman, Part time kid herder and retired Network Engineer
E-mail: rkoberman@gmail.com
PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683



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