Make sure to search location of XST backends
2001-04-11 Bradford Hovinen <hovinen@ximian.com> * location.c (run_backend_proc): Make sure to search location of XST backends * Makefile.am (INCLUDES): Added XST_BACKEND_LOCATION
This commit is contained in:
parent
c366b85ccf
commit
69ff23e49b
4 changed files with 33 additions and 14 deletions
|
@ -1,5 +1,15 @@
|
|||
2001-04-11 Bradford Hovinen <hovinen@ximian.com>
|
||||
|
||||
* location.c (run_backend_proc): Make sure to search location of
|
||||
XST backends
|
||||
|
||||
* Makefile.am (INCLUDES): Added XST_BACKEND_LOCATION
|
||||
|
||||
* archive.c (archive_set_current_location_id): Don't use different
|
||||
prefixes for per-user and global locations; we are assuming here
|
||||
that the only person using this globally will be root anyway
|
||||
(archive_get_current_location_id): Ditto
|
||||
|
||||
* Makefile.am (INCLUDES): Replace obsolete hcm directory names
|
||||
with ximian-config
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@ INCLUDES = \
|
|||
-DCONFIGDIR=\""/etc"\" \
|
||||
-DLOCATION_DIR=\""$(datadir)/ximian-config/default"\" \
|
||||
-DGLADE_DIR=\""$(datadir)/ximian-config/glade"\" \
|
||||
-DXST_BACKEND_LOCATION=\""$(datadir)/ximian-setup-tools/scripts"\" \
|
||||
$(GNOME_XML_CFLAGS) \
|
||||
$(LIBGLADE_CFLAGS)
|
||||
|
||||
|
|
|
@ -436,14 +436,14 @@ archive_set_current_location_id (Archive *archive, const gchar *locid)
|
|||
archive->current_location_id = g_strdup (locid);
|
||||
|
||||
if (archive->is_global)
|
||||
gnome_config_push_prefix ("=" LOCATION_DIR "=");
|
||||
gnome_config_set_string
|
||||
("/ximian-config/config/current/global-location",
|
||||
archive->current_location_id);
|
||||
else
|
||||
gnome_config_push_prefix ("ximian-config/");
|
||||
gnome_config_set_string
|
||||
("/ximian-config/config/current/location",
|
||||
archive->current_location_id);
|
||||
|
||||
gnome_config_set_string ("config/current/location",
|
||||
archive->current_location_id);
|
||||
|
||||
gnome_config_pop_prefix ();
|
||||
gnome_config_sync ();
|
||||
}
|
||||
|
||||
|
@ -466,15 +466,13 @@ archive_get_current_location_id (Archive *archive)
|
|||
|
||||
if (archive->current_location_id == NULL) {
|
||||
if (archive->is_global)
|
||||
gnome_config_push_prefix ("=" LOCATION_DIR "=");
|
||||
archive->current_location_id =
|
||||
gnome_config_get_string_with_default
|
||||
("/ximian-config/config/current/global-location=default", &def);
|
||||
else
|
||||
gnome_config_push_prefix ("ximian-config/");
|
||||
|
||||
archive->current_location_id =
|
||||
gnome_config_get_string_with_default
|
||||
("config/current/location=default", &def);
|
||||
|
||||
gnome_config_pop_prefix ();
|
||||
archive->current_location_id =
|
||||
gnome_config_get_string_with_default
|
||||
("/ximian-config/config/current/location=default", &def);
|
||||
|
||||
/* Create default location if it does not exist */
|
||||
if (def && archive_get_location
|
||||
|
|
|
@ -1393,10 +1393,20 @@ run_backend_proc (gchar *backend_id)
|
|||
}
|
||||
else if (pid == 0) {
|
||||
int i;
|
||||
gchar *path, *path1;
|
||||
|
||||
dup2 (fd[0], 0);
|
||||
for (i = 3; i < FOPEN_MAX; i++) close (i);
|
||||
|
||||
path = g_getenv ("PATH");
|
||||
|
||||
if (!strstr (path, XST_BACKEND_LOCATION)) {
|
||||
path1 = g_strconcat (XST_BACKEND_LOCATION, ":", path,
|
||||
NULL);
|
||||
setenv ("PATH", path1, TRUE);
|
||||
g_free (path1);
|
||||
}
|
||||
|
||||
args[0] = gnome_is_program_in_path (backend_id);
|
||||
args[1] = "--set";
|
||||
args[2] = NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue