From c04c6a6c6a3412593e77cf31eb5ceefc46f87783 Mon Sep 17 00:00:00 2001
From: Helmut Grohne <helmut@subdivi.de>
Date: Tue, 25 Feb 2014 07:17:39 +0100
Subject: record package metadata that describes co-installability

Specifically all entries in the Conflicts header are saved in the
conflict table, all entries in the Provides header are saved in the
provide table (to cover conflicts with virtual packages) and packages
using dpkg-divert in preinst get a magic "_dpkg-divert" entry in their
conflict table. With this metadata it should be possible to compute
undeclared file conflicts.
---
 schema.sql | 2 ++
 1 file changed, 2 insertions(+)

(limited to 'schema.sql')

diff --git a/schema.sql b/schema.sql
index 2ab7ca7..eeaf3b5 100644
--- a/schema.sql
+++ b/schema.sql
@@ -4,6 +4,8 @@ CREATE TABLE function (id INTEGER PRIMARY KEY, name TEXT UNIQUE NOT NULL, eqclas
 INSERT INTO function (name, eqclass) VALUES ("sha512", 1), ("gzip_sha512", 1), ("png_sha512", 2), ("gif_sha512", 2);
 CREATE TABLE hash (cid INTEGER, fid INTEGER NOT NULL, hash TEXT, FOREIGN KEY (cid) REFERENCES content(id) ON DELETE CASCADE, FOREIGN KEY (fid) REFERENCES function(id));
 CREATE TABLE dependency (pid INTEGER, required TEXT, FOREIGN KEY (pid) REFERENCES package(id) ON DELETE CASCADE);
+CREATE TABLE conflict (pid INTEGER, conflicting TEXT, FOREIGN KEY (pid) REFERENCES package(id) ON DELETE CASCADE);
+CREATE TABLE provide (pid INTEGER, provided TEXT, FOREIGN KEY (pid) REFERENCES package(id) ON DELETE CASCADE);
 CREATE INDEX content_package_size_index ON content (pid, size);
 CREATE INDEX hash_cid_index ON hash (cid);
 CREATE INDEX hash_hash_index ON hash (hash);
-- 
cgit v1.2.3

