From 622e72618da01e320a5303ef588f9220e8a78558 Mon Sep 17 00:00:00 2001 From: Nathan Wagner Date: Wed, 14 Nov 2018 17:57:20 +0000 Subject: [PATCH] add library dependency views --- db.sql | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/db.sql b/db.sql index aadd91d..548dba8 100644 --- a/db.sql +++ b/db.sql @@ -288,6 +288,27 @@ create table elfneeded ( without rowid ; +create view package_libraries as +select distinct PF.pkgid, EL.soname +from packagefiles_pkgid PF join elflibraries EL on PF.hash = EL.file +; + +create view package_libraries_needed as +with pkglibs as ( + select distinct EN.needed as soname, PF.pkgid + from elfneeded EN + join packagefiles_pkgid PF on PF.hash = EN.file + ), + pkgprovides as ( + select distinct EL.soname, PF.pkgid + from elflibraries EL + join packagefiles_pkgid PF on PF.hash = EL.file + ) + select distinct PL.pkgid,PL.soname, PP.soname is not null as selfsatisfied + from pkglibs PL + left join pkgprovides PP on PL.pkgid = PP.pkgid and PL.soname = PP.soname +; + -- package scripts: table of package, stage, file create table scripts ( package text, -- 2.40.0