From aaa2e34490f28370dc6f1f911a6df576b8cd38ad Mon Sep 17 00:00:00 2001 From: randomdan Date: Mon, 11 Oct 2010 13:25:57 +0000 Subject: Add robots txt Reduce tab size Fix regex in dependency finder Add reverse deps to DB Show reverse deps and dependee on site --- gentoobrowse/console/packageimport.xml | 35 +++++++++++++++++++++++++++++++- gentoobrowse/package.xslt | 26 ++++++++++++++++++++++++ gentoobrowse/robots.txt | 3 +++ gentoobrowse/style.css | 8 +++++--- gentoobrowse/views/package.xml | 37 +++++++++++++++++++++++++++++++++- 5 files changed, 104 insertions(+), 5 deletions(-) create mode 100644 gentoobrowse/robots.txt diff --git a/gentoobrowse/console/packageimport.xml b/gentoobrowse/console/packageimport.xml index ddc3ff1..81502ce 100644 --- a/gentoobrowse/console/packageimport.xml +++ b/gentoobrowse/console/packageimport.xml @@ -107,7 +107,7 @@ field[1] AS op, field[5] AS versionspec, field[9] AS flags FROM ( SELECT fileid, REGEXP_MATCHES(dep, - '([^a-z0-9]*)([a-z0-9-]+)/([a-z0-9-]+?)(-([0-9][^:]*))?(:([0-9.]+))?(\\[([^]]+)\\])?') as field + '([^a-zA-Z0-9]*)([a-zA-Z0-9-]+)/([a-zA-Z0-9_+-]+?)(-([0-9][^:]*))?(:([0-9.]+))?(\\[([^]]+)\\])?') as field FROM ( SELECT fc.fileid, REGEXP_SPLIT_TO_TABLE(fc.content, ' ') AS dep FROM filecache fc, files f @@ -131,5 +131,38 @@ + + + SELECT fileid AS ebuildid, packageid, COALESCE(slot, '') AS slot, COALESCE(op, '') AS op, + COALESCE(versionspec, '') AS versionspec, COALESCE(flags, '') AS flags + FROM ( + SELECT DISTINCT fileid, field[2] AS cat, field[3] AS pkg, field[7] AS slot, + field[1] AS op, field[5] AS versionspec, field[9] AS flags + FROM ( + SELECT fileid, REGEXP_MATCHES(dep, + '([^a-zA-Z0-9]*)([a-zA-Z0-9-]+)/([a-zA-Z0-9_+-]+?)(-([0-9][^:]*))?(:([0-9.]+))?(\\[([^]]+)\\])?') as field + FROM ( + SELECT fc.fileid, REGEXP_SPLIT_TO_TABLE(fc.content, ' ') AS dep + FROM filecache fc, files f + WHERE line = 2 + AND fc.fileid = f.fileid + AND filetypeid = 1 + ) src + ) AS src2 + ) AS src3, categories c, packages p + WHERE p.categoryid = c.categoryid + AND p.name = pkg + AND c.name = cat + + + ebuildid + packageid + slot + op + versionspec + flags + + + diff --git a/gentoobrowse/package.xslt b/gentoobrowse/package.xslt index ca9b114..e0b6e3a 100644 --- a/gentoobrowse/package.xslt +++ b/gentoobrowse/package.xslt @@ -109,6 +109,12 @@

Dependencies

+ +

Reverse dependencies

+
+ +

Dependees

+

Open bugs

@@ -123,6 +129,8 @@ + + @@ -184,6 +192,24 @@ + + + +
    + +
+
+
+ + + + +
    + +
+
+
+ diff --git a/gentoobrowse/robots.txt b/gentoobrowse/robots.txt new file mode 100644 index 0000000..bc11640 --- /dev/null +++ b/gentoobrowse/robots.txt @@ -0,0 +1,3 @@ +User-agent: * +Allow: / + diff --git a/gentoobrowse/style.css b/gentoobrowse/style.css index fbbe53d..dcd30f0 100644 --- a/gentoobrowse/style.css +++ b/gentoobrowse/style.css @@ -110,7 +110,7 @@ form.tracker { } .tabhandle a { text-decoration: none; - padding: 0 30px; + padding: 0 15px; } .tabhandle { font-weight: normal; @@ -119,8 +119,10 @@ form.tracker { font-size: 14px; border: 1px solid grey; margin: 0 4px; + -webkit-border-top-left-radius: 10px; + -webkit-border-top-right-radius: 10px; -moz-border-radius-topleft: 10px; -moz-border-radius-topright: 10px; - border-radius-topleft: 10px; - border-radius-topright: 10px; + border-top-left-radius: 10px; + border-top-right-radius: 10px; } diff --git a/gentoobrowse/views/package.xml b/gentoobrowse/views/package.xml index a7fc724..68ab0f6 100644 --- a/gentoobrowse/views/package.xml +++ b/gentoobrowse/views/package.xml @@ -87,7 +87,7 @@ - SELECT distinct cd.name AS catname, pd.name AS pkgname, pd.description + SELECT DISTINCT cd.name AS catname, pd.name AS pkgname, pd.description FROM ebuilds e, ebuild_deps d, packages pd, categories cd WHERE e.packageid = ? AND d.ebuildid = e.ebuildid @@ -99,6 +99,41 @@ + + + SELECT DISTINCT cd.name AS catname, pd.name AS pkgname, pd.description + FROM ebuilds e, ebuild_rdeps d, packages pd, categories cd + WHERE e.packageid = ? + AND d.ebuildid = e.ebuildid + AND pd.packageid = d.packageid + AND pd.categoryid = cd.categoryid + ORDER BY cd.name, pd.name + + + + + + + + SELECT DISTINCT cd.name AS catname, pd.name AS pkgname, pd.description + FROM ebuilds e, ( + SELECT ebuildid + FROM ebuild_rdeps d + WHERE d.packageid = ? + UNION + SELECT ebuildid + FROM ebuild_deps d + WHERE d.packageid = ?) d, packages pd, categories cd + WHERE d.ebuildid = e.ebuildid + AND pd.packageid = e.packageid + AND pd.categoryid = cd.categoryid + ORDER BY cd.name, pd.name + + + + + + SELECT em.ebuildid, DENSE_RANK() OVER(ORDER BY em.setno) AS setno -- cgit v1.2.3