From: Nathan Wagner Date: Mon, 1 Oct 2018 16:27:25 +0000 (+0000) Subject: remove unused elf tables, add elf summary view X-Git-Tag: v0.2.0~7 X-Git-Url: https://pd.if.org/git/?a=commitdiff_plain;ds=sidebyside;h=ba901e2a9d0361de899461397cc6380549f8661a;p=zpackage remove unused elf tables, add elf summary view --- diff --git a/db.sql b/db.sql index 350bdd0..a9e2a5e 100644 --- a/db.sql +++ b/db.sql @@ -264,20 +264,13 @@ create table pathtags ( without rowid ; -create table elfinfo ( - file text primary key, -- hash of blob - elftype text -) -without rowid -; - -create table elfdeps ( - file text, - soname text, - dependency text, - primary key (file, soname, dependency) -) -without rowid +create view elfdeps as +select PF.pkgid, PF.status, PF.path, N.needed as needs, +PL.path as library, PL.pkgid provider, PL.status as library_status +from packagefiles_status PF +join elfneeded N on N.file = PF.hash +left join elflibraries L on N.needed = L.soname +left join packagefiles_status PL on PL.hash = L.file ; -- TODO just elf information? diff --git a/lib/zpm.c b/lib/zpm.c index b7d9777..5059447 100644 --- a/lib/zpm.c +++ b/lib/zpm.c @@ -562,10 +562,6 @@ static int set_elf_info(sqlite3 *db, char *hash, char *content, size_t length) { int rc; /* clear existing for this hash */ - if (!run_for_hash(db, "delete from elfinfo where file = ?", hash)) { - SQLERP(db, "error clearing elf info"); - return 0; - } if (!run_for_hash(db, "delete from elflibraries where file = ?", hash)) { SQLERP(db, "error clearing elf library");