diff options
author | Eskil Heyn Olsen <eskil@src.gnome.org> | 2000-08-22 08:35:07 +0000 |
---|---|---|
committer | Eskil Heyn Olsen <eskil@src.gnome.org> | 2000-08-22 08:35:07 +0000 |
commit | 6f066fd4c994d0f022d185824f8b6a32cb6594b5 (patch) | |
tree | 1e7e045fdac2be22f3478b102e25e5756c13aac8 /nautilus-installer | |
parent | 9c25e46f24cbf6d85da33a4f8d4f41dfc79a6dd4 (diff) | |
download | nautilus-6f066fd4c994d0f022d185824f8b6a32cb6594b5.tar.gz |
Print package name in front of install status
* components/services/install/lib/eazel-install-rpm-glue.c:
(install_all_packages),
Print package name in front of install status
(eazel_install_do_transaction_save_report),
(eazel_install_monitor_rpm_propcess_pipe),
Use transaction even when EAZEL_INSTALL_SLIM is defined. The lets
the bootstrap installer save a transaction for the install of
nautilus.
(eazel_install_prune_packages),
indention fix
(eazel_install_fetch_rpm_dependencies),
When EAZEL_INSTALL_SLIM, ignore lib dep problems. This is a temp
fix while the installer does not use SoftCat
(print_package_list)
Horrible mem mishandling
* nautilus-installer/src/Makefile:
* nautilus-installer/src/Makefile.am:
Added -EAZEL_INSTALL_SLIM and -DNO_TEXT_BOX to the makefile
* nautilus-installer/src/callbacks.c: (begin_install):
After install, jump to next page
* nautilus-installer/src/installer.c: (eazel_install_progress),
, (eazel_install_dep_check), (check_system),
(installer),
Use the gtk_label instead of a gtk_text thingy.
(install_failed_helper):
Fixed output format
* nautilus-installer/src/interface.c: (create_what_to_do_page):
* nautilus-installer/src/main.c:
Added the --force option, to force install.
Diffstat (limited to 'nautilus-installer')
-rw-r--r-- | nautilus-installer/src/Makefile | 8 | ||||
-rw-r--r-- | nautilus-installer/src/Makefile.am | 2 | ||||
-rw-r--r-- | nautilus-installer/src/callbacks.c | 5 | ||||
-rw-r--r-- | nautilus-installer/src/installer.c | 53 | ||||
-rw-r--r-- | nautilus-installer/src/interface.c | 4 | ||||
-rw-r--r-- | nautilus-installer/src/main.c | 2 |
6 files changed, 47 insertions, 27 deletions
diff --git a/nautilus-installer/src/Makefile b/nautilus-installer/src/Makefile index fd816ab71..d4b1377b0 100644 --- a/nautilus-installer/src/Makefile +++ b/nautilus-installer/src/Makefile @@ -66,7 +66,7 @@ BONOBO_CFLAGS = -I/gnome/include -DNEED_GNOMESUPPORT_H -I/gnome/lib/gnome-libs/i BONOBO_LIBS = -rdynamic -L/gnome/lib -L/usr/X11R6/lib -L/usr/lib -lbonobo -lgdk_pixbuf -ltiff -ljpeg -lpng -lgnomeprint -lgnomeui -lart_lgpl -lgdk_imlib -lSM -lICE -lgtk -lgdk -lgmodule -lXext -lX11 -lgnome -lgnomesupport -lesd -laudiofile -ldb1 -ldl -lxml -lz -loaf -lORBitCosNaming -lORBit -lIIOP -lORBitutil -lglib -lnsl -lm BONOBO_PRINT_CFLAGS = BONOBO_PRINT_LIBS = -CATALOGS = da.gmo de.gmo fr.gmo gl.gmo ja.gmo ko.gmo no.gmo ru.gmo sv.gmo tr.gmo zh_TW.Big5.gmo +CATALOGS = da.gmo de.gmo fr.gmo gl.gmo it.gmo ja.gmo ko.gmo no.gmo pt_BR.gmo ru.gmo sv.gmo tr.gmo zh_TW.Big5.gmo CATOBJEXT = .gmo CC = gcc CPP = gcc -E @@ -87,7 +87,7 @@ GHTTP_LIBS = -L/gnome/lib -lghttp GLIB_CFLAGS = -I/gnome/lib/glib/include -I/gnome/include GLIB_CONFIG = /gnome/bin/glib-config GLIB_LIBS = -L/gnome/lib -lglib -GMOFILES = da.gmo de.gmo fr.gmo gl.gmo ja.gmo ko.gmo no.gmo ru.gmo sv.gmo tr.gmo zh_TW.Big5.gmo +GMOFILES = da.gmo de.gmo fr.gmo gl.gmo it.gmo ja.gmo ko.gmo no.gmo pt_BR.gmo ru.gmo sv.gmo tr.gmo zh_TW.Big5.gmo GMSGFMT = /usr/bin/msgfmt GNOMECANVASPIXBUF_INCLUDEDIR = GNOMECANVASPIXBUF_LIBS = -rdynamic -L/gnome/lib -L/usr/X11R6/lib -lgdk_pixbuf -ltiff -ljpeg -lpng -lz -lgtk -lgdk -lgmodule -lglib -ldl -lXext -lX11 -lm -lgnomecanvaspixbuf @@ -137,7 +137,7 @@ ORBIT_IDL = /gnome/bin/orbit-idl ORBIT_LIBS = -L/gnome/lib -lORBit -lIIOP -lORBitutil -lglib -lnsl -lm PACKAGE = nautilus PAM_LIBS = -ldl -lpam -lpam_misc -POFILES = da.po de.po fr.po gl.po ja.po ko.po no.po ru.po sv.po tr.po zh_TW.Big5.po +POFILES = da.po de.po fr.po gl.po it.po ja.po ko.po no.po pt_BR.po ru.po sv.po tr.po zh_TW.Big5.po POSUB = po RANLIB = ranlib RPM_LIBS = -lrpm -lz -lbz2 -lpopt -ldb @@ -159,7 +159,7 @@ NULL = INCLUDES = -I$(top_srcdir)/components/services/install/lib -I$(top_srcdir)/components/services/trilobite -I/usr/include/rpm $(GNOMEUI_CFLAGS) $(XML_CFLAGS) $(GHTTP_CFLAGS) $(GNOME_INCLUDEDIR) -DGNOMELOCALEDIR=\""$(datadir)/locale"\" -DG_LOG_DOMAIN=\"Nautilus-Installer\" $(NULL) -CPPFLAGS = -DEAZEL_INSTALL_NO_CORBA +CPPFLAGS = -DEAZEL_INSTALL_NO_CORBA -DEAZEL_INSTALL_SLIM -DNO_TEXT_BOX CFLAGS = -g diff --git a/nautilus-installer/src/Makefile.am b/nautilus-installer/src/Makefile.am index 78758bf40..46b695c2b 100644 --- a/nautilus-installer/src/Makefile.am +++ b/nautilus-installer/src/Makefile.am @@ -14,7 +14,7 @@ INCLUDES = \ -DG_LOG_DOMAIN=\"Nautilus-Installer\" \ $(NULL) -CPPFLAGS = -DEAZEL_INSTALL_NO_CORBA +CPPFLAGS = -DEAZEL_INSTALL_NO_CORBA -DEAZEL_INSTALL_SLIM -DNO_TEXT_BOX CFLAGS = -g ##LDFLAGS = -static diff --git a/nautilus-installer/src/callbacks.c b/nautilus-installer/src/callbacks.c index e24b88d05..4c7827a3d 100644 --- a/nautilus-installer/src/callbacks.c +++ b/nautilus-installer/src/callbacks.c @@ -49,8 +49,10 @@ gboolean begin_install (gpointer window) { GnomeDruid *druid; + GnomeDruidPage *nextpage; druid = GNOME_DRUID (gtk_object_get_data (GTK_OBJECT (window), "druid")); + nextpage = GNOME_DRUID_PAGE (gtk_object_get_data (GTK_OBJECT (window), "finish_page")); gnome_druid_set_buttons_sensitive(druid,TRUE,FALSE,TRUE); if (GTK_TOGGLE_BUTTON (gtk_object_get_data (GTK_OBJECT (window), @@ -73,9 +75,10 @@ begin_install (gpointer window) "uninstall_button"))->active) { g_message ("uninstall"); installer (window, UNINSTALL); - } + } gnome_druid_set_buttons_sensitive(druid,TRUE,TRUE,TRUE); + gnome_druid_set_page (druid, nextpage); return FALSE; } diff --git a/nautilus-installer/src/installer.c b/nautilus-installer/src/installer.c index d3ffc6d5c..a8db52347 100644 --- a/nautilus-installer/src/installer.c +++ b/nautilus-installer/src/installer.c @@ -58,6 +58,7 @@ static char *package_list[LAST] = { static char *failure_info = NULL; int installer_debug = 0; int installer_test = 0; +int installer_force = 0; int installer_local = 0; static void @@ -92,9 +93,9 @@ eazel_install_progress (EazelInstall *service, gtk_text_get_length (GTK_TEXT (summary))); gtk_text_insert (GTK_TEXT (summary), NULL, NULL, NULL, - package->description, strlen (package->summary)); + package->description, strlen (package->description)); #endif - + fprintf (stdout, "\n"); } if (installer_debug) { @@ -173,42 +174,48 @@ install_failed_helper (EazelInstall *service, if (pd->toplevel) { char *tmp; - tmp = g_strdup_printf ("%s\n***The package %s failed. Here's the dep tree\n", *str, pd->name); + tmp = g_strdup_printf ("%s\n***The package %s failed. Here's the dep tree\n", + (*str)?*str:"", pd->name); g_free (*str); (*str) = tmp; } switch (pd->status) { case PACKAGE_DEPENDENCY_FAIL: { char *tmp; - tmp = g_strdup_printf ("%s%s-%s failed\n", *str, indent, rpmfilename_from_packagedata (pd)); + tmp = g_strdup_printf ("%s%s-%s failed\n", + (*str)?*str:"", indent, rpmfilename_from_packagedata (pd)); g_free (*str); (*str) = tmp; break; } case PACKAGE_CANNOT_OPEN: { char *tmp; - tmp = g_strdup_printf ("%s%s-%s NOT FOUND\n", *str, indent, rpmfilename_from_packagedata (pd)); + tmp = g_strdup_printf ("%s%s-%s NOT FOUND\n", + (*str)?*str:"", indent, rpmfilename_from_packagedata (pd)); g_free (*str); (*str) = tmp; break; } case PACKAGE_SOURCE_NOT_SUPPORTED: { char *tmp; - tmp = g_strdup_printf ("%s%s-%s is a source\n", *str, indent, rpmfilename_from_packagedata (pd)); + tmp = g_strdup_printf ("%s%s-%s is a source\n", + (*str)?*str:"", indent, rpmfilename_from_packagedata (pd)); g_free (*str); (*str) = tmp; break; } case PACKAGE_BREAKS_DEPENDENCY: { char *tmp; - tmp = g_strdup_printf ("%s%s-%s breaks\n", *str, indent, rpmfilename_from_packagedata (pd)); + tmp = g_strdup_printf ("%s%s-%s breaks\n", + (*str)?*str:"", indent, rpmfilename_from_packagedata (pd)); g_free (*str); (*str) = tmp; break; } default: { char *tmp; - tmp = g_strdup_printf ("%s%s-%s\n", *str, indent, rpmfilename_from_packagedata (pd)); + tmp = g_strdup_printf ("%s%s-%s\n", + (*str)?*str:"", indent, rpmfilename_from_packagedata (pd)); g_free (*str); (*str) = tmp; break; @@ -304,21 +311,33 @@ eazel_install_dep_check (EazelInstall *service, const PackageData *needs, GtkWidget *widget) { - GtkLabel *action_label; GtkLabel *package_label; + GtkWidget *summary; char *tmp; - action_label = gtk_object_get_data (GTK_OBJECT (widget), "action_label"); package_label = gtk_object_get_data (GTK_OBJECT (widget), "package_label"); + summary = gtk_object_get_data (GTK_OBJECT (widget), "summary"); - tmp = g_strdup_printf ("%s needs %d", pack->name, needs->name); + tmp = g_strdup_printf ("%s needs %s", pack->name, needs->name); if (installer_debug) { fprintf (stdout, "DEP CHECK : %s\n", tmp); } - gtk_label_set_text (action_label, "Dep check :"); gtk_label_set_text (package_label, tmp); + g_free (tmp); + tmp = g_strdup_printf ("Fetching dependencies for %s", pack->name); + +#ifdef NO_TEXT_BOX + gtk_label_set_text (GTK_LABEL (summary), tmp); +#else + gtk_text_backward_delete (GTK_TEXT (summary), + gtk_text_get_length (GTK_TEXT (summary))); + gtk_text_insert (GTK_TEXT (summary), + NULL, NULL, NULL, + tmp, strlen (tmp)); +#endif + g_free (tmp); g_main_iteration (FALSE); } @@ -376,7 +395,6 @@ check_system (GtkWidget *window) } #endif - g_message ("checking for rehat"); if (dist.name != DISTRO_REDHAT) { GnomeDialog *d; d = GNOME_DIALOG (gnome_warning_dialog_parented (_("This preview installer only works\n" @@ -426,10 +444,6 @@ void installer (GtkWidget *window, GtkLabel *package_label; GtkLabel *action_label; */ - if (method==UPGRADE) { - gnome_warning_dialog ("We don't do UPGRADE yet"); - return; - } /* We set force, update and downgrade to true. */ service = EAZEL_INSTALL (gtk_object_new (TYPE_EAZEL_INSTALL, @@ -437,7 +451,7 @@ void installer (GtkWidget *window, "silent", FALSE, "debug", TRUE, "test", installer_test ? TRUE : FALSE, - "force", FALSE, + "force", installer_force ? TRUE : FALSE, "depend", FALSE, "update", TRUE, "uninstall", method==UNINSTALL ? TRUE : FALSE, @@ -453,6 +467,9 @@ void installer (GtkWidget *window, NULL)); g_assert (service != NULL); + g_free (failure_info); + failure_info = NULL; + if (!installer_debug) { eazel_install_open_log (service, "/tmp/nautilus-install.log"); } diff --git a/nautilus-installer/src/interface.c b/nautilus-installer/src/interface.c index b965fc613..36dacbf5f 100644 --- a/nautilus-installer/src/interface.c +++ b/nautilus-installer/src/interface.c @@ -128,19 +128,17 @@ create_what_to_do_page (GtkWidget *druid, GtkWidget *window) gtk_widget_set_uposition (nautilus_only_button, 72, 56); gtk_widget_set_usize (nautilus_only_button, 0, 0); -/* services_only_button = gtk_radio_button_new_with_label (fixed3_group, _("*")); fixed3_group = gtk_radio_button_group (GTK_RADIO_BUTTON (services_only_button)); gtk_widget_set_name (services_only_button, "services_only_button"); gtk_widget_ref (services_only_button); gtk_object_set_data_full (GTK_OBJECT (window), "services_only_button", services_only_button, (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (services_only_button); + /* gtk_widget_show (services_only_button); */ gtk_fixed_put (GTK_FIXED (fixed3), services_only_button, 72, 88); gtk_widget_set_uposition (services_only_button, 72, 88); gtk_widget_set_usize (services_only_button, 0, 0); gtk_widget_set_sensitive (GTK_WIDGET (services_only_button), FALSE); -*/ upgrade_button = gtk_radio_button_new_with_label (fixed3_group, _("Latest RPM Build")); fixed3_group = gtk_radio_button_group (GTK_RADIO_BUTTON (upgrade_button)); diff --git a/nautilus-installer/src/main.c b/nautilus-installer/src/main.c index 563513982..f8816b95b 100644 --- a/nautilus-installer/src/main.c +++ b/nautilus-installer/src/main.c @@ -33,11 +33,13 @@ extern int installer_debug; extern int installer_test; +extern int installer_force; extern char* installer_local; static const struct poptOption options[] = { {"debug", 'd', POPT_ARG_NONE, &installer_debug, 0 , N_("Show debug output"), NULL}, {"test", 't', POPT_ARG_NONE, &installer_test, 0, N_("Test run"), NULL}, + {"force", 'f', POPT_ARG_NONE, &installer_force, 0, N_("Forced install"), NULL}, {"local", '\0', POPT_ARG_STRING, &installer_local, 0, N_("Use local, specify xml file to yse"), NULL}, {NULL, '\0', 0, NULL, 0} }; |