packages: dokuwiki-plugin-data/dokuwiki-plugin-data.spec, dokuwiki-plugin-d...

glen glen at pld-linux.org
Wed Dec 1 19:21:14 CET 2010


Author: glen                         Date: Wed Dec  1 18:21:14 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- add separate-rpmdb.patch

---- Files affected:
packages/dokuwiki-plugin-data:
   dokuwiki-plugin-data.spec (1.19 -> 1.20) , separate-rpmdb.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/dokuwiki-plugin-data/dokuwiki-plugin-data.spec
diff -u packages/dokuwiki-plugin-data/dokuwiki-plugin-data.spec:1.19 packages/dokuwiki-plugin-data/dokuwiki-plugin-data.spec:1.20
--- packages/dokuwiki-plugin-data/dokuwiki-plugin-data.spec:1.19	Tue Nov 23 17:50:38 2010
+++ packages/dokuwiki-plugin-data/dokuwiki-plugin-data.spec	Wed Dec  1 19:21:09 2010
@@ -5,7 +5,7 @@
 Summary:	DokuWiki Structured Data Plugin
 Name:		dokuwiki-plugin-%{plugin}
 Version:	20100608
-Release:	1
+Release:	3
 License:	GPL v2
 Group:		Applications/WWW
 Source0:	http://github.com/splitbrain/dokuwiki-plugin-%{plugin}/zipball/master#/%{plugin}-%{version}.zip
@@ -14,6 +14,7 @@
 Patch0:		interwiki.patch
 Patch1:		helper-map.patch
 Patch2:		separator-style.patch
+Patch3:		separate-rpmdb.patch
 BuildRequires:	rpmbuild(macros) >= 1.520
 BuildRequires:	unzip
 Requires:	php-common >= 4:%{php_min_version}
@@ -52,6 +53,7 @@
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
 version=$(awk '/date/{print $2}' plugin.info.txt)
 if [ $(echo "$version" | tr -d -) != %{version} ]; then
@@ -112,6 +114,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.20  2010/12/01 18:21:09  glen
+- add separate-rpmdb.patch
+
 Revision 1.19  2010/11/23 16:50:38  glen
 - rel 1
 

================================================================
Index: packages/dokuwiki-plugin-data/separate-rpmdb.patch
diff -u /dev/null packages/dokuwiki-plugin-data/separate-rpmdb.patch:1.1
--- /dev/null	Wed Dec  1 19:21:14 2010
+++ packages/dokuwiki-plugin-data/separate-rpmdb.patch	Wed Dec  1 19:21:09 2010
@@ -0,0 +1,50 @@
+Separate rpmdb data to rpmdb table, left join via %rpm% field name on demand.
+
+As the rpmdb data is huge comparing to other data, it's best we keep it
+in separate table, if it is still a performance problem, we could use
+separate datafile.
+
+--- dokuwiki-plugin-data-20100608/db/latest.version	2010-11-03 15:20:30.000000000 +0200
++++ dokuwiki-plugin-data-20100608/db/latest.version	2010-12-01 19:50:59.214345000 +0200
+@@ -1 +1 @@
+-4
++5
+--- dokuwiki-plugin-data-20100608/helper.php	2010-12-01 19:51:15.127904142 +0200
++++ dokuwiki-plugin-data-20100608/helper.php	2010-12-01 19:50:59.217678000 +0200
+@@ -182,7 +182,9 @@
+         // fix title for special columns
+         static $specials = array('%title%'  => array('page', 'title'),
+                                  '%pageid%' => array('title', 'page'),
+-                                 '%class%'  => array('class'));
++                                 '%class%'  => array('class'),
++                                 '%rpm%'    => array('rpm'),
++                                );
+         if (isset($specials[$column['title']])) {
+             $s = $specials[$column['title']];
+             $column['title'] = $this->getLang($s[0]);
+--- dokuwiki-plugin-data-20100608/lang/en/lang.php	2010-11-03 15:20:30.000000000 +0200
++++ dokuwiki-plugin-data-20100608/lang/en/lang.php	2010-12-01 19:50:59.217678000 +0200
+@@ -16,6 +16,7 @@
+ $lang['page']      = 'Page';
+ $lang['title']     = 'Page Name';
+ $lang['class']     = 'Page Class';
++$lang['rpm']       = 'RPM Package';
+ 
+ $lang['name']      = 'Type Alias';
+ $lang['type']      = 'Original Type';
+--- dokuwiki-plugin-data-20100608/syntax/table.php	2010-11-03 15:20:30.000000000 +0200
++++ dokuwiki-plugin-data-20100608/syntax/table.php	2010-12-01 19:50:59.217678000 +0200
+@@ -328,6 +328,13 @@
+                 $select[] = '" " || pages.class';
+             }elseif($key == '%title%'){
+                 $select[] = "pages.page || '|' || pages.title";
++            }elseif($key == '%rpm%'){
++                if(!isset($tables[$key])){
++                    $tables[$key] = 'T'.(++$cnt);
++                    $from  .= ' LEFT JOIN rpmdb AS '.$tables[$key].' ON '.$tables[$key].'.pid = pages.pid';
++                }
++                $select[] = "group_concat(".$tables[$key].".value,'\n')";
++
+             }else{
+                 if(!isset($tables[$key])){
+                     $tables[$key] = 'T'.(++$cnt);
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/dokuwiki-plugin-data/dokuwiki-plugin-data.spec?r1=1.19&r2=1.20&f=u



More information about the pld-cvs-commit mailing list