summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gentoobrowse/console/packageimport.xml35
-rw-r--r--gentoobrowse/package.xslt26
-rw-r--r--gentoobrowse/robots.txt3
-rw-r--r--gentoobrowse/style.css8
-rw-r--r--gentoobrowse/views/package.xml37
5 files changed, 104 insertions, 5 deletions
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 @@
</columns>
</project2:sqlmerge>
+ <project2:sqlmerge name="rdeps" datasource="postgres" targettable="ebuild_rdeps" useview="yes">
+ <sql>
+ 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
+ </sql>
+ <columns>
+ <column key="true">ebuildid</column>
+ <column key="true">packageid</column>
+ <column key="true">slot</column>
+ <column key="true">op</column>
+ <column key="true">versionspec</column>
+ <column key="true">flags</column>
+ </columns>
+ </project2:sqlmerge>
+
<xi:include href="bugassociate.xml" />
</packageimport>
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 @@
<xsl:if test="count(/gentoo/summary/package/deps/package) &gt; 0">
<h3 class="tabhandle"><a href="javascript:showTab('deps');">Dependencies</a></h3>
</xsl:if>
+ <xsl:if test="count(/gentoo/summary/package/rdeps/package) &gt; 0">
+ <h3 class="tabhandle"><a href="javascript:showTab('rdeps');">Reverse dependencies</a></h3>
+ </xsl:if>
+ <xsl:if test="count(/gentoo/summary/package/depees/package) &gt; 0">
+ <h3 class="tabhandle"><a href="javascript:showTab('depees');">Dependees</a></h3>
+ </xsl:if>
<xsl:if test="count(/gentoo/summary/package/packageBugs/bug) &gt; 0">
<h3 class="tabhandle"><a href="javascript:showTab('bugs');">Open bugs</a></h3>
</xsl:if>
@@ -123,6 +129,8 @@
<!-- content -->
<xsl:apply-templates select="versions" />
<xsl:apply-templates select="deps" />
+ <xsl:apply-templates select="rdeps" />
+ <xsl:apply-templates select="depees" />
<xsl:apply-templates select="packageBugs" />
<xsl:apply-templates select="maskdetails" />
<xsl:apply-templates select="changelog" />
@@ -184,6 +192,24 @@
</xsl:if>
</xsl:template>
+ <!-- Package reverse dependencies -->
+ <xsl:template match="/gentoo/summary/package/rdeps">
+ <xsl:if test="count(/gentoo/summary/package/rdeps/package) &gt; 0">
+ <ul class="tabhidden" id="rdeps">
+ <xsl:apply-templates match="/gentoo/summary/package/rdeps/package" />
+ </ul>
+ </xsl:if>
+ </xsl:template>
+
+ <!-- Package reverse dependencies -->
+ <xsl:template match="/gentoo/summary/package/depees">
+ <xsl:if test="count(/gentoo/summary/package/depees/package) &gt; 0">
+ <ul class="tabhidden" id="depees">
+ <xsl:apply-templates match="/gentoo/summary/package/depees/package" />
+ </ul>
+ </xsl:if>
+ </xsl:template>
+
<!-- Package mask details -->
<xsl:template match="/gentoo/summary/package/maskdetails">
<xsl:if test="count(/gentoo/summary/package/maskdetails/mask) &gt; 0">
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 @@
</project2:sqlview>
<project2:sqlview name="deps" recordname="package" datasource="postgres">
<sql>
- 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 @@
<param bind="0" value="^packageid" />
</parameters>
</project2:sqlview>
+ <project2:sqlview name="rdeps" recordname="package" datasource="postgres">
+ <sql>
+ 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
+ </sql>
+ <parameters>
+ <param bind="0" value="^packageid" />
+ </parameters>
+ </project2:sqlview>
+ <project2:sqlview name="depees" recordname="package" datasource="postgres">
+ <sql>
+ 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
+ </sql>
+ <parameters>
+ <param bind="0" value="^packageid" />
+ <param bind="1" value="^packageid" />
+ </parameters>
+ </project2:sqlview>
<project2:sqlview name="maskstatus" recordname="mask" datasource="postgres">
<sql>
SELECT em.ebuildid, DENSE_RANK() OVER(ORDER BY em.setno) AS setno