Date: Sun, 22 Jan 2017 13:55:18 +0100 From: Kurt Jaeger <lists@opsec.eu> To: Matthew Seaman <matthew@FreeBSD.org> Cc: freebsd-ports@freebsd.org Subject: Re: pkg database issue: database version 34 is newer than libpkg(3) version 33 ? Message-ID: <20170122125518.GN13006@home.opsec.eu> In-Reply-To: <0f79185a-0241-aef1-7fd1-bdd0fd831771@FreeBSD.org> References: <20170122093652.GM13006@home.opsec.eu> <0f79185a-0241-aef1-7fd1-bdd0fd831771@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi! > On 22/01/2017 09:36, Kurt Jaeger wrote: > > # pkg delete pkg > > pkg: warning: database version 34 is newer than libpkg(3) version 33, but still compatible > > pkg: sqlite error while executing INSERT OR ROLLBACK INTO pkg_search(id, name, origin) VALUES (?1, ?2 || '-' || ?3, ?4); in file pkgdb.c:1544: no such table: pkg_search > > > > I've tried to create the table pkg_search using sqlite3, but: > > > > CREATE VIRTUAL TABLE pkg_search USING fts4(id, name, origin); > > Error: vtable constructor failed: pkg_search > > > > Any ideas on how to proceed ? > > Do you have a backup of your pkg database? If not, make one now. > This looks like you have downgraded pkg(8) at some point -- it's > complaining because the DB schema is more advanced that what it is > expecting. Yes. The question is: why is CREATE VIRTUAL TABLE pkg_search USING fts4(id, name, origin); in sqlite3 failing, even if pkg info sqlite3 is configured with: FTS4 : on > You should be able to do that, since the DB schema is meant > to be kept compatible between different versions, but it looks like > there may have been a failure to do that. > > Easiest way out here is to upgrade to the latest version of pkg(8). It was easier to nuke /usr/local and /var/db/pkg and re-add the few relevant packages 8-} > Failing that, you'ld need to take heroic measures to rebuild your pkg > database using a DB schema compatible with your version of pkg. One way > to do that is to move aside your existing pkg DB, initialise a new empty > DB and then re-install all of the packages on your system. Yes, that worked. -- pi@opsec.eu +49 171 3101372 3 years to go !
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170122125518.GN13006>