Tuan Hoang wrote:
Hi,
I've been back-porting SQLite 3.x to CentOS 4.7 for some development
work. I've been taking the SRPMS from koji.fedoraproject.org and
rebuilding them.
All has been fine through v3.6.7 but when I tried to recently upgrade to
3.6.10 (by just updating the SPEC file and rebuilding), the YUM updater
no longer works. In particular the python-sqlite package exits with an
error when it tries to read it's cache file (I assume that it's a SQLite
DB). I checked the in-between builds and one of the changes in v3.6.8
has triggered this error.
Is there anyone else with a similar problem? FWIW, I've also done this
under CentOS 5.2 and it also breaks its YUM too.
Thanks,
Tuan
P.S. Please reply all since I'm not subscribed to the mailing list.
I did a little more debugging with the yum and it's use of
python-sqlite. It appears that the database is not corrupt, but rather
that the database can't be created at all.
The attached CREATE TABLE statements work fine with v3.6.7 and before
(at least the ones that I've tried). As of v3.6.8 up through v3.6.10,
YUM can no longer create these tables.
Did the string "release" suddenly become a keyword? If so, why?
Tuan
CREATE TABLE db_info (dbversion INTEGER, checksum TEXT);
CREATE TABLE packages ( pkgKey INTEGER PRIMARY KEY, pkgId TEXT, name TEXT,
arch TEXT, version TEXT, epoch TEXT, release TEXT, summary TEXT,
description TEXT, url TEXT, time_file INTEGER, time_build INTEGER,
rpm_license TEXT, rpm_vendor TEXT, rpm_group TEXT, rpm_buildhost TEXT,
rpm_sourcerpm TEXT, rpm_header_start INTEGER, rpm_header_end INTEGER,
rpm_packager TEXT, size_package INTEGER, size_installed INTEGER,
size_archive INTEGER, location_href TEXT, checksum_type TEXT, checksum_value
TEXT);
CREATE TABLE files ( name TEXT, type TEXT, pkgKey INTEGER);
CREATE TABLE requires ( name TEXT, flags TEXT, epoch TEXT, version TEXT,
release TEXT, pkgKey INTEGER , pre BOOLEAN DEFAULT FALSE);
CREATE TABLE provides ( name TEXT, flags TEXT, epoch TEXT, version TEXT,
release TEXT, pkgKey INTEGER );
CREATE TABLE conflicts ( name TEXT, flags TEXT, epoch TEXT, version TEXT,
release TEXT, pkgKey INTEGER );
CREATE TABLE obsoletes ( name TEXT, flags TEXT, epoch TEXT, version TEXT,
release TEXT, pkgKey INTEGER );
CREATE INDEX packagename ON packages (name);
CREATE INDEX packageId ON packages (pkgId);
CREATE INDEX pkgrequires on requires (pkgKey);
CREATE INDEX pkgprovides on provides (pkgKey);
CREATE INDEX pkgconflicts on conflicts (pkgKey);
CREATE INDEX pkgobsoletes on obsoletes (pkgKey);
CREATE INDEX providesname ON provides (name);
CREATE TRIGGER removals AFTER DELETE ON packages BEGIN DELETE FROM files
WHERE pkgKey = old.pkgKey; DELETE FROM requires WHERE pkgKey = old.pkgKey;
DELETE FROM provides WHERE pkgKey = old.pkgKey; DELETE FROM conflicts WHERE
pkgKey = old.pkgKey; DELETE FROM obsoletes WHERE pkgKey = old.pkgKey; END;
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users