Date: Wed, 13 May 2015 18:17:12 +1000 From: andrew clarke <mail@ozzmosis.com> To: Scott Bennett <bennett@sdf.org>, freebsd-ports@freebsd.org Subject: Re: damage to pkg's sqlite data base Message-ID: <20150513081712.GC18834@ozzmosis.com> In-Reply-To: <20150513075526.GA18834@ozzmosis.com> References: <201505120617.t4C6HkA3019096@sdf.org> <20150513075526.GA18834@ozzmosis.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed 2015-05-13 17:55:26 UTC+1000, andrew clarke (mail@ozzmosis.com) wrote: > $ sqlite3 local.sqlite.new > SQLite version 3.8.10.1 2015-05-09 12:14:55 > Enter ".help" for usage hints. > sqlite> .read local.sqlite.dump > sqlite> .quit > > Now we can use our newly created database, which should be error-free: > > $ sudo cp /var/db/pkg/local.sqlite /var/db/pkg/local.sqlite.backup > $ sudo mv local.sqlite.new /var/db/pkg/local.sqlite > > I don't guarantee any of the above will work. It will depend on how > much the database is corrupted etc. > > You will also need databases/sqlite3 installed, which unfortunately > isn't provided in the FreeBSD base system. This could be a problem if > pkg refuses to install anything. In that case I would either run the Actually I was wrong about this. The pkg command has the sqlite3 interpreter built-in, accessed via "pkg shell", that opens local.sqlite by default: $ pkg shell SQLite version 3.8.8.2 2015-01-30 14:30:45 Enter ".help" for usage hints. sqlite> .quit So there is no real need to install databases/sqlite3. Regards Andrew
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150513081712.GC18834>