summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrandomdan <randomdan@localhost>2010-08-28 00:07:06 +0000
committerrandomdan <randomdan@localhost>2010-08-28 00:07:06 +0000
commitf6a3fa1944b0ecc3dbdbbb48747e4c3765c9a775 (patch)
tree991f255bf14cb5098fee20a479d7f447d3161483
parentUse modified bug summary to locate associate packages even with version (diff)
downloadgentoobrowse-f6a3fa1944b0ecc3dbdbbb48747e4c3765c9a775.tar.bz2
gentoobrowse-f6a3fa1944b0ecc3dbdbbb48747e4c3765c9a775.tar.xz
gentoobrowse-f6a3fa1944b0ecc3dbdbbb48747e4c3765c9a775.zip
Import and display the ebuild slot and license
-rw-r--r--gentoobrowse/browse.xslt5
-rw-r--r--gentoobrowse/console/packageimport.xml6
-rw-r--r--gentoobrowse/views/package.xml2
3 files changed, 9 insertions, 4 deletions
diff --git a/gentoobrowse/browse.xslt b/gentoobrowse/browse.xslt
index 8d3643d..6f1bacb 100644
--- a/gentoobrowse/browse.xslt
+++ b/gentoobrowse/browse.xslt
@@ -42,7 +42,10 @@
</xsl:template>
<xsl:template match="/gentoo/summary/package/versions/version">
<li>
- <span class="ver">v<xsl:value-of select="version" /></span> (<xsl:value-of select="moddate" />)
+ <span class="ver">v<xsl:value-of select="version" /></span>
+ (<i>Modified :</i> <xsl:value-of select="moddate" /><xsl:text> </xsl:text>
+ <i>Slot :</i> <xsl:value-of select="slot" /><xsl:text> </xsl:text>
+ <i>License :</i> <xsl:value-of select="license" />)
<ul>
<li>
<xsl:for-each select="../../versionArchs/arch[ebuildid=current()/ebuildid]">
diff --git a/gentoobrowse/console/packageimport.xml b/gentoobrowse/console/packageimport.xml
index 12bca02..f417f9a 100644
--- a/gentoobrowse/console/packageimport.xml
+++ b/gentoobrowse/console/packageimport.xml
@@ -32,13 +32,15 @@
<project2:sqlmerge name="ebuilds" datasource="postgres" targettable="ebuilds" useview="yes">
<sql>
- SELECT packageid, version, fileid AS ebuildid, ebuildversion_constructor(version) AS versioninst
+ SELECT packageid, version, f.fileid AS ebuildid, ebuildversion_constructor(version) AS versioninst, fcs.content AS slot, fcl.content AS license
FROM ( SELECT f.fileid,
(REGEXP_MATCHES(filename, '^[^/]+'))[1] AS cat,
(REGEXP_MATCHES(filename, '/(.+)-[0-9]'))[1] AS name,
(REGEXP_MATCHES(filename, '/.+-([0-9].*)$'))[1] AS version
FROM files f
- WHERE filetypeid = 1) f, categories c, packages p
+ WHERE filetypeid = 1) f LEFT OUTER JOIN filecache fcs
+ ON fcs.fileid = f.fileid AND fcs.line = 3 LEFT OUTER JOIN filecache fcl
+ ON fcl.fileid = f.fileid AND fcl.line = 7, categories c, packages p
WHERE f.cat = c.name
AND c.categoryid = p.categoryid
AND p.name = f.name
diff --git a/gentoobrowse/views/package.xml b/gentoobrowse/views/package.xml
index 1ed38b3..a4ba735 100644
--- a/gentoobrowse/views/package.xml
+++ b/gentoobrowse/views/package.xml
@@ -28,7 +28,7 @@
</project2:sqlview>
<project2:sqlview name="versions" recordname="version" datasource="postgres">
<sql>
- SELECT e.ebuildid, e.version, f.moddate
+ SELECT e.ebuildid, e.version, f.moddate, e.slot, e.license
FROM ebuilds e, files f
WHERE e.packageid = ?
AND e.ebuildid = f.fileid