diff options
author | Robey Pointer <robey@src.gnome.org> | 2001-01-26 03:39:34 +0000 |
---|---|---|
committer | Robey Pointer <robey@src.gnome.org> | 2001-01-26 03:39:34 +0000 |
commit | 076f4684e67e4c9a3cb444a8c691fb48a8a7df6a (patch) | |
tree | 6fc1d656d86f2e5dd4d76640318d79f1b8279ecc /nautilus-installer | |
parent | 7379412e269dd701f76cf8bc1eb18bb06c9d3630 (diff) | |
download | nautilus-076f4684e67e4c9a3cb444a8c691fb48a8a7df6a.tar.gz |
Remove cruft.
* components/services/install/command-line/.cvsignore:
Remove cruft.
* components/services/install/idl/trilobite-eazel-install.idl:
* components/services/install/lib/eazel-install-corba-types.c:
(corba_packagedatastruct_from_packagedata),
(packagedata_from_corba_packagedatastruct):
* components/services/install/lib/eazel-install-xml-package-list.c:
(osd_parse_implementation):
* components/services/install/lib/eazel-package-system-types.c:
(packagedata_initialize), (packagedata_finalize),
(packagedata_copy), (packagedata_fill_in_missing),
(packagedata_dump_int):
* components/services/install/lib/eazel-package-system-types.h:
Add "filesize" item to the PackageData struct, and the corba one,
and parse it out of the softcat XML.
* components/services/install/lib/eazel-install-logic2.c:
(eazel_install_check_existing_packages), (dedupe_foreach_depends),
(is_satisfied):
* components/services/install/lib/eazel-softcat.c:
(remove_directories_from_provides_list):
* components/services/install/nautilus-view/nautilus-service-instal
l-view.c: (install_message_new), (generate_install_form):
Retrofit some PR3 patches to the trunk.
* components/services/install/lib/eazel-package-system.c:
(eazel_package_system_matches_versioning):
Compress Eskil's package version comparison function into
something a bit smaller and easier to follow for mere mortals like
myself. :)
* nautilus-installer/src/installer.c: (create_install_page),
(eazel_install_progress), (eazel_download_progress),
(get_detailed_errors_foreach), (get_detailed_errors),
(download_failed), (eazel_install_preflight),
(eazel_install_dep_check):
* nautilus-installer/src/installer.h:
* nautilus-installer/src/main.c: (segv_handler), (main):
* nautilus-installer/src/prescript:
First bit of 1.0 installer fixes: Bring it up to speed with
changes in the install library.
Diffstat (limited to 'nautilus-installer')
-rw-r--r-- | nautilus-installer/src/installer.c | 60 | ||||
-rw-r--r-- | nautilus-installer/src/installer.h | 3 | ||||
-rw-r--r-- | nautilus-installer/src/main.c | 15 | ||||
-rw-r--r-- | nautilus-installer/src/prescript | 9 |
4 files changed, 61 insertions, 26 deletions
diff --git a/nautilus-installer/src/installer.c b/nautilus-installer/src/installer.c index 349578966..c078afc22 100644 --- a/nautilus-installer/src/installer.c +++ b/nautilus-installer/src/installer.c @@ -1,6 +1,6 @@ /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ /* - * Copyright (C) 2000 Eazel, Inc + * Copyright (C) 2000, 2001 Eazel, Inc. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -41,10 +41,6 @@ #include <dirent.h> #include <sys/utsname.h> -#if 0 -#include <rpm/misc.h> -#endif - #include <nautilus-druid.h> #include <nautilus-druid-page-eazel.h> @@ -371,7 +367,7 @@ create_install_page (EazelInstaller *installer) gtk_widget_show (hbox); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 3); - label_single = gtk_label_new (_("Poking about for packages ")); + label_single = gtk_label_new (_("Contacting the install server...")); gtk_widget_set_name (label_single, "download_label"); gtk_label_set_justify (GTK_LABEL (label_single), GTK_JUSTIFY_LEFT); gtk_widget_ref (label_single); @@ -420,7 +416,11 @@ create_install_page (EazelInstaller *installer) gtk_widget_show (hbox); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 3); +#if 0 label_overall = gtk_label_new (_("Downloading packages required to install Nautilus")); +#else + label_overall = gtk_label_new (" "); +#endif gtk_widget_set_name (label_overall, "label_overall"); gtk_label_set_justify (GTK_LABEL (label_overall), GTK_JUSTIFY_LEFT); gtk_widget_ref (label_overall); @@ -811,7 +811,7 @@ eazel_install_progress (EazelInstall *service, g_free (temp); gtk_progress_configure (GTK_PROGRESS (progressbar), 0, 0, (float)(total/1024)); - log_debug ("begin installing %s", package->name); + g_message ("Installing: %s", package->name); } gtk_progress_set_value (GTK_PROGRESS (progressbar), @@ -820,6 +820,10 @@ eazel_install_progress (EazelInstall *service, percent += 50.0; gtk_progress_set_value (GTK_PROGRESS (progress_overall), percent); + temp = g_strdup_printf (_("Installing %d packages (%d MB)"), installer->total_packages, installer->total_mb); + gtk_label_set_text (GTK_LABEL (label_overall), temp); + g_free (temp); + while (gtk_events_pending ()) { gtk_main_iteration (); } @@ -828,7 +832,7 @@ eazel_install_progress (EazelInstall *service, static void eazel_download_progress (EazelInstall *service, - const char *name, + const PackageData *package, int amount, int total, EazelInstaller *installer) @@ -837,10 +841,12 @@ eazel_download_progress (EazelInstall *service, GtkWidget *progress_overall; GtkWidget *label_single; GtkWidget *label_single_2; + GtkWidget *label_overall; char *temp; int amount_KB = (amount+512)/1024; int total_KB = (total+512)/1024; + label_overall = gtk_object_get_data (GTK_OBJECT (installer->window), "label_overall"); label_single = gtk_object_get_data (GTK_OBJECT (installer->window), "download_label"); label_single_2 = gtk_object_get_data (GTK_OBJECT (installer->window), "download_label_2"); progress_single = gtk_object_get_data (GTK_OBJECT (installer->window), "progressbar_single"); @@ -849,7 +855,7 @@ eazel_download_progress (EazelInstall *service, if (amount == 0) { gtk_progress_configure (GTK_PROGRESS (progress_single), 0, 0, (float)total); gtk_progress_configure (GTK_PROGRESS (progress_overall), 0, 0, (float)ASSUMED_MAX_DOWNLOAD); - temp = g_strdup_printf ("Getting package \"%s\" ", name); + temp = g_strdup_printf ("Getting package \"%s\" ", package->name); gtk_label_set_text (GTK_LABEL (label_single), temp); g_free (temp); installer->last_KB = 0; @@ -913,6 +919,8 @@ get_detailed_errors_foreach (PackageData *pack, GetErrorsForEachData *data) previous_pack = (PackageData*)(data->path->data); } + log_debug ("pack->name = %s, pack->status = %d", pack->name, pack->status); + /* is this the right place for this check anymore? */ if (pack->status == PACKAGE_CANNOT_OPEN) { /* check if the package we could not open was in categories, since @@ -967,8 +975,11 @@ get_detailed_errors (const PackageData *pack, EazelInstaller *installer) { GetErrorsForEachData data; PackageData *non_const_pack; + char *name; - log_debug ("error tree traversal begins."); + name = packagedata_get_readable_name (pack); + log_debug ("error tree traversal begins: errant package %s", name); + g_free (name); if (eazel_install_failed_because_of_disk_full (installer->service)) { installer->failure_info = g_list_prepend (installer->failure_info, @@ -1036,16 +1047,16 @@ uninstall_failed (EazelInstall *service, static void download_failed (EazelInstall *service, - const char *name, + const PackageData *package, EazelInstaller *installer) { char *temp; if (! eazel_install_failed_because_of_disk_full (service)) { - temp = g_strdup_printf (_("Download of %s failed"), name); + temp = g_strdup_printf (_("Download of %s failed"), package->name); installer->failure_info = g_list_append (installer->failure_info, temp); } - g_message ("Download FAILED for %s", name); + g_message ("Download FAILED for %s", package->name); } static gboolean @@ -1065,10 +1076,12 @@ eazel_install_preflight (EazelInstall *service, char *temp; int total_mb; +#if 0 if (strcmp (((PackageData *)(packages->data))->name, "eazel-hacking") != 0) { jump_to_package_tree_page (installer, (GList *)packages); while (1) { while (gtk_events_pending ()) { gtk_main_iteration (); } } } +#endif label_single = gtk_object_get_data (GTK_OBJECT (installer->window), "download_label"); label_single_2 = gtk_object_get_data (GTK_OBJECT (installer->window), "download_label_2"); @@ -1100,7 +1113,7 @@ eazel_install_preflight (EazelInstall *service, if (installer->uninstalling) { temp = g_strdup_printf (_("Uninstalling 1 package")); } else { - temp = g_strdup_printf (_("Installing 1 package (%d MB)"), total_mb); + temp = g_strdup_printf (_("Downloading 1 package (%d MB)"), total_mb); /* surprise! we're 50% done now! */ gtk_progress_configure (GTK_PROGRESS (progress_overall), 50.0, 0.0, 100.0); } @@ -1109,7 +1122,7 @@ eazel_install_preflight (EazelInstall *service, temp = g_strdup_printf (_("Uninstalling %d packages"), num_packages); gtk_progress_configure (GTK_PROGRESS (progress_overall), 0.0, 0.0, 100.0); } else { - temp = g_strdup_printf (_("Installing %d packages (%d MB)"), num_packages, total_mb); + temp = g_strdup_printf (_("Downloading %d packages (%d MB)"), num_packages, total_mb); /* surprise! we're 50% done now! */ gtk_progress_configure (GTK_PROGRESS (progress_overall), 50.0, 0.0, 100.0); } @@ -1118,6 +1131,9 @@ eazel_install_preflight (EazelInstall *service, log_debug ("PREFLIGHT: %s", temp); g_free (temp); + installer->total_packages = num_packages; + installer->total_mb = total_mb; + while (gtk_events_pending ()) { gtk_main_iteration (); } @@ -1131,20 +1147,22 @@ eazel_install_dep_check (EazelInstall *service, const PackageData *needs, EazelInstaller *installer) { - GtkWidget *label_overall; + GtkWidget *label_single; char *temp; + char *original = packagedata_get_readable_name (pack); char *required = packagedata_get_readable_name (needs); - label_overall = gtk_object_get_data (GTK_OBJECT (installer->window), "label_overall"); + label_single = gtk_object_get_data (GTK_OBJECT (installer->window), "download_label"); /* careful: this needs->name is not always a package name (sometimes it's a filename) */ - temp = g_strdup_printf ("%s is required by %s", required, pack->name); - gtk_label_set_text (GTK_LABEL (label_overall), temp); + temp = g_strdup_printf ("Getting information about %s ...", original); + gtk_label_set_text (GTK_LABEL (label_single), temp); + g_free (temp); - log_debug ("DEP CHECK : %s", temp); + log_debug ("Dependency: %s needs %s", original, required); installer->got_dep_check = TRUE; - g_free (temp); g_free (required); + g_free (original); while (gtk_events_pending ()) { gtk_main_iteration (); diff --git a/nautilus-installer/src/installer.h b/nautilus-installer/src/installer.h index 53c3ab513..a7bc72ff0 100644 --- a/nautilus-installer/src/installer.h +++ b/nautilus-installer/src/installer.h @@ -88,6 +88,9 @@ struct _EazelInstaller gboolean got_dep_check; GList *packages_possible_broken; + + int total_packages; + int total_mb; }; GtkType eazel_installer_get_type(void); diff --git a/nautilus-installer/src/main.c b/nautilus-installer/src/main.c index 2a68499f4..27bc166e2 100644 --- a/nautilus-installer/src/main.c +++ b/nautilus-installer/src/main.c @@ -1,6 +1,6 @@ /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ /* - * Copyright (C) 2000 Eazel, Inc + * Copyright (C) 2000, 2001 Eazel, Inc * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -18,6 +18,7 @@ * Boston, MA 02111-1307, USA. * * Authors: Eskil Heyn Olsen <eskil@eazel.com> + * Robey Poiner <robey@eazel.com> */ #ifdef HAVE_CONFIG_H @@ -33,6 +34,7 @@ #include <pwd.h> #include <sys/types.h> #include <sys/vfs.h> +#include <signal.h> #include <gnome.h> #include "installer.h" @@ -117,6 +119,15 @@ check_disk_space (void) } } +static void +segv_handler (int unused) +{ + fprintf (stderr, "\n\nSEGV -- CRASH BOOM, THE INSTALLER IS HOSED.\n\n"); + while (1) { + sleep (1); + } +} + int main (int argc, char *argv[]) { @@ -142,6 +153,8 @@ main (int argc, char *argv[]) } gnome_init_with_popt_table ("eazel-installer", VERSION, argc, argv, options, 0, NULL); + + signal (SIGSEGV, segv_handler); gdk_rgb_init (); if (installer_show_build) { diff --git a/nautilus-installer/src/prescript b/nautilus-installer/src/prescript index ebbe35c19..66c75f225 100644 --- a/nautilus-installer/src/prescript +++ b/nautilus-installer/src/prescript @@ -28,7 +28,7 @@ fi if test "x$botan_rice_candy" = "x" -a "x$QUICK" '!=' "xyes"; then # blurp echo "" - echo "Eazel Installer PR2" + echo "Eazel Installer 0.9" echo "" if test "x$PR1_TO_PR2" = "xyes"; then echo "Your PR1 setttings will be moved to ~/.nautilus.pr2.backup..." @@ -37,12 +37,13 @@ if test "x$botan_rice_candy" = "x" -a "x$QUICK" '!=' "xyes"; then fi if test $UID -ne 0 -a "x$QUICK" '!=' "xyes"; then - echo "Eazel Installer requires superuser (root) access to prepare the system" - echo "and to install packages." + echo "To use the Eazel installer, you need superuser (root) access to your system." + echo "If you are prompted for your root password, please enter it to login as the" + echo "superuser. The root password is used only on your local machine, and is not" + echo "transmitted to Eazel or any other party." echo "" # Start - echo "Please enter root password at the prompt (if you're asked to)..." xhost +localhost /bin/su -s /bin/sh -c "$params && $export && cd $PWD && echo Uncompressing... && /bin/sh $0 $* --user $USER" xhost -localhost |