diff options
author | randomdan <randomdan@localhost> | 2011-07-26 18:09:18 +0000 |
---|---|---|
committer | randomdan <randomdan@localhost> | 2011-07-26 18:09:18 +0000 |
commit | 13af5288fe8cc2e0586e806d19443b4766d7f4d5 (patch) | |
tree | 8b01de3592b68d3965abccfd5bb2e90223721220 | |
parent | Minor style tweak to make more room for tabs (diff) | |
download | gentoobrowse-13af5288fe8cc2e0586e806d19443b4766d7f4d5.tar.bz2 gentoobrowse-13af5288fe8cc2e0586e806d19443b4766d7f4d5.tar.xz gentoobrowse-13af5288fe8cc2e0586e806d19443b4766d7f4d5.zip |
Scripts for licenses and use flags
-rw-r--r-- | gentoobrowse/console/packagelicenses.xml | 44 | ||||
-rw-r--r-- | gentoobrowse/console/use.global.xml | 26 | ||||
-rw-r--r-- | gentoobrowse/console/use.local.xml | 51 |
3 files changed, 121 insertions, 0 deletions
diff --git a/gentoobrowse/console/packagelicenses.xml b/gentoobrowse/console/packagelicenses.xml new file mode 100644 index 0000000..236a031 --- /dev/null +++ b/gentoobrowse/console/packagelicenses.xml @@ -0,0 +1,44 @@ +<?xml version="1.0"?> +<homepages name="bugimport" xmlns:xi="http://www.w3.org/2001/XInclude" + xmlns:project2="http://project2.randomdan.homeip.net"> + <project2:sqlrows name="updatedlicenses" datasource="postgres"> + <sql> + SELECT f.filename, ft.searchroot || f.filename AS path + FROM files f, filetypes ft + WHERE (f.cachedat IS NULL OR f.cachedat != f.moddate) + AND f.filetypeid = ft.filetypeid + AND filename NOT LIKE '%.pdf' + AND ft.filetypeid = 7 + </sql> + </project2:sqlrows> + <project2:filerows name="lic" encoding="iso-8859-1"> + <path source="parent" name="path" depth="1" /> + <columns> + <column>text</column> + </columns> + </project2:filerows> + <project2:sqlmerge name="update" datasource="postgres" targettable="license" + updatewhere="a.name IN (SELECT o.filename FROM files o WHERE o.cachedat IS NULL OR o.cachedat != o.moddate)"> + <project2:iterate name="show" source="updatedlicenses"> + <project2:iterate name="show" source="lic"> + <project2:sqlmergeinsert> + <parameters> + <param name="name"><value source="parent" name="filename" depth="2" /></param> + <param name="legalbumph"><value source="parent" name="text" depth="1" /></param> + </parameters> + </project2:sqlmergeinsert> + </project2:iterate> + </project2:iterate> + <columns> + <column key="true">name</column> + <column>legalbumph</column> + </columns> + </project2:sqlmerge> + <project2:sqltask name="update" datasource="postgres"> + <sql> + UPDATE files SET + cachedat = moddate + WHERE filetypeid = 7 + </sql> + </project2:sqltask> +</homepages> diff --git a/gentoobrowse/console/use.global.xml b/gentoobrowse/console/use.global.xml new file mode 100644 index 0000000..9fafbfe --- /dev/null +++ b/gentoobrowse/console/use.global.xml @@ -0,0 +1,26 @@ +<?xml version="1.0"?> +<test name="test" xmlns:xi="http://www.w3.org/2001/XInclude" + xmlns:project2="http://project2.randomdan.homeip.net"> + <project2:filerows name="cl" newline=" " encoding="utf-8" fieldSep="" quoteChar="" path="/usr/portage/profiles/use.desc"> + <columns> + <column>text</column> + </columns> + </project2:filerows> + <project2:regexrows name="cla"> + <sourceText source="parent" name="text" depth="1" /> + <regex>([^ ]+) - (.+)</regex> + <columns> + <column>use</column> + <column>description</column> + </columns> + </project2:regexrows> + <project2:sqlmerge name="mergeguse" datasource="postgres" targettable="use_global"> + <project2:iterate name="lines" source="cl"> + <project2:iterate name="flags" source="cla" /> + </project2:iterate> + <columns> + <column key="true">use</column> + <column>description</column> + </columns> + </project2:sqlmerge> +</test> diff --git a/gentoobrowse/console/use.local.xml b/gentoobrowse/console/use.local.xml new file mode 100644 index 0000000..034c4c7 --- /dev/null +++ b/gentoobrowse/console/use.local.xml @@ -0,0 +1,51 @@ +<?xml version="1.0"?> +<test name="test" xmlns:xi="http://www.w3.org/2001/XInclude" + xmlns:project2="http://project2.randomdan.homeip.net"> + <project2:filerows name="cl" newline=" " encoding="utf-8" fieldSep="" quoteChar="" path="/usr/portage/profiles/use.local.desc"> + <columns> + <column>text</column> + </columns> + </project2:filerows> + <project2:regexrows name="cla"> + <sourceText source="parent" name="text" depth="1" /> + <regex>([^/]+)/([^:]+):([^ ]+) - (.+)</regex> + <columns> + <column>category</column> + <column>package</column> + <column>use</column> + <column>description</column> + </columns> + </project2:regexrows> + <project2:sqlmerge name="mergeguse" datasource="postgres" targettable="use_local"> + <project2:iterate name="lines" source="cl"> + <project2:iterate name="flags" source="cla"> + <project2:sqlmergeinsert name="insertFile"> + <parameters> + <param name="packageid"> + <value source="lookup" name="packageid"> + <project2:sqlrows name="packagelist" datasource="postgres"> + <sql> + SELECT p.packageid, c.name AS category, p.name AS package + FROM packages p, categories c + WHERE p.categoryid = c.categoryid + </sql> + </project2:sqlrows> + <parameters> + <param name="package"><value source="parent" name="package" depth="1"/></param> + <param name="category"><value source="parent" name="category" depth="1"/></param> + </parameters> + </value> + </param> + <param name="use"><value source="parent" name="use" depth="1"/></param> + <param name="description"><value source="parent" name="description" depth="1" /></param> + </parameters> + </project2:sqlmergeinsert> + </project2:iterate> + </project2:iterate> + <columns> + <column key="true">packageid</column> + <column key="true">use</column> + <column>description</column> + </columns> + </project2:sqlmerge> +</test> |