[gst-devel] going into gnome 2.2 -> patch to move registry to /var/cache

Leif Johnson leif at ambient.2y.net
Thu Nov 28 00:45:03 CET 2002


Well, don't I feel lame ... guess I got a little too excited
about editing the patch file. This time I didn't change
anything from "cvs diff -u". Hope this works.

Also, vishnu, afaict you should be able to apply the patch,
recompile the gstreamer core and then rerun gst-register to
implement the changes. (You might also want to delete
PREFIX/etc/gstreamer/registry.xml, your old registry file,
but that's up to you.) The patch just changes the location
of the registry to PREFIX/var/cache/gstreamer.

leif

On Thu, 28 Nov 2002, Christian Fredrik Kalager Schaller wrote:

> Hi Leif,
> Tried applying the patch, but I get
> 
> patch: **** malformed patch at line 81: Index: gst/Makefile.am
> 
> Christian
> 

-- 
Leif Morgan Johnson . http://ambient.2y.net/leif/
IAESTE trainee      . http://www.iaeste.org/
Salomon Automation  . http://www.salomon.at/
-------------- next part --------------
Index: debian/rules
===================================================================
RCS file: /cvsroot/gstreamer/gstreamer/debian/rules,v
retrieving revision 1.21
diff -u -r1.21 rules
--- debian/rules	3 Oct 2002 03:02:08 -0000	1.21
+++ debian/rules	28 Nov 2002 08:37:42 -0000
@@ -36,6 +36,8 @@
 		--with-html-dir=\$${prefix}/share/doc/gstreamer-doc \
 		--sysconfdir=/etc \
 		--with-configdir=/etc/gstreamer \
+		--localstatedir=/var \
+		--with-cachedir=/var/cache/gstreamer \
 		--disable-plugin-builddir \
 		--disable-tests \
 		--disable-examples \
Index: gst/Makefile.am
===================================================================
RCS file: /cvsroot/gstreamer/gstreamer/gst/Makefile.am,v
retrieving revision 1.119
diff -u -r1.119 Makefile.am
--- gst/Makefile.am	27 Nov 2002 20:47:35 -0000	1.119
+++ gst/Makefile.am	28 Nov 2002 08:37:42 -0000
@@ -183,11 +183,11 @@
 distclean-local:
 	rm -f $(top_builddir)/gst/gstmarshal.c $(top_builddir)/gst/gstmarshal.h
 
-libgstreamer_la_CFLAGS = -D_GNU_SOURCE -DGST_CONFIG_DIR=\""$(GST_CONFIG_DIR)"\" \
+libgstreamer_la_CFLAGS = -D_GNU_SOURCE \
 	$(LIBGST_CFLAGS) \
-	-D_GNU_SOURCE \
 	-DG_LOG_DOMAIN=g_log_domain_gstreamer \
-	-DGST_CONFIG_DIR=\""$(GST_CONFIG_DIR)"\" 
+	-DGST_CONFIG_DIR=\""$(GST_CONFIG_DIR)"\" \
+	-DGST_CACHE_DIR=\""$(GST_CACHE_DIR)"\" 
 
 # the compiler shoots cothreads.c in the head at -O6
 libcothreads_la_CFLAGS = $(libgstreamer_la_CFLAGS) -O2 
Index: gst/gstregistry.h
===================================================================
RCS file: /cvsroot/gstreamer/gstreamer/gst/gstregistry.h,v
retrieving revision 1.7
diff -u -r1.7 gstregistry.h
--- gst/gstregistry.h	11 Aug 2002 21:00:18 -0000	1.7
+++ gst/gstregistry.h	28 Nov 2002 08:37:43 -0000
@@ -26,7 +26,7 @@
 
 #include <gst/gstplugin.h>
 
-#define GLOBAL_REGISTRY_DIR      GST_CONFIG_DIR
+#define GLOBAL_REGISTRY_DIR      GST_CACHE_DIR
 #define GLOBAL_REGISTRY_FILE     GLOBAL_REGISTRY_DIR"/registry.xml"
 #define GLOBAL_REGISTRY_FILE_TMP GLOBAL_REGISTRY_DIR"/.registry.xml.tmp"
 
Index: tools/Makefile.am
===================================================================
RCS file: /cvsroot/gstreamer/gstreamer/tools/Makefile.am,v
retrieving revision 1.36
diff -u -r1.36 Makefile.am
--- tools/Makefile.am	23 Sep 2002 06:02:17 -0000	1.36
+++ tools/Makefile.am	28 Nov 2002 08:37:43 -0000
@@ -23,29 +23,36 @@
 	gst-feedback.1
 
 gst_launch_LDADD = $(GST_LIBS) #-lefence
-gst_launch_CFLAGS = $(GST_CFLAGS) -DGST_CONFIG_DIR=\"$(GST_CONFIG_DIR)\" 
+gst_launch_CFLAGS = $(GST_CFLAGS) -DGST_CONFIG_DIR=\"$(GST_CONFIG_DIR)\" \
+	-DGST_CACHE_DIR=\""$(GST_CACHE_DIR)"\" 
 
 gst_md5sum_LDADD = $(GST_LIBS) #-lefence
-gst_md5sum_CFLAGS = $(GST_CFLAGS) -DGST_CONFIG_DIR=\"$(GST_CONFIG_DIR)\" 
+gst_md5sum_CFLAGS = $(GST_CFLAGS) -DGST_CONFIG_DIR=\"$(GST_CONFIG_DIR)\" \
+	-DGST_CACHE_DIR=\""$(GST_CACHE_DIR)"\" 
 
 if !GST_DISABLE_REGISTRY
 gst_register_LDADD = $(GST_LIBS)
-gst_register_CFLAGS = $(GST_CFLAGS) -DGST_CONFIG_DIR=\"$(GST_CONFIG_DIR)\" 
+gst_register_CFLAGS = $(GST_CFLAGS) -DGST_CONFIG_DIR=\"$(GST_CONFIG_DIR)\" \
+	-DGST_CACHE_DIR=\""$(GST_CACHE_DIR)"\" 
 endif
 
 gst_inspect_LDADD = $(GST_LIBS) ../libs/gst/control/libgstcontrol.la
-gst_inspect_CFLAGS = $(GST_CFLAGS) -DGST_CONFIG_DIR=\"$(GST_CONFIG_DIR)\" 
+gst_inspect_CFLAGS = $(GST_CFLAGS) -DGST_CONFIG_DIR=\"$(GST_CONFIG_DIR)\" \
+	-DGST_CACHE_DIR=\""$(GST_CACHE_DIR)"\" 
 
 gst_complete_LDADD = $(GST_LIBS)
-gst_complete_CFLAGS = $(GST_CFLAGS) -DGST_CONFIG_DIR=\"$(GST_CONFIG_DIR)\" 
+gst_complete_CFLAGS = $(GST_CFLAGS) -DGST_CONFIG_DIR=\"$(GST_CONFIG_DIR)\" \
+	-DGST_CACHE_DIR=\""$(GST_CACHE_DIR)"\" 
 
 if !GST_DISABLE_LOADSAVE
 gst_compprep_LDADD = $(GST_LIBS)
-gst_compprep_CFLAGS = $(GST_CFLAGS) -DGST_CONFIG_DIR=\"$(GST_CONFIG_DIR)\" 
+gst_compprep_CFLAGS = $(GST_CFLAGS) -DGST_CONFIG_DIR=\"$(GST_CONFIG_DIR)\" \
+	-DGST_CACHE_DIR=\""$(GST_CACHE_DIR)"\" 
 
 gst_xmllaunch_SOURCES = gst-launch.c
 gst_xmllaunch_LDADD = $(GST_LIBS)
-gst_xmllaunch_CFLAGS = $(GST_CFLAGS) -DGST_CONFIG_DIR=\"$(GST_CONFIG_DIR)\" 
+gst_xmllaunch_CFLAGS = $(GST_CFLAGS) -DGST_CONFIG_DIR=\"$(GST_CONFIG_DIR)\" \
+	-DGST_CACHE_DIR=\""$(GST_CACHE_DIR)"\" 
 endif
 
 EXTRA_DIST = $(man_MANS) gst-feedback
Index: tools/gst-complete.c
===================================================================
RCS file: /cvsroot/gstreamer/gstreamer/tools/gst-complete.c,v
retrieving revision 1.3
diff -u -r1.3 gst-complete.c
--- tools/gst-complete.c	20 Sep 2002 03:27:54 -0000	1.3
+++ tools/gst-complete.c	28 Nov 2002 08:37:43 -0000
@@ -81,8 +81,8 @@
 
   /***** Loading the completion information from the registry *****/
 
-  if (stat (GST_CONFIG_DIR"/compreg.xml", &stat_buf) == 0) {
-    doc = xmlParseFile (GST_CONFIG_DIR"/compreg.xml");
+  if (stat (GST_CACHE_DIR"/compreg.xml", &stat_buf) == 0) {
+    doc = xmlParseFile (GST_CACHE_DIR"/compreg.xml");
   } else {
     exit (1);
   }
Index: tools/gst-compprep.c
===================================================================
RCS file: /cvsroot/gstreamer/gstreamer/tools/gst-compprep.c,v
retrieving revision 1.10
diff -u -r1.10 gst-compprep.c
--- tools/gst-compprep.c	1 Nov 2002 22:05:28 -0000	1.10
+++ tools/gst-compprep.c	28 Nov 2002 08:37:43 -0000
@@ -99,9 +99,9 @@
   }
 
 #ifdef HAVE_LIBXML2
-  xmlSaveFormatFile(GST_CONFIG_DIR "/compreg.xml",doc,1);
+  xmlSaveFormatFile(GST_CACHE_DIR "/compreg.xml",doc,1);
 #else
-  xmlSaveFile(GST_CONFIG_DIR "/compreg.xml",doc);
+  xmlSaveFile(GST_CACHE_DIR "/compreg.xml",doc);
 #endif
 
   return 0;


More information about the gstreamer-devel mailing list