Commit de82e411 authored by Maciej Stachowiak's avatar Maciej Stachowiak

reviewed by: John Harper <jsh@eazel.com>

	             Eskil Heyn Olsen  <eskil@eazel.com>
		     Robey Pointer  <robey@eazel.com>

	Fixed bugs 7411 (installer crashes, but successfully installs),
	7510 (tinderbox installer crashes 3 lines into gnome init) and
	7123 (Installer uses a question mark on black background in
	dialogs). These were all caused by the fact that Imlib is
	completely unusable linked statically. So to fix them I removed
	all dependency on imlib and gnome-libs from the bootstrap
	installer (since so many parts of gnome-libs, including
	gnome_init, make imlib calls).

	* components/services/install/lib/eazel-install-logic2.c:
	(get_softcat_info),
	(check_conflicts_against_already_installed_packages):
	* components/services/install/lib/eazel-install-metadata.c:
	* components/services/install/lib/eazel-install-object.c:
	(eazel_install_is_dir), (eazel_install_save_transaction_report):
	* components/services/install/lib/eazel-install-problem.c:
	* components/services/install/lib/eazel-install-protocols.c:
	(eazel_install_fetch_file):
	* components/services/install/lib/eazel-install-tests.c:
	* components/services/install/lib/eazel-install-xml-package-list.c:
	(generate_xml_package_list):
	* components/services/install/lib/eazel-package-system-rpm3.c:
	* components/services/install/lib/eazel-package-system-rpm4.c:
	* components/services/install/lib/eazel-package-system-types.c:
	* components/services/install/lib/eazel-package-system-types.h:
	* components/services/install/lib/eazel-package-system.c:
	* components/services/install/lib/eazel-softcat.c:
	* components/services/trilobite/libtrilobite/Makefile.am:
	* components/services/trilobite/libtrilobite/trilobite-core-distribution.c:
	(trilobite_get_distribution):
	* components/services/trilobite/libtrilobite/trilobite-core-distribution.h:
	* components/services/trilobite/libtrilobite/trilobite-core-network-slim.c:
	* components/services/trilobite/libtrilobite/trilobite-core-network.h:
	* components/services/trilobite/libtrilobite/trilobite-core-utils.c:
	* components/services/trilobite/libtrilobite/trilobite-i18n.h:
	* nautilus-installer/install-lib/Makefile.am:
	* nautilus-installer/libtrilobite/Makefile.am:
	Avoid depending on libgnome or libgnomeui in libeazelinstall or
	libtrilobite when building in static minimal mode.

	* nautilus-installer/src/Makefile.am: Don't link against gnome
	libraries or imlib.

	* nautilus-installer/src/callbacks.c,
	nautilus-installer/src/callbacks.h,
	nautilus-installer/src/installer.c,
	nautilus-installer/src/installer.h, nautilus-installer/src/main.c
	nautilus-installer/src/gtk-hackery.c: Minor tweaks to avoid GNOME
	and Imlib dependencies.

	* nautilus-installer/src/fake-stock.h,
	nautilus-installer/src/fake-stock.c:
	(fake_stock_pixmap_new_from_xpm_data, fake_stock_pixmap_button,
	fake_stock_or_ordinary_button): Some hacky code to allow replacing
	the real stock code.

	* nautilus-installer/src/gnome-dialog-util.c,
	nautilus-installer/src/gnome-dialog-util.h,
	nautilus-installer/src/gnome-dialog.c,
	nautilus-installer/src/gnome-dialog.h,
	nautilus-installer/src/gnome-druid-page.c,
	nautilus-installer/src/gnome-druid-page.h,
	nautilus-installer/src/gnome-druid.c,
	nautilus-installer/src/gnome-druid.h,
	nautilus-installer/src/gnome-messagebox.c,
	nautilus-installer/src/gnome-messagebox.h,
	nautilus-installer/src/gnome-types.h: Replace reliance on
	gnome-stock (and therefore imlib) with fake-stock calls.

	* nautilus-installer/src/nautilus-druid-page-eazel.h,
	nautilus-installer/src/nautilus-druid-page-eazel.c: Pruned and
	massively hacked to avoid depending on the canvas, etc.

	* nautilus-installer/src/package-tree.c,
	nautilus-installer/src/nautilus-druid.c,
	nautilus-installer/src/nautilus-druid.h: Avoid GNOME and imlib
	dependencies.
parent 80e02bd9
2001-03-09 Maciej Stachowiak <mjs@eazel.com>
reviewed by: John Harper <jsh@eazel.com>
Eskil Heyn Olsen <eskil@eazel.com>
Robey Pointer <robey@eazel.com>
Fixed bugs 7411 (installer crashes, but successfully installs),
7510 (tinderbox installer crashes 3 lines into gnome init) and
7123 (Installer uses a question mark on black background in
dialogs). These were all caused by the fact that Imlib is
completely unusable linked statically. So to fix them I removed
all dependency on imlib and gnome-libs from the bootstrap
installer (since so many parts of gnome-libs, including
gnome_init, make imlib calls).
* components/services/install/lib/eazel-install-logic2.c:
(get_softcat_info),
(check_conflicts_against_already_installed_packages):
* components/services/install/lib/eazel-install-metadata.c:
* components/services/install/lib/eazel-install-object.c:
(eazel_install_is_dir), (eazel_install_save_transaction_report):
* components/services/install/lib/eazel-install-problem.c:
* components/services/install/lib/eazel-install-protocols.c:
(eazel_install_fetch_file):
* components/services/install/lib/eazel-install-tests.c:
* components/services/install/lib/eazel-install-xml-package-list.c:
(generate_xml_package_list):
* components/services/install/lib/eazel-package-system-rpm3.c:
* components/services/install/lib/eazel-package-system-rpm4.c:
* components/services/install/lib/eazel-package-system-types.c:
* components/services/install/lib/eazel-package-system-types.h:
* components/services/install/lib/eazel-package-system.c:
* components/services/install/lib/eazel-softcat.c:
* components/services/trilobite/libtrilobite/Makefile.am:
* components/services/trilobite/libtrilobite/trilobite-core-distribution.c:
(trilobite_get_distribution):
* components/services/trilobite/libtrilobite/trilobite-core-distribution.h:
* components/services/trilobite/libtrilobite/trilobite-core-network-slim.c:
* components/services/trilobite/libtrilobite/trilobite-core-network.h:
* components/services/trilobite/libtrilobite/trilobite-core-utils.c:
* components/services/trilobite/libtrilobite/trilobite-i18n.h:
* nautilus-installer/install-lib/Makefile.am:
* nautilus-installer/libtrilobite/Makefile.am:
Avoid depending on libgnome or libgnomeui in libeazelinstall or
libtrilobite when building in static minimal mode.
* nautilus-installer/src/Makefile.am: Don't link against gnome
libraries or imlib.
* nautilus-installer/src/callbacks.c,
nautilus-installer/src/callbacks.h,
nautilus-installer/src/installer.c,
nautilus-installer/src/installer.h, nautilus-installer/src/main.c
nautilus-installer/src/gtk-hackery.c: Minor tweaks to avoid GNOME
and Imlib dependencies.
* nautilus-installer/src/fake-stock.h,
nautilus-installer/src/fake-stock.c:
(fake_stock_pixmap_new_from_xpm_data, fake_stock_pixmap_button,
fake_stock_or_ordinary_button): Some hacky code to allow replacing
the real stock code.
* nautilus-installer/src/gnome-dialog-util.c,
nautilus-installer/src/gnome-dialog-util.h,
nautilus-installer/src/gnome-dialog.c,
nautilus-installer/src/gnome-dialog.h,
nautilus-installer/src/gnome-druid-page.c,
nautilus-installer/src/gnome-druid-page.h,
nautilus-installer/src/gnome-druid.c,
nautilus-installer/src/gnome-druid.h,
nautilus-installer/src/gnome-messagebox.c,
nautilus-installer/src/gnome-messagebox.h,
nautilus-installer/src/gnome-types.h: Replace reliance on
gnome-stock (and therefore imlib) with fake-stock calls.
* nautilus-installer/src/nautilus-druid-page-eazel.h,
nautilus-installer/src/nautilus-druid-page-eazel.c: Pruned and
massively hacked to avoid depending on the canvas, etc.
* nautilus-installer/src/package-tree.c,
nautilus-installer/src/nautilus-druid.c,
nautilus-installer/src/nautilus-druid.h: Avoid GNOME and imlib
dependencies.
2001-03-10 Mike Fleming <mfleming@eazel.com>
reviewed by: <rslomkow@eazel.com>
......
NULL =
INCLUDES = \
-DPREFIX=\"$(prefix)\" \
-DG_LOG_DOMAIN=\"Nautilus-service-install\" \
-I$(top_srcdir) \
-I$(top_srcdir)/components/services/install/lib \
-I$(top_srcdir)/components/services/trilobite \
-I$(top_srcdir)/components/services/trilobite/libtrilobite \
-I$(top_builddir)/components/services/install/lib \
-I$(top_builddir)/components/services/trilobite \
-I$(top_builddir)/components/services/trilobite/libtrilobite \
INCLUDES = \
-DPREFIX=\"$(prefix)\" \
-DG_LOG_DOMAIN=\"Nautilus-service-install\" \
-I$(top_srcdir) \
-I$(top_srcdir)/components/services/install/lib \
-I$(top_srcdir)/components/services/trilobite \
-I$(top_srcdir)/components/services/trilobite/libtrilobite \
-I$(top_builddir)/components/services/install/lib \
-I$(top_builddir)/components/services/trilobite \
-I$(top_builddir)/components/services/trilobite/libtrilobite \
-I$(top_srcdir)/components/services/nautilus-dependent-shared \
-I$(top_builddir)/components/services/install/lib \
-I$(top_builddir)/components/services/inventory/ \
-I$(top_builddir) \
$(GCONF_CFLAGS) \
-DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
$(GNOMEUI_CFLAGS) \
$(VFS_CFLAGS) \
-I$(top_builddir)/components/services/install/lib \
-I$(top_builddir)/components/services/inventory/ \
-I$(top_builddir) \
$(GCONF_CFLAGS) \
-DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
$(GNOMEUI_CFLAGS) \
$(VFS_CFLAGS) \
$(XML_CFLAGS) \
$(NULL)
bin_PROGRAMS = nautilus-service-install-view
......@@ -35,21 +36,21 @@ nautilus_service_install_view_SOURCES = \
forms.c \
$(NULL)
nautilus_service_install_view_LDADD = \
$(top_builddir)/libnautilus/libnautilus.la \
$(top_builddir)/libnautilus-extensions/libnautilus-extensions.la \
$(top_builddir)/components/services/install/lib/libeazelinstall.la \
$(top_builddir)/components/services/install/lib/libeazelpackagesystem.la \
$(top_builddir)/components/services/trilobite/libtrilobite/libtrilobite.la \
$(top_builddir)/components/services/nautilus-dependent-shared/libnautilusdepshared.a \
$(top_builddir)/components/services/inventory/libtrilobite-inventory-service.la \
$(BONOBO_LIBS) \
$(GCONF_LIBS) \
$(GNOMEUI_LIBS) \
$(OAF_LIBS) \
$(AMMONITE_LIBS) \
$(VFS_LIBS) \
$(RPM_LIBS) \
nautilus_service_install_view_LDADD = \
$(top_builddir)/libnautilus/libnautilus.la \
$(top_builddir)/libnautilus-extensions/libnautilus-extensions.la \
$(top_builddir)/components/services/install/lib/libeazelinstall.la \
$(top_builddir)/components/services/install/lib/libeazelpackagesystem.la \
$(top_builddir)/components/services/trilobite/libtrilobite/libtrilobite.la \
$(top_builddir)/components/services/nautilus-dependent-shared/libnautilusdepshared.a \
$(top_builddir)/components/services/inventory/libtrilobite-inventory-service.la \
$(BONOBO_LIBS) \
$(GCONF_LIBS) \
$(GNOMEUI_LIBS) \
$(OAF_LIBS) \
$(AMMONITE_LIBS) \
$(VFS_LIBS) \
$(RPM_LIBS) \
$(NULL)
oafdir = $(datadir)/oaf
......
......@@ -33,10 +33,13 @@
#ifndef EAZEL_INSTALL_NO_CORBA
#include <libtrilobite/libtrilobite.h>
#else
#include <libtrilobite/libtrilobite-service.h>
#include <libtrilobite/trilobite-root-helper.h>
#include <libtrilobite/trilobite-i18n.h>
#endif
#include <glib.h>
#include <string.h>
/*
0x1 enables post check_dependencies treedumps
0x2 enables post dedupe tree dumps
......@@ -678,8 +681,8 @@ get_softcat_info (EazelInstall *service,
} else {
if ((*package)->filename) {
/* Package already has a filename, load info from disk */
if (g_file_test ((*package)->filename, G_FILE_TEST_ISFILE) &&
access ((*package)->filename, R_OK)==0) {
if (access ((*package)->filename, F_OK) == 0&&
access ((*package)->filename, R_OK) == 0) {
PackageData *loaded_package;
#if EI2_DEBUG & 0x4
trilobite_debug ("%p %s load from disk", *package, (*package)->name);
......@@ -2145,7 +2148,7 @@ check_conflicts_against_already_installed_packages (EazelInstall *service,
filename = (char *)(iter_file->data);
/* If the file isn't on the system, no need to check for conflicts */
if (g_file_test (filename, G_FILE_TEST_ISFILE) == 0) {
if (access (filename, F_OK) != 0) {
continue;
}
......
......@@ -28,15 +28,18 @@
*/
#include <config.h>
#include <libtrilobite/libtrilobite.h>
#include "eazel-install-metadata.h"
#include "trilobite-i18n.h"
#ifndef EAZEL_INSTALL_SLIM
#include <gconf/gconf.h>
#include <gconf/gconf-engine.h>
static GConfEngine *conf_engine = NULL;
#endif /* EAZEL_INSTALL_SLIM */
#include <string.h>
#define INSTALL_GCONF_PATH "/apps/eazel-trilobite/install"
#define DEFAULT_SERVER "services.eazel.com"
......
......@@ -23,9 +23,10 @@
#include <config.h>
#include <errno.h>
#include <gnome.h>
#include <gnome-xml/parser.h>
#include <gtk/gtksignal.h>
#include "eazel-install-public.h"
#include "eazel-install-private.h"
#include "eazel-install-query.h"
......@@ -43,6 +44,7 @@
#include "eazel-install-corba-types.h"
#else
#include <libtrilobite/trilobite-core-utils.h>
#include <libtrilobite/trilobite-i18n.h>
#endif /* EAZEL_INSTALL_NO_CORBA */
#include "eazel-install-metadata.h"
......@@ -54,6 +56,8 @@
#include <unistd.h>
#include <pwd.h>
#include <dirent.h>
#include <string.h>
#include <time.h>
enum {
FILE_CONFLICT_CHECK,
......@@ -1366,6 +1370,18 @@ eazel_install_do_transaction_save_report_helper (xmlNodePtr node,
}
}
static gboolean
eazel_install_is_dir (const char *path)
{
struct stat statbuf;
stat (path, &statbuf);
return S_ISDIR (statbuf.st_mode);
}
void
eazel_install_save_transaction_report (EazelInstall *service)
{
......@@ -1379,7 +1395,7 @@ eazel_install_save_transaction_report (EazelInstall *service)
}
/* Ensure the transaction dir is present */
if (! g_file_test (eazel_install_get_transaction_dir (service), G_FILE_TEST_ISDIR)) {
if (! eazel_install_is_dir (eazel_install_get_transaction_dir (service))) {
int retval;
retval = mkdir (eazel_install_get_transaction_dir (service), 0755);
if (retval < 0) {
......@@ -1399,7 +1415,7 @@ eazel_install_save_transaction_report (EazelInstall *service)
/* Make a unique name */
name = g_strdup_printf ("%s/transaction.%lu", eazel_install_get_transaction_dir (service),
(unsigned long) time (NULL));
while (g_file_test (name, G_FILE_TEST_ISFILE)) {
while (!access (name, F_OK)) {
g_free (name);
sleep (1);
name = g_strdup_printf ("%s/transaction.%lu",
......
......@@ -24,6 +24,10 @@
#include <eazel-install-problem.h>
#include <libtrilobite/trilobite-i18n.h>
#include <string.h>
static GtkObjectClass *eazel_install_problem_parent_class;
#define ASSERT_SANITY(s) g_assert (s!=NULL); \
......
......@@ -28,21 +28,27 @@
* file and install a services generated package-list.xml.
*/
#include <config.h>
#include "eazel-install-protocols.h"
#include "eazel-install-private.h"
#include "eazel-softcat.h"
#include "eazel-package-system.h"
#include <libtrilobite/trilobite-core-utils.h>
#include <libtrilobite/trilobite-i18n.h>
#include <ghttp.h>
#include <config.h>
#include <glib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include <string.h>
#include "eazel-package-system.h"
#undef EIP_FAIL_ALL_DOWNLOADS
#include <libtrilobite/trilobite-core-utils.h>
#ifndef EAZEL_INSTALL_SLIM
#include <libgnomevfs/gnome-vfs.h>
......@@ -549,7 +555,7 @@ eazel_install_fetch_file (EazelInstall *service,
for (iter = g_list_first (service->private->local_repositories); iter != NULL; iter = g_list_next (iter)) {
filename = g_strdup_printf ("%s/%s", (char *)(iter->data), g_basename (target_file));
if (g_file_test (filename, G_FILE_TEST_ISFILE)) {
if (!access (filename, F_OK)) {
/* copy this file to target_file */
trilobite_debug ("%s found at %s, copying", file_to_report, filename);
my_copy_file (filename, target_file);
......@@ -557,7 +563,7 @@ eazel_install_fetch_file (EazelInstall *service,
g_free (filename);
}
if (g_file_test (target_file, G_FILE_TEST_ISFILE)) {
if (!access (target_file, F_OK)) {
/* File is already present, so just emit to progress callbacks and get on with
your life */
struct stat buf;
......
......@@ -25,8 +25,9 @@
* file and install a services generated package-list.xml.
*/
#include "eazel-install-tests.h"
#include <config.h>
#include "eazel-install-tests.h"
#include <gnome.h>
void
dump_package_list (PackageData* pkg) {
......
......@@ -35,8 +35,11 @@
#include <libtrilobite/trilobite-core-utils.h>
#include <libtrilobite/trilobite-core-network.h>
#include <libtrilobite/trilobite-i18n.h>
#include <gnome-xml/parser.h>
#include <gnome-xml/xmlmemory.h>
#include <glib.h>
#include <string.h>
static PackageData* parse_package (xmlNode* package, gboolean set_toplevel);
static CategoryData* parse_category (xmlNode* cat);
......@@ -471,7 +474,7 @@ generate_xml_package_list (const char* pkg_template_file,
/* Check for existing file and if, rename, trying to find a .x
extension (x being a number) that isn't taken */
if (g_file_exists (target_file)) {
if (!access (target_file, F_OK)) {
char *new_name;
int c;
c = 0;
......@@ -480,7 +483,7 @@ generate_xml_package_list (const char* pkg_template_file,
g_free (new_name);
c++;
new_name = g_strdup_printf ("%s.%d", target_file, c);
} while (g_file_exists (new_name));
} while (!access (new_name, F_OK));
rename (target_file, new_name);
g_free (new_name);
}
......
......@@ -56,12 +56,16 @@
#error Unknown DB system
#endif
#include <gnome.h>
#include <locale.h>
#include "eazel-package-system-rpm3-private.h"
#include "eazel-package-system-private.h"
#include <libtrilobite/trilobite-core-utils.h>
#include <libtrilobite/trilobite-root-helper.h>
#include <libtrilobite/trilobite-i18n.h>
#include <gtk/gtkmain.h>
#include <string.h>
#include <rpm/rpmlib.h>
#include <rpm/rpmmacro.h>
#include <rpm/misc.h>
......@@ -71,9 +75,6 @@
#include <sys/stat.h>
#include <fcntl.h>
#include <locale.h>
#include <libtrilobite/trilobite-root-helper.h>
#define DEFAULT_DB_PATH "/var/lib/rpm"
#define DEFAULT_ROOT "/"
......
......@@ -26,20 +26,19 @@
#ifdef HAVE_RPM
#ifdef HAVE_RPM_40
#include <gnome.h>
#include "eazel-package-system-rpm3-private.h"
#include "eazel-package-system-rpm4.h"
#include "eazel-package-system-private.h"
#include <libtrilobite/trilobite-core-utils.h>
#include <libtrilobite/trilobite-root-helper.h>
#include <rpm/rpmlib.h>
#include <ctype.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <libtrilobite/trilobite-root-helper.h>
#include <string.h>
#define DEFAULT_DB_PATH "/var/lib/rpm"
#define DEFAULT_ROOT "/"
......
......@@ -29,14 +29,15 @@
#include <config.h>
#include "eazel-package-system-types.h"
#include "eazel-softcat.h" /* for softcat sense flags */
#include <libtrilobite/trilobite-core-utils.h>
#include <rpm/rpmlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <string.h>
#include <libtrilobite/trilobite-core-utils.h>
#undef DEBUG_PACKAGE_ALLOCS
......
......@@ -30,7 +30,7 @@
#ifndef EAZEL_PACKAGE_SYSTEM_TYPES_H
#define EAZEL_PACKAGE_SYSTEM_TYPES_H
#include <gnome.h>
#include <gtk/gtkobject.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
......
......@@ -22,12 +22,13 @@
*/
#include <config.h>
#include <gnome.h>
#include <gmodule.h>
#include "eazel-package-system-private.h"
#include <libtrilobite/trilobite-core-distribution.h>
#include <libtrilobite/trilobite-core-utils.h>
#include <libtrilobite/trilobite-md5-tools.h>
#include <gtk/gtksignal.h>
#include <gmodule.h>
#undef EPS_DEBUG
......
......@@ -33,6 +33,8 @@
#include <libgnomevfs/gnome-vfs.h>
#endif /* EAZEL_INSTALL_SLIM */
#include <string.h>
/* This is the parent class pointer */
static GtkObjectClass *eazel_softcat_parent_class;
......
......@@ -15,6 +15,7 @@ INCLUDES = \
$(GCONF_CFLAGS) \
-DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
$(VFS_CFLAGS) \
$(XML_CFLAGS) \
$(NULL)
bin_PROGRAMS = \
......
......@@ -20,6 +20,7 @@ INCLUDES = \
$(GCONF_CFLAGS) \
-DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
$(VFS_CFLAGS) \
$(XML_CFLAGS) \
$(NULL)
uidir = $(datadir)/gnome/ui
......
......@@ -2,21 +2,21 @@ NULL =
lib_LTLIBRARIES = libtrilobite.la libtrilobite-service.la
INCLUDES = \
-DPREFIX=\"$(prefix)\" \
-DG_LOG_DOMAIN=\"libtrilobite\" \
-DSTANDALONE \
-DTRILOBITE_VERSION=\"0.3.0\" \
-I$(srcdir) \
-I. \
-I$(top_srcdir) \
-I$(top_builddir) \
-I$(top_srcdir)/components/services/trilobite/libtrilobite \
$(GNOME_CFLAGS) \
$(GCONF_CFLAGS) \
$(OAF_CFLAGS) \
$(XML_CFLAGS) \
$(VFS_CFLAGS) \
INCLUDES = \
-DPREFIX=\"$(prefix)\" \
-DG_LOG_DOMAIN=\"libtrilobite\" \
-DSTANDALONE \
-DTRILOBITE_VERSION=\"0.3.0\" \
-I$(srcdir) \
-I. \
-I$(top_srcdir) \
-I$(top_builddir) \
-I$(top_srcdir)/components/services/trilobite/libtrilobite \
$(GNOME_CFLAGS) \
$(GCONF_CFLAGS) \
$(OAF_CFLAGS) \
$(XML_CFLAGS) \
$(VFS_CFLAGS) \
$(NULL)
libtrilobite_la_LDFLAGS = \
......@@ -54,6 +54,7 @@ libtrilobiteinclude_HEADERS = \
trilobite-core-network.h \
trilobite-core-utils.h \
trilobite-file-utilities.h \
trilobite-i18n.h \
trilobite-root-helper.h \
trilobite-root-client-public.h \
trilobite-redirect.h \
......
......@@ -244,37 +244,37 @@ trilobite_get_distribution ()
distinfo.version_major = -1;
distinfo.version_minor = -1;
/* Check for TurboLinux */
if (g_file_exists ("/etc/turbolinux-release")) {
if (!access ("/etc/turbolinux-release", F_OK)) {
distinfo.name = DISTRO_TURBOLINUX;
determine_turbolinux_version (&distinfo);
}
/* Check for Mandrake */
else if (g_file_exists ("/etc/mandrake-release")) {
else if (!access ("/etc/mandrake-release", F_OK)) {
distinfo.name = DISTRO_MANDRAKE;
determine_mandrake_version (&distinfo);
}
/* Check for SuSE */
else if (g_file_exists ("/etc/SuSE-release")) {
else if (!access ("/etc/SuSE-release", F_OK)) {
distinfo.name = DISTRO_SUSE;
determine_suse_version (&distinfo);
}
/* Check for Corel */
else if (g_file_exists ("/etc/environment.corel")) {
else if (!access ("/etc/environment.corel", F_OK)) {
distinfo.name = DISTRO_COREL;
}
/* Check for Debian */
else if (g_file_exists ("/etc/debian_version")) {
else if (!access ("/etc/debian_version", F_OK)) {
distinfo.name = DISTRO_DEBIAN;
determine_debian_version (&distinfo);
}
/* Check for Caldera */
else if (g_file_exists ("/etc/coas")) {
else if (!access ("/etc/coas", F_OK)) {
distinfo.name = DISTRO_CALDERA;
}
/* Check for Red Hat/LinuxPPC */
/* This has to be checked last because many of the Red Hat knockoff
distros keep /etc/redhat-release around. */
else if (g_file_exists ("/etc/redhat-release")) {
else if (!access ("/etc/redhat-release", F_OK)) {
distinfo.name = DISTRO_REDHAT;
determine_redhat_version (&distinfo);
}
......
......@@ -23,9 +23,7 @@
#ifndef EAZEL_SERVICES_DISTRIBUTION_H
#define EAZEL_SERVICES_DISTRIBUTION_H
#include <gnome.h>
#include <stdio.h>
#include <stdlib.h>
#include <glib.h>
typedef struct _DistributionInfo DistributionInfo;
typedef enum _DistributionName DistributionName;
......
......@@ -29,14 +29,17 @@
#include <config.h>
#endif
#include "trilobite-core-network.h"
#include "trilobite-core-utils.h"
#include <ghttp.h>
#include <glib.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <ghttp.h>
#include <gnome.h>
#include "trilobite-core-utils.h"
#include "trilobite-core-network.h"
#include "trilobite-i18n.h"
/* function for lazy bastards who can't be bothered to figure out the format of the xml they're parsing:
* it checks for a property with the name, and then if there isn't one, then it tries to find a child
......
......@@ -26,8 +26,8 @@
#ifndef TRILOBITE_CORE_NETWORK_H
#define TRILOBITE_CORE_NETWORK_H
#include <gnome-xml/parser.h>
#include <gnome-xml/xmlmemory.h>
#include <parser.h>
#include <xmlmemory.h>
#include <glib.h>
char *trilobite_xml_get_string (xmlNode *node, const char *name);
......
......@@ -34,12 +34,13 @@
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <gnome.h>
#include "trilobite-core-utils.h"
#include "trilobite-core-messaging.h"
#ifndef TRILOBITE_SLIM
#include <gnome.h>
#include <liboaf/liboaf.h>
#include <bonobo.h>
#endif /* TRILOBITE_SLIM */
......@@ -155,6 +156,7 @@ trilobite_get_popt_context (void)
return trilobite_popt;
}
#ifndef TRILOBITE_SLIM
/* trilobite_init
*
* This does all of the initialization needed for command-line utilities or
......@@ -222,6 +224,7 @@ trilobite_init (const char *service_name, const char *version_name, const char *
fail:
return FALSE;
}
#endif
static GList *loop_list = NULL;
......
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
/*
* Copyright (C) 2001 Eazel, Inc
*