Date: Fri, 13 Oct 2017 20:19:14 +0200 From: Vidar Karlsen <vidar@karlsen.tech> To: Jos Chrispijn <bsdports@cloudzeeland.nl> Cc: Kevin Oberman <rkoberman@gmail.com>, 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: <1F0845BB-FDAE-496D-B7B1-807154516B19@karlsen.tech> In-Reply-To: <58b4a0cf-8525-0c2c-d5cf-d87a2d95ba92@cloudzeeland.nl> References: <fc394181-fede-ce16-16d4-535306d59bfe@cloudzeeland.nl> <CAN6yY1sm65vPbqK6sNmnxLv0C7ohvNkLy-gAWOhoPhyUzquAbw@mail.gmail.com> <8E4C5B17-EB78-437F-9FBE-C0CD74333CB0@karlsen.tech> <9ce33529-55d4-e9ab-a377-2bd142e27b4b@cloudzeeland.nl> <29A49D53-5563-4FAF-B122-268DC6056EE6@karlsen.tech> <58b4a0cf-8525-0c2c-d5cf-d87a2d95ba92@cloudzeeland.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
--Apple-Mail=_FB85CFB4-CA8E-4368-9942-DD9C9A22EC9E Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On 13 Oct 2017, at 20:06, Jos Chrispijn <bsdports@cloudzeeland.nl> = wrote: >=20 >=20 > Op 12-10-2017 om 20:19 schreef Vidar Karlsen: >> I usually get that exact error when I run pkg from a directory that = no longer exists. In my case, this typically happens because I=E2=80=99m = sitting in a port dir like /usr/ports/dns/unbound after having run = 'portsnap fetch update=E2=80=99 which has deleted that dir and created a = new one because of a version bump in the tree. > Yes, I thought of that too; unfortunately I cannot reproduce manually. = Sometime this occurs and sometimes it doesn't. >=20 >=20 >> Your case with portmaster might be a bit different, but it should = normally not happen unless portmaster cd=E2=80=99s to a dir that then = gets deleted. Did your ports tree change while portmaster was running? > Nope - i mostly logon the BSD and run that batch by hand, without = doing anything else. >> If you can run pkg commands (like =E2=80=98pkg info=E2=80=99) = normally otherwise, I=E2=80=99ll have to assume that your sqlite = database is fine and that there is a temporary issue during the = portmaster run that causes this error to be thrown. > Everything is fine - my portscollection is in sync and I get no errors = on updating other than the one I initially wrote about. > Somehow I can't get it out of my head why I cannot put my finger = behind this minor issue.. In case this is the non-existent directory issue that=E2=80=99s biting = you, I can confirm that bapt=E2=80=99s relatively recent change to = libpkg/pkgdb.c takes care of that problem. I=E2=80=99d try that; simply = change: if (sqlite3_open("local.sqlite", &db->sqlite) !=3D SQLITE_OK) { to: if (sqlite3_open("/local.sqlite", &db->sqlite) !=3D SQLITE_OK) { =E2=80=A6or download the following patch into = ${PORTSDIR}/ports-mgmt/pkg/files and rebuild pkg: https://karlsen.tech/freebsd/pkg/patch-libpkg_pkgdb.c Hope that helps. =E2=80=94 Vidar --Apple-Mail=_FB85CFB4-CA8E-4368-9942-DD9C9A22EC9E Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEdj3MH0jPfbQdPzgZUYfnCLImz3gFAlnhA6IACgkQUYfnCLIm z3hmNRAAgAG/cDoYugZ9lMiJZG+wZKgjtAWSs7NVMRsA6Vm8D1XPtkD0viiFwR02 PfGzfCR2Q8BsCNhsNiLp0poZUZxz8K5JkNBbZhu2vv7aMqK7xDYpwYP2B/6ay0Y+ JNvSGtjFvJD7cTZUjaG47lsqjhkgmEcSQ1duIj1vPGAzH5KOGA77RAyQaiBhN3Gp BpL3WHcGUgfn7BcdlrCu9lABp7SHMzCZpYW9bQF0z963w1S2Z7nEjARBVXFTJ8kp 9FysTlYQb0+zynl47JCHtdN3rO6DgGhGTMEdVrDRzO4mgX36Un+rwdQ5IIPw28n5 uUxAUPCZ/e1kGOS3xgvH8OlSZ4VHKwfztyaT2V3/hy4LlwFgKuOK1Rcv4cAG6iSU 39awTdSvQvWqyKISMROq59m9+648FduLtD71zLNyGS/hNKvFBgIbcmtY71eoSEIM TGYp4aPPbC41bpauHdY+Sn0Ll+ZB6NGkBI+YYrzpvsCl+3z7JA1CbQEugpRGZodT qkUXtnoNZ48In5vJI86fyWHrCPDYVC5EWLlw/WyLIn/SW7BzSDm/2yGsKZHp7hX8 w1XcddV3cv9hdkQh1HNTXuYtv7MchcrZ12UGkPNY3lPKDxUZIKxdRcv7EAhifcXz VVxWFfIXttKpReKib3cz4DTMsNeHJOcUrmW6I4MKk/abuWsUkB0= =VpX9 -----END PGP SIGNATURE----- --Apple-Mail=_FB85CFB4-CA8E-4368-9942-DD9C9A22EC9E--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1F0845BB-FDAE-496D-B7B1-807154516B19>