summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEskil Heyn Olsen <eskil@src.gnome.org>2000-06-02 10:10:12 +0000
committerEskil Heyn Olsen <eskil@src.gnome.org>2000-06-02 10:10:12 +0000
commit11ea07b34274ec197c1722f9fa09569ee0b77357 (patch)
treeaea5685ad19926c6279227ddd88be1afcb23c99f
parent5bcb019f4b9fa08c928cc9ee162a7edc45994a56 (diff)
downloadnautilus-11ea07b34274ec197c1722f9fa09569ee0b77357.tar.gz
Docs with my scetches on how to redo the rpm-glue to make
* components/services/docs/installer-dep-check: Docs with my scetches on how to redo the rpm-glue to make eazel-install-lib autofetch deps. * components/services/install/command-line/eazel-alt-install.c: (eazel_download_progress): Borked, but compiles again. Will update when libinstall stabilizes. * components/services/install/lib/eazel-install-object.c: (gtk_marshal_NONE__POINTER_ENUM_POINTER), (eazel_install_class_initialize), (eazel_install_emit_download_failed), (eazel_install_emit_install_failed), (eazel_install_emit_uninstall_failed): Revamped the install_failed signal to take a PackageData object instead of char * name. * components/services/install/lib/eazel-install-protocols.c: (http_fetch_remote_file): * components/services/install/lib/eazel-install-public.h: * components/services/install/lib/eazel-install-rpm-glue.c: (install_new_packages), (download_a_package), (download_all_packages), (install_all_packages), (uninstall_packages), (uninstall_a_package), (build_packagedata_list_from_deps), (do_rpm_install), (do_rpm_uninstall), (ensure_deps_are_fetched): * components/services/install/lib/eazel-install-types.c: (categorydata_destroy_foreach), (categorydata_destroy), (packagedata_new_from_rpm_header), (packagedata_destroy_foreach), (packagedata_destroy): * components/services/install/lib/eazel-install-types.h: Doing a lot of hacking to prepare for the autofetch stuff. * nautilus-installer/src/prescript: * nautilus-installer/src/HACKING: * nautilus-installer/src/Makefile: * nautilus-installer/src/Makefile.am: * nautilus-installer/src/callbacks.c: (druid_cancel), (begin_install), (druid_finish), (prep_install), (set_images): * nautilus-installer/src/installer.c: (append_string_to_window_list), (download_failed), (install_failed_foreach), (requeue), (install_failed), (gen_report), (installer): * nautilus-installer/src/link.sh: * nautilus-installer/src/main.c: Hacking in the installer. This one is borked sine I'm trying to figure out the right scheme of reported dep fails. Actually, I want the lib to autofetch deps by option, instead of failing them Also added stuff to link.sh, so it builds static from scratch, strips gzips and adds prescript to the gzexe file. So if you build using link.sh, you get a 644 binary which when executed using sh ./nautilus-installer prompts for root password and does the magic. Easier for newbies. * components/services/time/idl/Makefile.am: * components/services/install/idl//Makefile.am: * components/services/time/Makefile.am: * components/services/install/Makefile.am: * components/services/install/lib/Makefile.am: * components/services/time/service/Makefile.am: * components/services/trilobite/idl/Makefile.am: * components/services/trilobite/libtrilobite/Makefile.am: * components/services/trilobite/sample/service/Makefile.am: * configure.in: * nautilus.spec.in: * po/POTFILES.in: * src/Makefile.am: Loads of makefile fixing to make make dist and rpm -ta work.
-rw-r--r--ChangeLog71
-rw-r--r--components/services/docs/installer-dep-check44
-rw-r--r--components/services/install/Makefile.am2
-rw-r--r--components/services/install/command-line/eazel-alt-install.c10
-rw-r--r--components/services/install/idl/Makefile.am5
-rw-r--r--components/services/install/lib/Makefile.am6
-rw-r--r--components/services/install/lib/eazel-install-object.c49
-rw-r--r--components/services/install/lib/eazel-install-protocols.c1
-rw-r--r--components/services/install/lib/eazel-install-public.h23
-rw-r--r--components/services/install/lib/eazel-install-rpm-glue.c169
-rw-r--r--components/services/install/lib/eazel-install-types.c97
-rw-r--r--components/services/install/lib/eazel-install-types.h18
-rw-r--r--components/services/time/Makefile.am2
-rw-r--r--components/services/time/idl/Makefile.am6
-rw-r--r--components/services/time/service/Makefile.am2
-rw-r--r--components/services/trilobite/idl/Makefile.am8
-rw-r--r--components/services/trilobite/libtrilobite/Makefile.am1
-rw-r--r--components/services/trilobite/sample/service/Makefile.am1
-rw-r--r--configure.in2
-rw-r--r--nautilus-installer/src/HACKING15
-rw-r--r--nautilus-installer/src/Makefile4
-rw-r--r--nautilus-installer/src/Makefile.am5
-rw-r--r--nautilus-installer/src/callbacks.c6
-rw-r--r--nautilus-installer/src/installer.c55
-rwxr-xr-xnautilus-installer/src/link.sh20
-rw-r--r--nautilus-installer/src/main.c2
-rw-r--r--nautilus-installer/src/prescript14
-rw-r--r--nautilus.spec.in18
-rw-r--r--po/POTFILES.in1
-rw-r--r--src/Makefile.am2
30 files changed, 560 insertions, 99 deletions
diff --git a/ChangeLog b/ChangeLog
index f5d2e29d5..98adf33d1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,74 @@
+2000-06-02 Eskil Heyn Olsen <eskil@eazel.com>
+
+ * components/services/docs/installer-dep-check:
+ Docs with my scetches on how to redo the rpm-glue to make
+ eazel-install-lib autofetch deps.
+
+ * components/services/install/command-line/eazel-alt-install.c:
+ (eazel_download_progress):
+ Borked, but compiles again. Will update when libinstall stabilizes.
+
+ * components/services/install/lib/eazel-install-object.c:
+ (gtk_marshal_NONE__POINTER_ENUM_POINTER),
+ (eazel_install_class_initialize),
+ (eazel_install_emit_download_failed),
+ (eazel_install_emit_install_failed),
+ (eazel_install_emit_uninstall_failed):
+ Revamped the install_failed signal to take a PackageData object
+ instead of char * name.
+
+ * components/services/install/lib/eazel-install-protocols.c:
+ (http_fetch_remote_file):
+ * components/services/install/lib/eazel-install-public.h:
+ * components/services/install/lib/eazel-install-rpm-glue.c:
+ (install_new_packages), (download_a_package),
+ (download_all_packages), (install_all_packages),
+ (uninstall_packages), (uninstall_a_package),
+ (build_packagedata_list_from_deps), (do_rpm_install),
+ (do_rpm_uninstall), (ensure_deps_are_fetched):
+ * components/services/install/lib/eazel-install-types.c:
+ (categorydata_destroy_foreach), (categorydata_destroy),
+ (packagedata_new_from_rpm_header), (packagedata_destroy_foreach),
+ (packagedata_destroy):
+ * components/services/install/lib/eazel-install-types.h:
+ Doing a lot of hacking to prepare for the autofetch stuff.
+
+ * nautilus-installer/src/prescript:
+ * nautilus-installer/src/HACKING:
+ * nautilus-installer/src/Makefile:
+ * nautilus-installer/src/Makefile.am:
+ * nautilus-installer/src/callbacks.c: (druid_cancel),
+ (begin_install), (druid_finish), (prep_install), (set_images):
+ * nautilus-installer/src/installer.c:
+ (append_string_to_window_list), (download_failed),
+ (install_failed_foreach), (requeue), (install_failed),
+ (gen_report), (installer):
+ * nautilus-installer/src/link.sh:
+ * nautilus-installer/src/main.c:
+ Hacking in the installer. This one is borked sine I'm trying to
+ figure out the right scheme of reported dep fails. Actually, I
+ want the lib to autofetch deps by option, instead of failing them
+ Also added stuff to link.sh, so it builds static from scratch,
+ strips gzips and adds prescript to the gzexe file. So if you build
+ using link.sh, you get a 644 binary which when executed using
+ sh ./nautilus-installer prompts for root password and does the
+ magic. Easier for newbies.
+
+ * components/services/time/idl/Makefile.am:
+ * components/services/install/idl//Makefile.am:
+ * components/services/time/Makefile.am:
+ * components/services/install/Makefile.am:
+ * components/services/install/lib/Makefile.am:
+ * components/services/time/service/Makefile.am:
+ * components/services/trilobite/idl/Makefile.am:
+ * components/services/trilobite/libtrilobite/Makefile.am:
+ * components/services/trilobite/sample/service/Makefile.am:
+ * configure.in:
+ * nautilus.spec.in:
+ * po/POTFILES.in:
+ * src/Makefile.am:
+ Loads of makefile fixing to make make dist and rpm -ta work.
+
2000-06-02 Maciej Stachowiak <mjs@eazel.com>
* libnautilus-extensions/nautilus-mime-actions.c: Moved static
diff --git a/components/services/docs/installer-dep-check b/components/services/docs/installer-dep-check
new file mode 100644
index 000000000..c9c13a6fe
--- /dev/null
+++ b/components/services/docs/installer-dep-check
@@ -0,0 +1,44 @@
+rpm_install (GList filenames)
+ |
+ |- while ( (state = ensure_deps (&filenames, &out_files)) == rerun) {
+ | | merge filenames with outfiles
+ | | free outfiles
+ | | }
+ | |
+ | |- add files to TransactionSet
+ | |- dep order
+ | |- dep_check
+ | if ok
+ | |- free stuff, and return ok
+ | if fail
+ | |- free stuff
+ | |- loop dep_conflicts {
+ | | |- call state = fetch_packages (dep_conflicts[x])
+ | | | |- http_fetch or such, dep on topts
+ | | |- if (state == no_matching)
+ | | | |- emit signal install_failed (package, DEP_FAIL)
+ | | | |- remove from filenames
+ | | |- if (state == ok)
+ | | |- add conflicts to out_files
+ | |- return rerun
+ |
+ |- do_rpm_install (filenames)
+ |- read headers
+ | if (source)
+ | |- emit signal install_failed (package, DEP_SRC_NO_SUPPORTED)
+ |
+ |- add to set
+ |- run transaction set
+
+
+bool ensure_deps (service, GList **filenames, GList **output_files) {
+}
+
+bool rpm_install (service, GList *filenames) {
+}
+
+bool fetch_deps (service, struct DepConflicts, int num_conflicts) {
+}
+
+bool do_rpm_install (service, GList filename) {
+}
diff --git a/components/services/install/Makefile.am b/components/services/install/Makefile.am
index da064b362..1244f3375 100644
--- a/components/services/install/Makefile.am
+++ b/components/services/install/Makefile.am
@@ -1,2 +1,2 @@
-SUBDIRS = lib command-line
+SUBDIRS = lib command-line idl
diff --git a/components/services/install/command-line/eazel-alt-install.c b/components/services/install/command-line/eazel-alt-install.c
index 493657948..fec863bbd 100644
--- a/components/services/install/command-line/eazel-alt-install.c
+++ b/components/services/install/command-line/eazel-alt-install.c
@@ -122,16 +122,6 @@ eazel_download_progress (EazelInstall *service,
if (amount == total) {
fprintf (stdout, "\n");
}
-
-/*
- fprintf (stdout, "Progress - %% %f\r", ((float)
- curStat.bytes_total ? ((float) ((((float)
- curStat.bytes_read) / (float) curStat.bytes_total)
- * 100 )) : 100.0));
- fflush (stdout);
- if ((float) curStat.bytes_read == (float) curStat.bytes_total) { fprintf (stdout, "\n");
- }
-*/
}
diff --git a/components/services/install/idl/Makefile.am b/components/services/install/idl/Makefile.am
new file mode 100644
index 000000000..4dffb8ca3
--- /dev/null
+++ b/components/services/install/idl/Makefile.am
@@ -0,0 +1,5 @@
+idldir = ${prefix}/idl
+idl_DATA = trilobite-eazel-install.idl
+
+EXTRA_DIST=\
+ $(idl_DATA)
diff --git a/components/services/install/lib/Makefile.am b/components/services/install/lib/Makefile.am
index 89cdeb8dc..ea3d26171 100644
--- a/components/services/install/lib/Makefile.am
+++ b/components/services/install/lib/Makefile.am
@@ -23,6 +23,7 @@ noinst_LIBRARIES = libinstall.a libinstall_corba.a
libinstall_a_SOURCES = \
eazel-install-types.h \
+ eazel-install-types.c \
eazel-install-metadata.h \
eazel-install-metadata.c \
eazel-install-protocols.h \
@@ -35,6 +36,8 @@ libinstall_a_SOURCES = \
eazel-install-xml-package-list.h \
eazel-install-xml-package-list.c \
eazel-install-object.c \
+ eazel-install-public.h \
+ eazel-install-private.h \
$(NULL)
## CORBA magic
@@ -63,3 +66,6 @@ CLEANFILES+=$(CORBA_GENERATED) trilobite-eazel-install.h
libinstall_corba_a_SOURCES = \
$(CORBA_GENERATED) \
$(NULL)
+
+EXTRA_DIST = \
+ $(oaf_DATA)
diff --git a/components/services/install/lib/eazel-install-object.c b/components/services/install/lib/eazel-install-object.c
index b70699532..0421bafd1 100644
--- a/components/services/install/lib/eazel-install-object.c
+++ b/components/services/install/lib/eazel-install-object.c
@@ -203,6 +203,26 @@ eazel_install_set_arg (GtkObject *object,
}
}
+typedef gint (*GtkSignal_NONE__POINTER_ENUM_POINTER) (GtkObject * object,
+ gpointer arg1,
+ gint arg2,
+ gpointer arg3,
+ gpointer user_data);
+static void
+gtk_marshal_NONE__POINTER_ENUM_POINTER (GtkObject * object,
+ GtkSignalFunc func,
+ gpointer func_data,
+ GtkArg * args)
+{
+ GtkSignal_NONE__POINTER_ENUM_POINTER rfunc;
+ rfunc = (GtkSignal_NONE__POINTER_ENUM_POINTER) func;
+ (*rfunc) (object,
+ GTK_VALUE_POINTER (args[0]),
+ GTK_VALUE_ENUM (args[1]),
+ GTK_VALUE_POINTER (args[2]),
+ func_data);
+}
+
static void
eazel_install_class_initialize (EazelInstallClass *klass)
{
@@ -228,35 +248,35 @@ eazel_install_class_initialize (EazelInstallClass *klass)
object_class->type,
GTK_SIGNAL_OFFSET (EazelInstallClass, download_progress),
gtk_marshal_NONE__POINTER_INT_INT,
- GTK_TYPE_NONE,3, GTK_TYPE_POINTER, GTK_TYPE_INT, GTK_TYPE_INT);
+ GTK_TYPE_NONE, 3, GTK_TYPE_POINTER, GTK_TYPE_INT, GTK_TYPE_INT);
signals[INSTALL_PROGRESS] =
gtk_signal_new ("install_progress",
GTK_RUN_LAST,
object_class->type,
GTK_SIGNAL_OFFSET (EazelInstallClass, install_progress),
gtk_marshal_NONE__POINTER_INT_INT,
- GTK_TYPE_NONE,3, GTK_TYPE_POINTER, GTK_TYPE_INT, GTK_TYPE_INT);
+ GTK_TYPE_NONE, 3, GTK_TYPE_POINTER, GTK_TYPE_INT, GTK_TYPE_INT);
signals[DOWNLOAD_FAILED] =
gtk_signal_new ("download_failed",
GTK_RUN_LAST,
object_class->type,
GTK_SIGNAL_OFFSET (EazelInstallClass, download_failed),
- gtk_marshal_NONE__POINTER,
- GTK_TYPE_NONE,1, GTK_TYPE_POINTER);
+ gtk_marshal_NONE__POINTER_POINTER,
+ GTK_TYPE_NONE, 2, GTK_TYPE_POINTER, GTK_TYPE_POINTER);
signals[INSTALL_FAILED] =
gtk_signal_new ("install_failed",
GTK_RUN_LAST,
object_class->type,
GTK_SIGNAL_OFFSET (EazelInstallClass, install_failed),
- gtk_marshal_NONE__POINTER,
- GTK_TYPE_NONE,1, GTK_TYPE_POINTER);
+ gtk_marshal_NONE__POINTER_ENUM_POINTER,
+ GTK_TYPE_NONE, 3, GTK_TYPE_POINTER, GTK_TYPE_ENUM, GTK_TYPE_POINTER);
signals[UNINSTALL_FAILED] =
gtk_signal_new ("uninstall_failed",
GTK_RUN_LAST,
object_class->type,
GTK_SIGNAL_OFFSET (EazelInstallClass, uninstall_failed),
gtk_marshal_NONE__POINTER,
- GTK_TYPE_NONE,1, GTK_TYPE_POINTER);
+ GTK_TYPE_NONE, 1, GTK_TYPE_POINTER);
gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
gtk_object_add_arg_type ("EazelInstall::verbose",
@@ -528,26 +548,29 @@ eazel_install_emit_download_progress (EazelInstall *service,
void
eazel_install_emit_download_failed (EazelInstall *service,
- const char *name)
+ const char *name,
+ gpointer info)
{
SANITY(service);
- gtk_signal_emit (GTK_OBJECT (service), signals[DOWNLOAD_FAILED], name);
+ gtk_signal_emit (GTK_OBJECT (service), signals[DOWNLOAD_FAILED], name, info);
}
void
eazel_install_emit_install_failed (EazelInstall *service,
- const char *name)
+ const PackageData *pd,
+ RPM_FAIL code,
+ const gpointer info)
{
SANITY(service);
- gtk_signal_emit (GTK_OBJECT (service), signals[INSTALL_FAILED], name);
+ gtk_signal_emit (GTK_OBJECT (service), signals[INSTALL_FAILED], pd, code, info);
}
void
eazel_install_emit_uninstall_failed (EazelInstall *service,
- const char *name)
+ const PackageData *pd)
{
SANITY(service);
- gtk_signal_emit (GTK_OBJECT (service), signals[UNINSTALL_FAILED], name);
+ gtk_signal_emit (GTK_OBJECT (service), signals[UNINSTALL_FAILED], pd);
}
static void
diff --git a/components/services/install/lib/eazel-install-protocols.c b/components/services/install/lib/eazel-install-protocols.c
index cd92bc4c5..6ac889150 100644
--- a/components/services/install/lib/eazel-install-protocols.c
+++ b/components/services/install/lib/eazel-install-protocols.c
@@ -50,6 +50,7 @@ http_fetch_remote_file (EazelInstall *service,
get_failed = 1;
g_warning ("Could not open target file %s",target_file);
return FALSE;
+
}
request = ghttp_request_new();
diff --git a/components/services/install/lib/eazel-install-public.h b/components/services/install/lib/eazel-install-public.h
index 8c74e58bb..65d89da01 100644
--- a/components/services/install/lib/eazel-install-public.h
+++ b/components/services/install/lib/eazel-install-public.h
@@ -62,9 +62,17 @@ struct _EazelInstallClass
void (*download_progress) (char *file, int amount, int total);
void (*install_progress) (char *name, int amount, int total);
- void (*download_failed) (char *name);
- void (*install_failed) (char *name);
- void (*uninstall_failed) (char *name);
+ /*
+ if the set URLType is PROTOCOL_HTTP, info is a HTTPError struc
+ */
+ void (*download_failed) (char *name, gpointer info);
+ /*
+ if RPM_FAIL is RPM_SRC_NOT_SUPPORTED, info is NULL
+ RPM_DEP_FAIL, info is a GSList of required packages (PackageData objects)
+ RPM_NOT_AN_RPM, info is NULL
+ */
+ void (*install_failed) (PackageData *pd, RPM_FAIL code, gpointer info);
+ void (*uninstall_failed) (PackageData *pd);
#ifndef STANDALONE
gpointer servant_vepv;
#endif /* STANDALONE */
@@ -104,11 +112,14 @@ void eazel_install_emit_download_progress (EazelInstall *service,
int amount,
int total);
void eazel_install_emit_download_failed (EazelInstall *service,
- const char *name);
+ const char *name,
+ const gpointer info);
void eazel_install_emit_install_failed (EazelInstall *service,
- const char *name);
+ const PackageData *pd,
+ RPM_FAIL code,
+ const gpointer info);
void eazel_install_emit_uninstall_failed (EazelInstall *service,
- const char *name);
+ const PackageData *pd);
/* This is in flux */
void eazel_install_fetch_pockage_list (EazelInstall *service);
diff --git a/components/services/install/lib/eazel-install-rpm-glue.c b/components/services/install/lib/eazel-install-rpm-glue.c
index c8f62d79f..e22364ce8 100644
--- a/components/services/install/lib/eazel-install-rpm-glue.c
+++ b/components/services/install/lib/eazel-install-rpm-glue.c
@@ -115,7 +115,7 @@ install_new_packages (EazelInstall *service) {
problem_filters = 0;
if (eazel_install_get_test (service) == TRUE) {
- g_print (_("Dry Run Mode Activated. Packages will not actually be installed ...\n"));
+ g_message (_("Dry Run Mode Activated. Packages will not actually be installed ...\n"));
install_flags |= RPMTRANS_FLAG_TEST;
}
@@ -139,7 +139,7 @@ install_new_packages (EazelInstall *service) {
rpmReadConfigFiles (eazel_install_get_rpmrc_file (service), NULL);
- g_print (_("Reading the install package list ...\n"));
+ g_message (_("Reading the install package list ...\n"));
categories = parse_local_xml_package_list (eazel_install_get_package_list (service));
if (categories == NULL) {
@@ -188,7 +188,7 @@ download_a_package (EazelInstall *service,
eazel_install_get_rpm_storage_path (service),
rpmname);
- g_print ("Downloading %s...\n", rpmname);
+ g_message ("Downloading %s...\n", rpmname);
rv = http_fetch_remote_file (service, url, targetname);
if (rv != TRUE) {
result = FALSE;
@@ -219,7 +219,7 @@ download_all_packages (EazelInstall *service,
cat = categories->data;
pkgs = cat->packages;
- g_print ("Category = %s\n", cat->name);
+ g_message ("Category = %s\n", cat->name);
while (pkgs) {
PackageData* package;
@@ -227,7 +227,7 @@ download_all_packages (EazelInstall *service,
if (download_a_package (service, package) == FALSE) {
g_warning ("*** Failed to retreive %s! ***\n", package->name);
- eazel_install_emit_download_failed (service, package->name);
+ eazel_install_emit_download_failed (service, package->name, NULL);
result = FALSE;
}
@@ -255,7 +255,7 @@ install_all_packages (EazelInstall *service,
CategoryData* cat = categories->data;
GList* pkgs = cat->packages;
- g_print ("Category = %s\n", cat->name);
+ g_message ("Category = %s\n", cat->name);
while (pkgs) {
PackageData* pack;
char* pkg;
@@ -271,7 +271,7 @@ install_all_packages (EazelInstall *service,
pack->minor,
pack->archtype);
- g_print ("Installing %s\n", pkg);
+ g_message ("Installing %s\n", pkg);
retval = rpm_install (service,
"/", pkg, NULL, install_flags,
@@ -279,10 +279,9 @@ install_all_packages (EazelInstall *service,
NULL, NULL);
if (retval == 0) {
- g_print (_("Package install successful !\n"));
+ g_message (_("Package install successful !\n"));
} else {
- g_print (_("Package install failed !\n"));
- eazel_install_emit_install_failed (service, pack->name);
+ g_message (_("Package install failed !\n"));
rv = FALSE;
}
pkgs = pkgs->next;
@@ -320,14 +319,14 @@ uninstall_packages (EazelInstall *service) {
rpmReadConfigFiles (eazel_install_get_rpmrc_file (service), NULL);
- g_print (_("Reading the uninstall package list ...\n"));
+ g_message (_("Reading the uninstall package list ...\n"));
categories = parse_local_xml_package_list (eazel_install_get_package_list (service));
while (categories) {
CategoryData* cat = categories->data;
GList* pkgs = cat->packages;
- g_print ("Category = %s\n", cat->name);
+ g_message ("Category = %s\n", cat->name);
while (pkgs) {
PackageData* package = pkgs->data;
@@ -337,7 +336,7 @@ uninstall_packages (EazelInstall *service) {
problem_filters,
interface_flags) == FALSE) {
g_warning ("Uninstall failed for %s",package->name);
- eazel_install_emit_uninstall_failed (service, package->name);
+ eazel_install_emit_uninstall_failed (service, package);
} else {
rv = FALSE;
}
@@ -372,7 +371,7 @@ uninstall_a_package (EazelInstall *service,
rv = TRUE;
if (g_strcasecmp (package->archtype, "src") != 0) {
- g_print ("Uninstalling %s\n", pkg);
+ g_message ("Uninstalling %s\n", pkg);
retval = rpm_uninstall (service,
"/",
pkg,
@@ -381,13 +380,13 @@ uninstall_a_package (EazelInstall *service,
interface_flags);
g_free (pkg);
if (retval == 0) {
- g_print ("Package uninstall successful!\n");
+ g_message ("Package uninstall successful!\n");
} else {
- g_print (_("Package uninstall failed !\n"));
+ g_message (_("Package uninstall failed !\n"));
rv = FALSE;
}
} else {
- g_print ("%s seems to be a source package. Skipping ...\n", pkg);
+ g_message ("%s seems to be a source package. Skipping ...\n", pkg);
g_free (pkg);
rv = FALSE;
}
@@ -451,6 +450,39 @@ rpm_show_progress (const Header h,
return NULL;
} /* end rpm_show_progress */
+static GList*
+build_packagedata_list_from_deps (struct rpmDependencyConflict* conflicts,
+ int num_conflicts)
+{
+ GList *result;
+ int i;
+
+ g_return_val_if_fail (num_conflicts >= 1, NULL);
+ g_return_val_if_fail (conflicts != NULL, NULL);
+
+ result = NULL;
+
+ for (i = 0; i < num_conflicts; i++) {
+ struct rpmDependencyConflict c;
+ PackageData *pd;
+
+ c = conflicts [i];
+
+ pd = g_new0 (PackageData, 1);
+ pd->name = g_strdup (c.needsName);
+ pd->version = g_strdup (c.needsVersion);
+ pd->minor = NULL;
+ pd->archtype = NULL;
+ pd->bytesize = 0;
+ pd->summary = NULL;
+ pd->soft_depends = NULL;
+ pd->hard_depends = NULL;
+
+ result = g_list_prepend (result, pd);
+ }
+ return result;
+}
+
int
do_rpm_install (EazelInstall *service,
char* root_dir,
@@ -482,7 +514,6 @@ do_rpm_install (EazelInstall *service,
rpmProblemSet probs;
unsigned long* sizep;
FD_t fd;
-
struct rpmDependencyConflict* conflicts;
stop_install = 0;
@@ -504,6 +535,7 @@ do_rpm_install (EazelInstall *service,
pkg_count = g_list_length (packages);
pkgs = g_new (char *, pkg_count + 1);
binary_headers = g_new (Header, pkg_count + 1);
+ /* First load all rpm headers */
for (num_packages = 0; packages != NULL; packages = packages->next) {
pkg_file = packages->data;
fd = fdOpen (pkg_file, O_RDONLY, 0644);
@@ -512,16 +544,24 @@ do_rpm_install (EazelInstall *service,
continue;
}
pkgs[num_packages++] = pkg_file;
+ /* This loads the rpm header */
rc = rpmReadPackageHeader (fd,
&binary_headers[num_binary_packages],
&is_source,
NULL,
NULL);
+
+ /* Fail source packages */
if (is_source) {
+ PackageData *pd;
g_warning ("Source Package installs not supported!\n"
"Package %s skipped.", pkg_file);
+ pd = packagedata_new_from_rpm_header (binary_headers[num_binary_packages]);
+ eazel_install_emit_install_failed (service, pd, RPM_SRC_NOT_SUPPORTED, NULL);
+ packagedata_destroy (pd);
}
fdClose (fd);
+ /* Get the size tag */
if (binary_headers[num_binary_packages]) {
if (headerGetEntry (binary_headers[num_binary_packages],
RPMTAG_SIZE, NULL,
@@ -546,17 +586,19 @@ do_rpm_install (EazelInstall *service,
}
}
if (num_binary_packages) {
+ /* Open the rpm db */
if (rpmdbOpen (root_dir, &db, mode, 0644)) {
for (i=0; i < num_binary_packages; i++) {
headerFree(binary_headers[i]);
}
- g_free (binary_headers);
- g_free (pkgs);
- return num_packages;
+ g_free (binary_headers);
+ g_free (pkgs);
+ return num_packages;
}
+ /* Create transaction set and add all
+ the headers to the set */
rpmdep = rpmtransCreateSet (db, root_dir);
-
for (i =0; i < num_binary_packages; i++) {
rpmtransAddPackage (rpmdep,
binary_headers[i],
@@ -565,38 +607,50 @@ do_rpm_install (EazelInstall *service,
interface_flags,
NULL);
}
+ /* Ensure the order */
+ if (!(interface_flags & INSTALL_NOORDER)) {
+ if (rpmdepOrder(rpmdep)) {
+ num_failed = num_packages;
+ stop_install = 1;
+ }
+ }
if (!(interface_flags & INSTALL_NODEPS)) {
+ /* Check the dependencies */
if (rpmdepCheck (rpmdep, &conflicts, &num_conflicts)) {
num_failed = num_packages;
stop_install = 1;
}
+ /* Deps failed ? */
if (!stop_install && conflicts) {
- g_print (_("Dependancy check failed.\n"));
- printDepProblems (stderr, conflicts,
- num_conflicts);
- num_failed = num_packages;
- stop_install = 1;
- rpmdepFreeConflicts (conflicts, num_conflicts);
- }
- }
- if (!(interface_flags & INSTALL_NOORDER)) {
- if (rpmdepOrder(rpmdep)) {
+ PackageData *pd;
+ GList *deps;
+
+ deps = build_packagedata_list_from_deps (conflicts, num_conflicts);
+ pd = packagedata_new_from_rpm_header (binary_headers[i]);
+ g_message ("Dep failed for %s",pd->name);
+ eazel_install_emit_install_failed (service, pd, RPM_DEP_FAIL, deps);
+
num_failed = num_packages;
stop_install = 1;
+
+ packagedata_destroy (pd);
+ g_list_foreach (deps, (GFunc)packagedata_destroy_foreach, NULL);
+ rpmdepFreeConflicts (conflicts, num_conflicts);
}
}
}
else {
db = NULL;
}
+ /* If all is good, do the install */
if (num_binary_packages && !stop_install && rpmdep != NULL) {
/* do the actual install */
if (interface_flags & INSTALL_UPGRADE) {
- g_print (_("Upgrading...\n"));
+ g_message (_("Upgrading...\n"));
}
else {
- g_print (_("Installing...\n"));
+ g_message (_("Installing...\n"));
}
rc = rpmRunTransactions (rpmdep,
@@ -616,6 +670,8 @@ do_rpm_install (EazelInstall *service,
num_failed += rc;
}
}
+
+ /* Clean up */
for (i = 0; i < num_binary_packages; i++) {
headerFree (binary_headers[i]);
}
@@ -679,11 +735,11 @@ do_rpm_uninstall (EazelInstall *service,
rc = rpmdbFindByLabel (db, pkg_name, &matches);
switch (rc) {
case 1:
- g_print (_("Package %s is not installed\n"), pkg_name);
+ g_message (_("Package %s is not installed\n"), pkg_name);
num_failed++;
break;
case 2:
- g_print (_("Error finding index to %s\n"), pkg_name);
+ g_message (_("Error finding index to %s\n"), pkg_name);
num_failed++;
break;
default:
@@ -713,7 +769,7 @@ do_rpm_uninstall (EazelInstall *service,
if (!stop_uninstall && conflicts) {
- g_print (_("Dependancy check failed.\n"));
+ g_message (_("Dependancy check failed.\n"));
printDepProblems (stderr, conflicts,
num_conflicts);
num_failed += num_packages;
@@ -739,6 +795,45 @@ do_rpm_uninstall (EazelInstall *service,
return num_failed;
} /* end do_rpm_uninstall */
+#if 0
+/*
+ Given a list of filenames, ensure_deps_are_fetched checks deps
+ for them all, if deps fail, fetch the depency and add to outfiles.
+ Returns FALSE if outfiles was set, TRUE is all dependencies were satisfied.
+ */
+static gboolean
+ensure_deps_are_fetched (GList *filenames, GList **_outfiles)
+{
+ GList *appendfiles;
+ GList *removefiles;
+ GList *outfiles;
+ gboolean result;
+ rpmTransactionSet rpmdep;
+ struct rpmDependencyConflict* conflicts;
+ int num_conflicts;
+ rpmdb db;
+ GList *file_iterator;
+
+ g_assert (outfiles == NULL);
+ g_return_val_if_fail (filenames != NULL, TRUE);
+
+ outfiles = NULL;
+ result = TRUE;
+ append = NULL;
+
+ rpmdep = rpmtransCreateSet (db, root_dir);
+ for (file_iterator = filenames; file_iterator; file_iterator = file_iterator->next) {
+ g_message ("ensuring deps for %s", file_iterator->data);
+
+ }
+
+ (*_outfiles) = outfiles;
+ (*_filenames) = filenames;
+
+ return result;
+}
+#endif
+
static int
rpm_install (EazelInstall *service,
char* root_dir,
diff --git a/components/services/install/lib/eazel-install-types.c b/components/services/install/lib/eazel-install-types.c
new file mode 100644
index 000000000..8cc43a607
--- /dev/null
+++ b/components/services/install/lib/eazel-install-types.c
@@ -0,0 +1,97 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * Copyright (C) 2000 Eazel, Inc
+ * Copyright (C) 2000 Helix Code, Inc
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * Authors: Eskil Heyn Olsen <eskil@eazel.com>
+ */
+
+/*
+ I'm declaring these _foreach, since we can then export their prototypes in the
+ api
+ */
+
+#include <config.h>
+#include "eazel-install-types.h"
+
+void
+categorydata_destroy_foreach (CategoryData *cd, gpointer ununsed)
+{
+ g_return_if_fail (cd != NULL);
+ g_free (cd->name);
+ cd->name = NULL;
+ g_list_foreach (cd->packages, (GFunc)packagedata_destroy_foreach, NULL);
+}
+
+void
+categorydata_destroy (CategoryData *cd)
+{
+ categorydata_destroy_foreach (cd, NULL);
+}
+
+PackageData*
+packagedata_new_from_rpm_header (Header hd)
+{
+ PackageData *pd;
+
+ pd = g_new0 (PackageData, 1);
+ headerGetEntry (hd,
+ RPMTAG_NAME, NULL,
+ (void **) &pd->name, NULL);
+ headerGetEntry (hd,
+ RPMTAG_VERSION, NULL,
+ (void **) &pd->version, NULL);
+ headerGetEntry (hd,
+ RPMTAG_RELEASE, NULL,
+ (void **) &pd->minor, NULL);
+ headerGetEntry (hd,
+ RPMTAG_ARCH, NULL,
+ (void **) &pd->archtype, NULL);
+ headerGetEntry (hd,
+ RPMTAG_SIZE, NULL,
+ (void **) &pd->bytesize, NULL);
+ headerGetEntry (hd,
+ RPMTAG_SUMMARY, NULL,
+ (void **) &pd->summary, NULL);
+ return pd;
+};
+
+void
+packagedata_destroy_foreach (PackageData *pd, gpointer unused)
+{
+ g_return_if_fail (pd != NULL);
+ g_free (pd->name);
+ pd->name = NULL;
+ g_free (pd->version);
+ pd->version = NULL;
+ g_free (pd->minor);
+ pd->minor = NULL;
+ g_free (pd->archtype);
+ pd->archtype = NULL;
+ g_free (pd->summary);
+ pd->summary = NULL;
+ pd->bytesize = 0;
+ g_list_foreach (pd->soft_depends, (GFunc)packagedata_destroy_foreach, NULL);
+ g_list_foreach (pd->hard_depends, (GFunc)packagedata_destroy_foreach, NULL);
+}
+
+void
+packagedata_destroy (PackageData *pd)
+{
+ packagedata_destroy_foreach (pd, NULL);
+}
diff --git a/components/services/install/lib/eazel-install-types.h b/components/services/install/lib/eazel-install-types.h
index 67bf67a9a..8b13a50a1 100644
--- a/components/services/install/lib/eazel-install-types.h
+++ b/components/services/install/lib/eazel-install-types.h
@@ -34,6 +34,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
+#include <rpm/rpmlib.h>
typedef enum _URLType URLType;
typedef enum _PackageType PackageType;
@@ -41,6 +42,18 @@ typedef struct _TransferOptions TransferOptions;
typedef struct _InstallOptions InstallOptions;
typedef struct _CategoryData CategoryData;
typedef struct _PackageData PackageData;
+typedef enum _RPM_FAIL RPM_FAIL;
+
+enum _RPM_FAIL {
+ RPM_SRC_NOT_SUPPORTED,
+ RPM_DEP_FAIL,
+ RPM_NOT_AN_RPM
+};
+
+struct _HTTPError {
+ int code;
+ char *reason;
+};
enum _URLType {
PROTOCOL_LOCAL,
@@ -81,6 +94,8 @@ struct _CategoryData {
char* name;
GList* packages;
};
+void categorydata_destroy_foreach (CategoryData *cd, gpointer ununsed);
+void categorydata_destroy (CategoryData *pd);
struct _PackageData {
char* name;
@@ -92,5 +107,8 @@ struct _PackageData {
GList* soft_depends;
GList* hard_depends;
};
+PackageData* packagedata_new_from_rpm_header (Header);
+void packagedata_destroy_foreach (PackageData *pd, gpointer unused);
+void packagedata_destroy (PackageData *pd);
#endif /* __EAZEL_SERVICES_TYPES_H__ */
diff --git a/components/services/time/Makefile.am b/components/services/time/Makefile.am
index 8faa7e05d..c852c3033 100644
--- a/components/services/time/Makefile.am
+++ b/components/services/time/Makefile.am
@@ -1,2 +1,2 @@
-SUBDIRS = service command-line nautilus-view
+SUBDIRS = service command-line nautilus-view idl
diff --git a/components/services/time/idl/Makefile.am b/components/services/time/idl/Makefile.am
new file mode 100644
index 000000000..de136b009
--- /dev/null
+++ b/components/services/time/idl/Makefile.am
@@ -0,0 +1,6 @@
+idldir = ${prefix}/idl
+idl_DATA = \
+ trilobite-eazel-time-service.idl
+
+EXTRA_DIST=\
+ $(idl_DATA)
diff --git a/components/services/time/service/Makefile.am b/components/services/time/service/Makefile.am
index b1f61c443..ed84672cb 100644
--- a/components/services/time/service/Makefile.am
+++ b/components/services/time/service/Makefile.am
@@ -58,6 +58,8 @@ bin_PROGRAMS = trilobite-eazel-time-service
trilobite_eazel_time_service_SOURCES = \
trilobite-eazel-time-service.c \
+ trilobite-eazel-time-service-public.h \
+ trilobite-eazel-time-service-private.h \
main.c \
trilobite-eazel-time-service-common.c \
trilobite-eazel-time-service-skels.c \
diff --git a/components/services/trilobite/idl/Makefile.am b/components/services/trilobite/idl/Makefile.am
index 049c23505..49ada3d48 100644
--- a/components/services/trilobite/idl/Makefile.am
+++ b/components/services/trilobite/idl/Makefile.am
@@ -1 +1,7 @@
-EXTRA_DIST= \
+idldir = ${prefix}/idl
+idl_DATA = \
+ trilobite-service.idl \
+ sample-service.idl
+
+EXTRA_DIST=\
+ $(idl_DATA)
diff --git a/components/services/trilobite/libtrilobite/Makefile.am b/components/services/trilobite/libtrilobite/Makefile.am
index 7395dca4e..083b3109a 100644
--- a/components/services/trilobite/libtrilobite/Makefile.am
+++ b/components/services/trilobite/libtrilobite/Makefile.am
@@ -35,6 +35,7 @@ libtrilobiteinclude_HEADERS = \
libtrilobite.h \
trilobite-service.h \
trilobite-service-public.h \
+ trilobite-service-private.h \
trilobite-core-messaging.h \
trilobite-core-metadata-manager.h \
trilobite-core-network.h \
diff --git a/components/services/trilobite/sample/service/Makefile.am b/components/services/trilobite/sample/service/Makefile.am
index e5dd021b2..2bde1dfc6 100644
--- a/components/services/trilobite/sample/service/Makefile.am
+++ b/components/services/trilobite/sample/service/Makefile.am
@@ -55,6 +55,7 @@ bin_PROGRAMS = trilobite-eazel-sample-service
trilobite_eazel_sample_service_SOURCES = \
sample-service-impl.c \
+ sample-service-public.h \
sample-service-common.c \
sample-service-skels.c \
main.c \
diff --git a/configure.in b/configure.in
index 34c0a5767..58527797e 100644
--- a/configure.in
+++ b/configure.in
@@ -357,6 +357,7 @@ components/services/time/Makefile
components/services/time/service/Makefile
components/services/time/command-line/Makefile
components/services/time/nautilus-view/Makefile
+components/services/time/idl/Makefile
components/services/startup/Makefile
components/services/startup/lib/Makefile
components/services/startup/command-line/Makefile
@@ -364,6 +365,7 @@ components/services/startup/nautilus-view/Makefile
components/services/startup/nautilus-view/icons/Makefile
components/services/install/Makefile
components/services/install/lib/Makefile
+components/services/install/idl/Makefile
components/services/install/command-line/Makefile
components/services/install/nautilus-view/Makefile
components/loser/Makefile
diff --git a/nautilus-installer/src/HACKING b/nautilus-installer/src/HACKING
index a046ae9de..c982c4a12 100644
--- a/nautilus-installer/src/HACKING
+++ b/nautilus-installer/src/HACKING
@@ -1,3 +1,5 @@
+link.sh will build the statically linked version, plus
+strip gzexe and patch prescript into it.
This command will statically link all the gnome shit into the installer, but leave the rpm, db, z, bz and
generic X crap as shared libs
@@ -21,3 +23,16 @@ gcc -static -o nautilus-installer main.o support.o interface.o callbacks.o inst
-L/usr/lib -lrpm -lz -ldb1 \
/usr/lib/libpopt.a \
-lxml
+
+
+The gzexed file should have skip=22 replaced with
+
+skip=28
+if test $UID -ne 0; then
+ xhost + localhost
+ su - -c "export DISPLAY=$DISPLAY && cd $PWD && sh $0"
+ xhost - localhost
+ exit
+fi
+
+this causes it not to require root access before running
diff --git a/nautilus-installer/src/Makefile b/nautilus-installer/src/Makefile
index 0c2db759b..ba9487845 100644
--- a/nautilus-installer/src/Makefile
+++ b/nautilus-installer/src/Makefile
@@ -147,10 +147,10 @@ l =
NULL =
-INCLUDES = -I$(top_srcdir)/components/services/install/lib $(GNOMEUI_CFLAGS) $(XML_CFLAGS) $(GNET_CFLAGS) $(GHTTP_CFLAGS) $(GNOME_INCLUDEDIR) -DGNOMELOCALEDIR=\""$(datadir)/locale"\" -DG_LOG_DOMAIN=\"Nautilus-Installer\" $(NULL)
+INCLUDES = -I$(top_srcdir)/components/services/install/lib -I$(top_srcdir)/components/services/trilbite -I/usr/include/rpm $(GNOMEUI_CFLAGS) $(XML_CFLAGS) $(GNET_CFLAGS) $(GHTTP_CFLAGS) $(GNOME_INCLUDEDIR) -DGNOMELOCALEDIR=\""$(datadir)/locale"\" -DG_LOG_DOMAIN=\"Nautilus-Installer\" $(NULL)
-CFLAGS = -O $(WERROR)
+CFLAGS = -g $(WERROR)
bin_PROGRAMS = nautilus-installer
diff --git a/nautilus-installer/src/Makefile.am b/nautilus-installer/src/Makefile.am
index e70062c77..2adc439c2 100644
--- a/nautilus-installer/src/Makefile.am
+++ b/nautilus-installer/src/Makefile.am
@@ -4,6 +4,8 @@ NULL =
INCLUDES = \
-I$(top_srcdir)/components/services/install/lib \
+ -I$(top_srcdir)/components/services/trilbite \
+ -I/usr/include/rpm \
$(GNOMEUI_CFLAGS) \
$(XML_CFLAGS) \
$(GNET_CFLAGS) \
@@ -13,7 +15,8 @@ INCLUDES = \
-DG_LOG_DOMAIN=\"Nautilus-Installer\" \
$(NULL)
-CFLAGS = -O $(WERROR)
+CFLAGS = -g $(WERROR)
+##LDFLAGS = -static
bin_PROGRAMS = nautilus-installer
diff --git a/nautilus-installer/src/callbacks.c b/nautilus-installer/src/callbacks.c
index a0b76b385..41b2f1db3 100644
--- a/nautilus-installer/src/callbacks.c
+++ b/nautilus-installer/src/callbacks.c
@@ -19,7 +19,6 @@ void
druid_cancel (GnomeDruid *gnomedruid,
gpointer data)
{
- g_message ("Installation cancelled");
exit (1);
}
@@ -29,7 +28,6 @@ begin_install (GtkButton *button,
gpointer window)
{
GnomeDruid *druid;
- g_message ("Begin install");
druid = GNOME_DRUID (gtk_object_get_data (GTK_OBJECT (window), "druid"));
gnome_druid_set_buttons_sensitive(druid,TRUE,FALSE,TRUE);
@@ -67,7 +65,6 @@ druid_finish (GnomeDruidPage *gnomedruidpage,
gpointer arg1,
gpointer user_data)
{
- g_message ("Installation completed");
exit (0);
}
@@ -78,7 +75,6 @@ prep_install (GnomeDruidPage *gnomedruidpage,
{
GnomeDruid *druid;
GtkButton *button;
- g_message ("in prep_install");
button = GTK_BUTTON (gtk_object_get_data (GTK_OBJECT (window), "begin_button"));
gtk_widget_set_sensitive (GTK_WIDGET (button), TRUE);
@@ -92,8 +88,6 @@ set_images (GtkWidget *window)
GnomeDruidPage *page;
- g_message ("in prep");
-
page = GNOME_DRUID_PAGE (gtk_object_get_data(GTK_OBJECT (window), "start_page"));
gnome_druid_page_start_set_logo (GNOME_DRUID_PAGE_START (page), gdk_imlib_create_image_from_xpm_data (step_one_top));
gnome_druid_page_start_set_watermark (GNOME_DRUID_PAGE_START (page), gdk_imlib_create_image_from_xpm_data (banner_left));
diff --git a/nautilus-installer/src/installer.c b/nautilus-installer/src/installer.c
index 91c02380b..eac512a0e 100644
--- a/nautilus-installer/src/installer.c
+++ b/nautilus-installer/src/installer.c
@@ -87,7 +87,7 @@ eazel_download_progress (EazelInstall *service,
}
static void
-append_name_to (GtkWidget *widget,
+append_string_to_window_list (GtkWidget *widget,
const char *listname,
const char *name)
{
@@ -98,23 +98,61 @@ append_name_to (GtkWidget *widget,
gtk_object_set_data (GTK_OBJECT (widget), listname, list);
}
-void
+static void
download_failed (EazelInstall *service,
const char *name,
GtkWidget *window)
{
- append_name_to (window, "download_failed_list", name);
+ append_string_to_window_list (window, "download_failed_list", name);
+}
+
+static void
+install_failed_foreach (PackageData *dep,
+ GtkWidget *window)
+{
+ char *string;
+ string = g_strdup_printf (" requires %s %s", dep->name,
+ dep->version ? dep->version : "");
+ append_string_to_window_list (window, "install_failed_list", string);
+ g_free (string);
+}
+
+static void
+requeue (PackageData *dep,
+ const PackageData *pd)
+{
+ g_message ("%s-%s failed, requeue and add %s for %s, version >= %s",
+ pd->name,
+ pd->version,
+ dep->name,
+ dep->archtype,
+ dep->version);
}
void
install_failed (EazelInstall *service,
- const char *name,
- GtkWidget *window)
+ const PackageData *pd,
+ RPM_FAIL code,
+ GList *deps,
+ GtkWidget *window)
{
- append_name_to (window, "install_failed_list", name);
+ append_string_to_window_list (window, "install_failed_list", pd->name);
+
+ switch (code) {
+ case RPM_DEP_FAIL:
+ g_list_foreach (deps, (GFunc)install_failed_foreach, window);
+ g_list_foreach (deps, (GFunc)requeue, (gpointer)pd);
+ break;
+ case RPM_SRC_NOT_SUPPORTED:
+ append_string_to_window_list (window, "install_failed_list", "source packaages not supported" );
+ break;
+ default:
+ break;
+ }
+
}
-static char *
+static void
gen_report (GtkWidget *widget,
const char *listname,
char **text,
@@ -136,7 +174,7 @@ gen_report (GtkWidget *widget,
ptr = list;
while (ptr) {
char *tmp;
- tmp = g_strconcat ((*text), "* ", (char*)ptr->data, "\n", NULL);
+ tmp = g_strconcat ((*text), (char*)ptr->data, "\n", NULL);
g_free ((*text));
(*text) = tmp;
ptr = ptr->next;
@@ -190,7 +228,6 @@ void installer (GtkWidget *window,
service = eazel_install_new_with_config ("/var/eazel/services/eazel-services-config.xml");
g_assert (service != NULL);
- eazel_install_open_log (service, TMP_DIR "/log");
eazel_install_set_hostname (service, HOSTNAME);
eazel_install_set_rpmrc_file (service, RPMRC);
eazel_install_set_package_list_storage_path (service, "/package-list.xml");
diff --git a/nautilus-installer/src/link.sh b/nautilus-installer/src/link.sh
new file mode 100755
index 000000000..79f72ced4
--- /dev/null
+++ b/nautilus-installer/src/link.sh
@@ -0,0 +1,20 @@
+#! /bin/bash
+make clean
+make CFLAGS="-O -Werror" LDFLAGS="-static"
+gcc -static -O -Werror -o nautilus-installer main.o support.o interface.o callbacks.o installer.o ../../components/services/trilobite/libtrilobite/helixcode-utils.o ../../components/services/install/lib/libinstall.a -L/gnome/lib -lgnomeui -lgnome -lart_lgpl -lgdk_imlib -lgtk -lgdk -lgmodule -lglib -L/usr/X11R6/lib -ldl -lXext -lX11 -lm -lSM -lICE /usr/lib/libesd.a /usr/lib/libaudiofile.a -lghttp -L/usr/lib -lrpm -lz -ldb1 -lpopt -lxml
+
+echo Stripping...
+strip nautilus-installer
+echo Packing...
+gzexe nautilus-installer
+
+echo Patching...
+chmod 644 nautilus-installer
+mv nautilus-installer hest
+extraskip=`expr 22 + \`wc -l prescript|awk '{printf $1"\n"}'\``
+echo "#!/bin/sh" > nautilus-installer
+echo "skip=$extraskip" >> nautilus-installer
+cat prescript >> nautilus-installer
+tail +3 hest >> nautilus-installer
+rm hest
+echo Done...
diff --git a/nautilus-installer/src/main.c b/nautilus-installer/src/main.c
index 3ca65d2a5..e4d39f7ea 100644
--- a/nautilus-installer/src/main.c
+++ b/nautilus-installer/src/main.c
@@ -11,6 +11,8 @@
#include "interface.h"
#include "support.h"
+#include "callbacks.h"
+#include <libtrilobite/helixcode-utils.h>
int
main (int argc, char *argv[])
diff --git a/nautilus-installer/src/prescript b/nautilus-installer/src/prescript
new file mode 100644
index 000000000..cef0a719d
--- /dev/null
+++ b/nautilus-installer/src/prescript
@@ -0,0 +1,14 @@
+if test x$DISPLAY = x; then
+ echo "The Nautilus-Installer requires X"
+fi
+if test $UID -ne 0; then
+ echo ""
+ echo "The Nautilus-Installer requires superuser access to install packages."
+ echo "yadayada insecure yadayada trust us blablabla"
+ echo ""
+ echo "Please enter root password at the prompt"
+ xhost + localhost
+ su - -c "export DISPLAY=$DISPLAY && cd $PWD && sh $0"
+ xhost - localhost
+ exit
+fi
diff --git a/nautilus.spec.in b/nautilus.spec.in
index 9b2f0896f..1527e6313 100644
--- a/nautilus.spec.in
+++ b/nautilus.spec.in
@@ -91,30 +91,28 @@ fi
%files
%defattr(0555, bin, bin)
-%dir %{prefix}/share/gnome/nautilus
+%dir %{prefix}/
%doc AUTHORS COPYING COPYING.LIB ChangeLog NEWS README
%{prefix}/bin/*
%{prefix}/lib/lib*.so.*
-%defattr(0644, bin, bin)
-%{prefix}/share/gnome/nautilus/docs/*
-
%defattr (0444, bin, bin)
%{prefix}/share/locale/*/LC_MESSAGES/*
-%{prefix}/share/mime-info/nautilus.keys
-%{sysconfdir}/CORBA/servers/*
+%{prefix}/share/oaf/*
%files devel
%defattr(0555, bin, bin)
%dir %{prefix}/include/libnautilus
-%{prefix}/lib/*.a
%{prefix}/lib/*.so
%{prefix}/lib/*.la
%defattr(0444, bin, bin)
-%{prefix}/lib/*Conf.sh
-%{prefix}/include/nautilus/*
-%{prefix}/share/idl/*.idl
+%{prefix}/include/libnautilus/*
+%{prefix}/include/libnautilus-extensions/*
+%{prefix}/include/librsvg/*
+%{prefix}/include/libtrilobite/*
+%{prefix}/include/nautilus-widgets/*
+%{prefix}/idl/*.idl
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 4ffd76521..e6fb75f6c 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,5 +1,4 @@
components/help/hyperbola-types.h
-components/html/main.c
components/mozilla/nautilus-mozilla-content-view.c
libnautilus-extensions/nautilus-entry.c
libnautilus-extensions/nautilus-icon-canvas-item.c
diff --git a/src/Makefile.am b/src/Makefile.am
index fdde415c6..5eb5c4596 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -72,7 +72,7 @@ nautilus_SOURCES =\
nautilus-view-frame-nautilus-view.c \
nautilus-view-frame-private.h \
nautilus-view-frame.c \
- nautilus-view.h \
+ nautilus-view-frame.h \
nautilus-window-manage-views.c \
nautilus-window-manage-views.h \
nautilus-window-private.h \