1 #! /bin/sh /usr/share/dpatch/dpatch-run
2 ## 03_fix_class_mapping.dpatch by <cajus@debian.org>
3 ##
4 ## All lines beginning with `## DP:' are a description of the patch.
5 ## DP: Fix location of auto-generated class mapping file
7 @DPATCH@
8 diff -urNad gosa-2.6.3~/include/class_config.inc gosa-2.6.3/include/class_config.inc
9 --- gosa-2.6.3~/include/class_config.inc 2008-12-18 15:13:44.000000000 +0100
10 +++ gosa-2.6.3/include/class_config.inc 2009-01-15 14:08:54.000000000 +0100
11 @@ -76,12 +76,12 @@
12 if we have installed or removed plugins.
13 */
14 if(session::global_is_set("class_location.inc:timestamp")){
15 - $tmp = stat("../include/class_location.inc");
16 + $tmp = stat("/var/cache/gosa/class.cache");
17 if($tmp['mtime'] != session::global_get("class_location.inc:timestamp")){
18 session::global_un_set("plist");
19 }
20 }
21 - $tmp = stat("../include/class_location.inc");
22 + $tmp = stat("/var/cache/gosa/class.cache");
23 session::global_set("class_location.inc:timestamp",$tmp['mtime']);
26 diff -urNad gosa-2.6.3~/include/functions.inc gosa-2.6.3/include/functions.inc
27 --- gosa-2.6.3~/include/functions.inc 2009-01-15 14:07:35.000000000 +0100
28 +++ gosa-2.6.3/include/functions.inc 2009-01-15 14:07:36.000000000 +0100
29 @@ -73,7 +73,7 @@
30 $svn_revision = '$Revision: 13322 $';
32 /* Include required files */
33 -require_once("class_location.inc");
34 +require_once("/var/cache/gosa/class.cache");
35 require_once ("functions_debug.inc");
36 require_once ("accept-to-gettext.inc");
38 diff -urNad gosa-2.6.3~/update-gosa gosa-2.6.3/update-gosa
39 --- gosa-2.6.3~/update-gosa 2008-06-10 09:56:22.000000000 +0200
40 +++ gosa-2.6.3/update-gosa 2009-01-15 14:07:36.000000000 +0100
41 @@ -21,7 +21,7 @@
42 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
43 */
45 -define ("GOSA_HOME", dirname(__FILE__));
46 +define ("GOSA_HOME", "/usr/share/gosa");
47 define ("LOCALE_DIR", GOSA_HOME."/locale");
48 define ("PLUGSTATE_DIR", GOSA_HOME."/state");
50 @@ -122,8 +122,8 @@
51 function rescan_classes()
52 {
53 echo "Updating class cache...\n";
54 - $class_mapping= get_classes();
55 - $filename= GOSA_HOME."/include/class_location.inc";
56 + $class_mapping= get_classes("/usr/share/gosa");
57 + $filename= "/var/cache/gosa/class.cache";
59 /* Sanity checks */
60 if (!file_exists($filename) || is_writable($filename)) {