diff options
Diffstat (limited to 'readyaml.py')
-rwxr-xr-x | readyaml.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/readyaml.py b/readyaml.py index 2ef9a3b..50603b1 100755 --- a/readyaml.py +++ b/readyaml.py @@ -31,6 +31,8 @@ def readyaml(db, stream): if pid is not None: cur.execute("DELETE FROM content WHERE pid = ?;", (pid,)) cur.execute("DELETE FROM dependency WHERE pid = ?;", (pid,)) + cur.execute("DELETE FROM conflict WHERE pid = ?;", (pid,)) + cur.execute("DELETE FROM provide WHERE pid = ?;", (pid,)) cur.execute("UPDATE package SET version = ?, architecture = ?, source = ? WHERE id = ?;", (metadata["version"], metadata["architecture"], metadata["source"], pid)) else: @@ -40,6 +42,10 @@ def readyaml(db, stream): pid = cur.lastrowid cur.executemany("INSERT INTO dependency (pid, required) VALUES (?, ?);", ((pid, dep) for dep in metadata["depends"])) + cur.executemany("INSERT INTO conflict (pid, conflicting) VALUES (?, ?);", + ((pid, conflict) for conflict in metadata["conflicts"])) + cur.executemany("INSERT INTO provide (pid, provided) VALUES (?, ?);", + ((pid, provided) for provided in metadata["provides"])) for entry in gen: if entry == "commit": db.commit() |