From owner-freebsd-ports@freebsd.org Fri Oct 13 18:19:24 2017 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A89EDE29188 for ; Fri, 13 Oct 2017 18:19:24 +0000 (UTC) (envelope-from vidar@karlsen.tech) Received: from nivlheim.sentralbanken.no (nivlheim.sentralbanken.no [178.62.212.206]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CD576FB9C for ; Fri, 13 Oct 2017 18:19:23 +0000 (UTC) (envelope-from vidar@karlsen.tech) Received: from air.karlsen.tech (95.63.34.95.customer.cdi.no [95.34.63.95]) by nivlheim.sentralbanken.no (Postfix) with ESMTPSA id 68FAE89A5B; Fri, 13 Oct 2017 20:19:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=karlsen.tech; s=mail; t=1507918755; bh=Qgs7jGsjg2Mq0Aw/vVOGntQJvD1V+F6hAk8q5ViCUBo=; h=From:Subject:Date:In-Reply-To:Cc:To:References; b=zx+4yIc1SgHppJfJDYPC0aAAKcqMl6+Zggop40Dm0cTevQeuHhGwxwyuQB6GWK71q cgDbK+iV1/iGAYsFgtMzUqIcyLYi1BV22+wIyUgStXfamTO8gMrSIiN6mtpxSQ5ZGR ShFksmrxQVFxPkmC/NIIaWyy2uQde07+uKIimIHY= From: Vidar Karlsen Message-Id: <1F0845BB-FDAE-496D-B7B1-807154516B19@karlsen.tech> Content-Type: multipart/signed; boundary="Apple-Mail=_FB85CFB4-CA8E-4368-9942-DD9C9A22EC9E"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: pkg: sqlite error while executing sqlite open in file pkgdb.c:1126: unable to open database file Date: Fri, 13 Oct 2017 20:19:14 +0200 In-Reply-To: <58b4a0cf-8525-0c2c-d5cf-d87a2d95ba92@cloudzeeland.nl> Cc: Kevin Oberman , FreeBSD Ports ML To: Jos Chrispijn References: <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> X-Mailer: Apple Mail (2.3273) X-Virus-Scanned: clamav-milter 0.99.2 at nivlheim.sentralbanken.no X-Virus-Status: Clean X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.2 (nivlheim.sentralbanken.no [0.0.0.0]); Fri, 13 Oct 2017 20:19:15 +0200 (CEST) X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Oct 2017 18:19:24 -0000 --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 = 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--