diff options
author | Robey Pointer <robey@src.gnome.org> | 2001-02-08 01:27:58 +0000 |
---|---|---|
committer | Robey Pointer <robey@src.gnome.org> | 2001-02-08 01:27:58 +0000 |
commit | b99145c84e6328d5f8060500474ab416caf9ed6d (patch) | |
tree | 1eca3b2058c05a3ca912a57d3de4601db4dfe095 | |
parent | f41ecd8c8383950dc63e8a0b04699ca67f374f46 (diff) | |
download | nautilus-b99145c84e6328d5f8060500474ab416caf9ed6d.tar.gz |
Remove break that caused 0% signals to never get sent on install.
* components/services/install/lib/eazel-install-object.c:
(eazel_install_start_signal):
Remove break that caused 0% signals to never get sent on install.
* components/services/install/lib/eazel-package-system-rpm3.c:
(rpmmonitorpiggybag_new), (make_rpm_argument_list),
(monitor_rpm_process_pipe_percent_output),
(monitor_rpm_process_pipe), (monitor_subcommand_pipe),
(manual_rpm_command), (eazel_package_system_rpm3_execute):
Make percent a float for more accurate byte counts. Give the IO
channel a lower priority than normal, so that it doesn't outrank X
refresh events (though this doesn't help much). Reinsert the
manual RPM execute from the old logic.c code.
* nautilus-installer/src/installer.c: (insert_info_page),
(eazel_install_progress), (eazel_download_progress),
(get_detailed_errors_foreach_dep), (get_detailed_errors_foreach),
(get_detailed_errors), (collect_failure_info),
(eazel_install_preflight):
* nautilus-installer/src/installer.h:
Remove fixed "max assumed download" size and try to set it to the
total bytes expected. For some reason this still fails sometimes
but at least it's on the right track. Stop calling
gtk_main_iteration from inside the install progress callback since
that interacts horribly with the IO channel crap. Getting
detailed errors should avoid recursing, and should follow the
depends struct instead of the old soft_depends one.
* nautilus-installer/src/link.sh:
Test for RPM4 build (should build now, but still not work due to
lingering code that refuses to try under RPM4).
* nautilus-installer/src/package-tree.c: (get_errant_children_int),
(get_errant_children), (package_customizer_fill):
Fix up tree tracing routines to avoid recursing and to use the new
struct members instead of the old (now empty) ones.
-rw-r--r-- | ChangeLog | 44 | ||||
-rw-r--r-- | components/services/install/lib/eazel-install-object.c | 1 | ||||
-rw-r--r-- | components/services/install/lib/eazel-package-system-rpm3.c | 124 | ||||
-rw-r--r-- | nautilus-installer/src/installer.c | 71 | ||||
-rw-r--r-- | nautilus-installer/src/installer.h | 1 | ||||
-rwxr-xr-x | nautilus-installer/src/link.sh | 20 | ||||
-rw-r--r-- | nautilus-installer/src/package-tree.c | 18 |
7 files changed, 217 insertions, 62 deletions
@@ -1,3 +1,47 @@ +2001-02-07 Robey Pointer <robey@eazel.com> + + * components/services/install/lib/eazel-install-object.c: + (eazel_install_start_signal): + + Remove break that caused 0% signals to never get sent on install. + + * components/services/install/lib/eazel-package-system-rpm3.c: + (rpmmonitorpiggybag_new), (make_rpm_argument_list), + (monitor_rpm_process_pipe_percent_output), + (monitor_rpm_process_pipe), (monitor_subcommand_pipe), + (manual_rpm_command), (eazel_package_system_rpm3_execute): + + Make percent a float for more accurate byte counts. Give the IO + channel a lower priority than normal, so that it doesn't outrank X + refresh events (though this doesn't help much). Reinsert the + manual RPM execute from the old logic.c code. + + * nautilus-installer/src/installer.c: (insert_info_page), + (eazel_install_progress), (eazel_download_progress), + (get_detailed_errors_foreach_dep), (get_detailed_errors_foreach), + (get_detailed_errors), (collect_failure_info), + (eazel_install_preflight): + * nautilus-installer/src/installer.h: + + Remove fixed "max assumed download" size and try to set it to the + total bytes expected. For some reason this still fails sometimes + but at least it's on the right track. Stop calling + gtk_main_iteration from inside the install progress callback since + that interacts horribly with the IO channel crap. Getting + detailed errors should avoid recursing, and should follow the + depends struct instead of the old soft_depends one. + + * nautilus-installer/src/link.sh: + + Test for RPM4 build (should build now, but still not work due to + lingering code that refuses to try under RPM4). + + * nautilus-installer/src/package-tree.c: (get_errant_children_int), + (get_errant_children), (package_customizer_fill): + + Fix up tree tracing routines to avoid recursing and to use the new + struct members instead of the old (now empty) ones. + 2001-02-07 John Sullivan <sullivan@eazel.com> reviewed by: Pavel Cisler <pavel@eazel.com> diff --git a/components/services/install/lib/eazel-install-object.c b/components/services/install/lib/eazel-install-object.c index c46c83d4b..1d0a800d2 100644 --- a/components/services/install/lib/eazel-install-object.c +++ b/components/services/install/lib/eazel-install-object.c @@ -235,7 +235,6 @@ eazel_install_start_signal (EazelPackageSystem *system, service->private->infoblock[2]++; switch (op) { case EAZEL_PACKAGE_SYSTEM_OPERATION_INSTALL: - break; case EAZEL_PACKAGE_SYSTEM_OPERATION_UNINSTALL: eazel_install_emit_install_progress (service, pack, diff --git a/components/services/install/lib/eazel-package-system-rpm3.c b/components/services/install/lib/eazel-package-system-rpm3.c index 0bc5ba85f..9173ef6ef 100644 --- a/components/services/install/lib/eazel-package-system-rpm3.c +++ b/components/services/install/lib/eazel-package-system-rpm3.c @@ -47,6 +47,7 @@ #ifdef HAVE_RPM #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> @@ -101,7 +102,7 @@ struct RpmMonitorPiggyBag { GString *package_name; #endif PackageData *pack; - int pct; + double pct; GHashTable *name_to_package; @@ -123,12 +124,13 @@ rpmmonitorpiggybag_new (EazelPackageSystemRpm3 *system, trilobite_debug ("I am in in a %c country", pig.separator); pig.state = 1; pig.bytes_read_in_line = 0; + pig.line[0] = '\0'; pig.package_name = NULL; #else pig.pack = NULL; pig.package_name = NULL; #endif - pig.pct = 0; + pig.pct = 0.0; pig.system = system; pig.op = op; @@ -207,9 +209,6 @@ make_rpm_argument_list (EazelPackageSystemRpm3 *system, if (op == EAZEL_PACKAGE_SYSTEM_OPERATION_UNINSTALL) { (*args) = g_list_prepend (*args, g_strdup ("-e")); } else { -#ifdef USE_PERCENT - (*args) = g_list_prepend (*args, g_strdup ("--percent")); -#endif if (flags & EAZEL_PACKAGE_SYSTEM_OPERATION_DOWNGRADE) { (*args) = g_list_prepend (*args, g_strdup ("--oldpackage")); } @@ -296,11 +295,15 @@ monitor_rpm_process_pipe_percent_output (GIOChannel *source, { char tmp; ssize_t bytes_read; - gboolean result = TRUE; bytes_read = 0; g_io_channel_read (source, &tmp, 1, &bytes_read); - + + if (! bytes_read) { + pig->subcommand_running = FALSE; + return FALSE; + } + if (bytes_read) { if (isspace (tmp)) { switch (pig->state) { @@ -309,7 +312,7 @@ monitor_rpm_process_pipe_percent_output (GIOChannel *source, g_free (pig->package_name); } /* Reset */ - pig->pct = 0; + pig->pct = 0.0; pig->package_name = g_strdup (pig->line); pig->pack = g_hash_table_lookup (pig->name_to_package, pig->package_name); @@ -360,28 +363,24 @@ monitor_rpm_process_pipe_percent_output (GIOChannel *source, pig->state = 2; } - break; case 2: if (strncmp (pig->line, "%%", 2) == 0) { pig->state = 3; - } + } break; + case 3: { - char *dot; - int pct; + double pct; /* Assume we don't go to state 1 */ pig->state = 2; - /* Remove the decimal crap */ - dot = strchr (pig->line, pig->separator); - if (dot) { - *dot = 0; - } /* Grab the percentage */ - pct = atol (pig->line); + pct = strtod (pig->line, NULL); + /* fix rounding errors */ + pct = ((int)(pct*1000))/1000.0; /* Higher ? */ if (pct > pig->pct) { @@ -389,10 +388,10 @@ monitor_rpm_process_pipe_percent_output (GIOChannel *source, int amount; pig->pct = pct; - if (pig->pct == 100) { + if (pig->pct == 100.0) { amount = pig->pack->bytesize; } else { - amount = (pig->pack->bytesize/100) * pig->pct; + amount = (int)((pig->pack->bytesize * pig->pct) / 100.0); } longs[0] = amount; @@ -406,8 +405,9 @@ monitor_rpm_process_pipe_percent_output (GIOChannel *source, pig->op, pig->pack, longs); + /* Done with package ? */ - if (pig->pct==100) { + if (pig->pct == 100.0) { pig->state = 1; pig->bytes_installed += pig->pack->bytesize; pig->packages_seen = g_list_prepend (pig->packages_seen, @@ -419,7 +419,7 @@ monitor_rpm_process_pipe_percent_output (GIOChannel *source, g_free (pig->package_name); pig->package_name = NULL; pig->pack = NULL; - pig->pct = 0; + pig->pct = 0.0; } } @@ -439,12 +439,10 @@ monitor_rpm_process_pipe_percent_output (GIOChannel *source, pig->line[pig->bytes_read_in_line] = '\0'; } } - } else { - result = FALSE; } - - pig->subcommand_running = result; - return result; + + pig->subcommand_running = TRUE; + return TRUE; } #endif @@ -470,10 +468,10 @@ monitor_rpm_process_pipe (GIOChannel *source, return TRUE; } pig->pct += PERCENTS_PER_RPM_HASH; - if (pig->pct == 100) { + if (pig->pct == 100.0) { amount = pig->pack->bytesize; } else { - amount = (pig->pack->bytesize / 100) * pig->pct; + amount = (int)((pig->pack->bytesize * pig->pct)/100.0); } if (pig->pack && amount) { unsigned long longs[EAZEL_PACKAGE_SYSTEM_PROGRESS_LONGS]; @@ -493,7 +491,7 @@ monitor_rpm_process_pipe (GIOChannel *source, /* By invalidating the pointer here, we only emit with amount==total once and also emit end here */ - if (pig->pct==100) { + if (pig->pct == 100.0) { pig->bytes_installed += pig->pack->bytesize; pig->packages_seen = g_list_prepend (pig->packages_seen, pig->pack); @@ -503,7 +501,7 @@ monitor_rpm_process_pipe (GIOChannel *source, pig->pack); pig->pack = NULL; - pig->pct = 0; + pig->pct = 0.0; g_string_free (pig->package_name, TRUE); pig->package_name = NULL; } @@ -556,7 +554,7 @@ monitor_rpm_process_pipe (GIOChannel *source, } else { unsigned long longs[EAZEL_PACKAGE_SYSTEM_PROGRESS_LONGS]; info (pig->system, "matched \"%s\"", pig->package_name->str); - pig->pct = 0; + pig->pct = 0.0; pig->packages_installed ++; longs[0] = 0; @@ -1257,16 +1255,64 @@ monitor_subcommand_pipe (EazelPackageSystemRpm3 *system, channel = g_io_channel_unix_new (fd); info (system, "beginning monitor on %d", fd); - g_io_add_watch (channel, G_IO_IN | G_IO_ERR | G_IO_NVAL | G_IO_HUP, - monitor_func, - pig); + g_io_add_watch_full (channel, 10, G_IO_IN | G_IO_ERR | G_IO_NVAL | G_IO_HUP, + monitor_func, + pig, NULL); while (pig->subcommand_running) { - g_main_iteration (TRUE); +#if 0 + /* this is evil and it still doesn't work, so foo. */ + while (gdk_events_pending ()) { + gtk_main_do_event (gdk_event_get ()); + } +#endif + gtk_main_iteration (); } info (system, "ending monitor on %d", fd); } +/* returns TRUE on success */ +static gboolean +manual_rpm_command (GList *args, int *fd) +{ + char **argv; + int i, errfd, child_pid; + GList *iterator; + gboolean result; + + /* Create argv list */ + argv = g_new0 (char*, g_list_length (args) + 2); + argv[0] = g_strdup ("rpm"); + i = 1; + for (iterator = args; iterator; iterator = g_list_next (iterator)) { + argv[i] = g_strdup (iterator->data); + i++; + } + argv[i] = NULL; + + if (access ("/bin/rpm", R_OK|X_OK)!=0) { + g_warning ("/bin/rpm missing or not executable for uid"); + result = FALSE; + goto out; + } + /* start /bin/rpm... */ + if ((child_pid = trilobite_pexec ("/bin/rpm", argv, NULL, fd, &errfd)) == 0) { + g_warning ("Could not start rpm"); + result = FALSE; + } else { + trilobite_debug ("/bin/rpm running (pid %d, stdout %d, stderr %d)", child_pid, *fd, errfd); + //close (errfd); + result = TRUE; + } + +out: + for (i = 0; argv[i]; i++) { + g_free (argv[i]); + } + g_free (argv); + return result; +} + static void eazel_package_system_rpm3_execute (EazelPackageSystemRpm3 *system, struct RpmMonitorPiggyBag *pig, @@ -1294,10 +1340,8 @@ eazel_package_system_rpm3_execute (EazelPackageSystemRpm3 *system, go = FALSE; } } else { - /* FIXME: - ugh, start /bin/rpm manually, see code in eazel-install-logic.c rev 1.26 */ - g_assert (root_helper); - go = FALSE; + /* start /bin/rpm manually -- we're in bootstrap installer mode */ + go = manual_rpm_command (args, &fd); } if (go) { #ifdef USE_PERCENT diff --git a/nautilus-installer/src/installer.c b/nautilus-installer/src/installer.c index 894960cb5..b785a5b36 100644 --- a/nautilus-installer/src/installer.c +++ b/nautilus-installer/src/installer.c @@ -90,9 +90,6 @@ static const char untranslated_font_little[] = N_("-adobe-helvetica-medium-r-nor #define ERROR_SYMBOL_X 67 #define ERROR_SYMBOL_Y 59 -#define ASSUMED_MAX_DOWNLOAD (90*1024*1024) /* 90MB assumed to be the max downloaded */ - /* yes, virginia, people actually broke the 50MB limit! */ - /* as of nov 2000, typical redhat 6.0 system seems to need about 75MB */ static const char untranslated_error_need_to_set_proxy[] = N_("I can't reach the Eazel servers. This could be because the\n" @@ -554,7 +551,7 @@ jump_to_error_page (EazelInstaller *installer, GList *bullets, char *text, char static void insert_info_page (EazelInstaller *installer, - char *title_text, + char *title_text, char *info_text) { GtkWidget *info_page; @@ -782,26 +779,46 @@ eazel_install_progress (EazelInstall *service, GtkProgressBar *progressbar, *progress_overall; GtkWidget *label_overall; GtkWidget *label_single; - char *temp; + GtkWidget *label_single_2; + char *temp, *name; double percent; 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"); label_overall = gtk_object_get_data (GTK_OBJECT (installer->window), "label_overall"); progressbar = gtk_object_get_data (GTK_OBJECT (installer->window), "progressbar_single"); progress_overall = gtk_object_get_data (GTK_OBJECT (installer->window), "progressbar_overall"); +#if 0 + if (1) { + struct timeval now; + char *timestamp; + + gettimeofday (&now, NULL); + timestamp = g_malloc (40); + strftime (timestamp, 40, "%d-%b %H:%M:%S", localtime ((time_t *)&now.tv_sec)); + sprintf (timestamp + strlen (timestamp), ".%02ld ", now.tv_usec/10000L); + log_debug ("%s: progress on %s (%d of %d): %d of %d (total %d of %d)", timestamp, package->name, package_num, num_packages, amount, total, total_size_completed, total_size); + g_free (timestamp); + } +#endif if (amount == 0) { - temp = g_strdup_printf (_("Installing the %s package"), package->name); + name = packagedata_get_readable_name (package); + temp = g_strdup_printf (_("Installing %s"), name); + g_free (name); gtk_label_set_text (GTK_LABEL (label_single), temp); g_free (temp); - gtk_progress_configure (GTK_PROGRESS (progressbar), 0, 0, (float)(total/1024)); + gtk_label_set_text (GTK_LABEL (label_single_2), ""); + + gtk_progress_configure (GTK_PROGRESS (progressbar), 0.0, 0.0, 100.0); + gtk_progress_configure (GTK_PROGRESS (progress_overall), 0.0, 0.0, 100.0); g_message ("Installing: %s", package->name); } - gtk_progress_set_value (GTK_PROGRESS (progressbar), - (float)(amount/1024 > total/1024 ? total/1024 : amount/1024)); - percent = (double)(total_size_completed * 50.0) / (total_size ? total_size : 0.1); + percent = (double)((amount * 100.0) / (total ? total : 0.1)); + gtk_progress_set_value (GTK_PROGRESS (progressbar), percent); + percent = (double)((total_size_completed * 50.0) / (total_size ? total_size : 0.1)); percent += 50.0; gtk_progress_set_value (GTK_PROGRESS (progress_overall), percent); @@ -809,9 +826,12 @@ eazel_install_progress (EazelInstall *service, gtk_label_set_text (GTK_LABEL (label_overall), temp); g_free (temp); +#if 0 + /* absolutely cannot do this anymore! */ while (gtk_events_pending ()) { gtk_main_iteration (); } +#endif } @@ -839,7 +859,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); + gtk_progress_configure (GTK_PROGRESS (progress_overall), 0, 0, (float)installer->total_size); temp = g_strdup_printf ("Getting package \"%s\" ", package->name); gtk_label_set_text (GTK_LABEL (label_single), temp); g_free (temp); @@ -893,18 +913,28 @@ add_force_remove (EazelInstaller *installer, } #endif +static void get_detailed_errors_foreach (PackageData *pack, GetErrorsForEachData *data); + +static void +get_detailed_errors_foreach_dep (PackageDependency *dep, GetErrorsForEachData *data) +{ + get_detailed_errors_foreach (dep->package, data); +} + static void get_detailed_errors_foreach (PackageData *pack, GetErrorsForEachData *data) { char *message, *distro; EazelInstaller *installer = data->installer; PackageData *pack_in; - PackageData *previous_pack = NULL; CategoryData *cat; GList *iter, *iter2; - if (data->path) { - previous_pack = PACKAGEDATA (data->path->data); + if (data->path != NULL) { + if (g_list_find (data->path, pack) != NULL) { + /* recursing... */ + return; + } } log_debug ("pack->name = %s, pack->status = %d", pack->name, pack->status); @@ -949,7 +979,7 @@ get_detailed_errors_foreach (PackageData *pack, GetErrorsForEachData *data) /* Create the path list */ data->path = g_list_prepend (data->path, pack); - g_list_foreach (pack->soft_depends, (GFunc)get_detailed_errors_foreach, data); + g_list_foreach (pack->depends, (GFunc)get_detailed_errors_foreach_dep, data); g_list_foreach (pack->modifies, (GFunc)get_detailed_errors_foreach, data); g_list_foreach (pack->breaks, (GFunc)get_detailed_errors_foreach, data); @@ -976,7 +1006,9 @@ get_detailed_errors (const PackageData *pack, EazelInstaller *installer) data.installer = installer; data.path = NULL; log_debug ("copying package"); - non_const_pack = packagedata_copy (pack, TRUE); + non_const_pack = PACKAGEDATA (pack); + gtk_object_ref (GTK_OBJECT (non_const_pack)); + // non_const_pack = packagedata_copy (pack, TRUE); log_debug ("getting detailed errors"); get_detailed_errors_foreach (non_const_pack, &data); log_debug ("destroying copy"); @@ -991,11 +1023,13 @@ collect_failure_info (EazelInstall *service, gboolean uninstall) { GList *failure_info_addition; + eazel_install_problem_tree_to_case (installer->problem, pd, uninstall, &(installer->problems)); - if (!installer->failure_info) { + if (!installer->failure_info || 1) { + /* could be multiple toplevel packages */ failure_info_addition = eazel_install_problem_tree_to_string (installer->problem, pd, uninstall); @@ -1063,7 +1097,7 @@ eazel_install_preflight (EazelInstall *service, char *temp; int total_mb; - if (1) { + if (0) { jump_to_package_tree_page (installer, (GList *)packages); while (1) { while (gtk_events_pending ()) { gtk_main_iteration (); } } } @@ -1117,6 +1151,7 @@ eazel_install_preflight (EazelInstall *service, g_free (temp); installer->total_packages = num_packages; + installer->total_size = total_size; installer->total_mb = total_mb; while (gtk_events_pending ()) { diff --git a/nautilus-installer/src/installer.h b/nautilus-installer/src/installer.h index a7bc72ff0..b8ac1ed51 100644 --- a/nautilus-installer/src/installer.h +++ b/nautilus-installer/src/installer.h @@ -90,6 +90,7 @@ struct _EazelInstaller GList *packages_possible_broken; int total_packages; + int total_size; int total_mb; }; diff --git a/nautilus-installer/src/link.sh b/nautilus-installer/src/link.sh index 32f8365bf..b98b7ba1e 100755 --- a/nautilus-installer/src/link.sh +++ b/nautilus-installer/src/link.sh @@ -6,6 +6,7 @@ FULL="yes" GNOME=/gnome BUILD_DATE=`date +%d%b%y-%H%M` XFREE=`rpm -q --queryformat="%{VERSION}" XFree86` +RPM_VERSION=`rpm -q --queryformat="%{VERSION}" rpm` if test "x$1" = "x--help"; then echo @@ -49,6 +50,25 @@ else STRIP="yes" fi +if test "x$RPM_VERSION" = "x"; then + echo "* No rpm installed? Installer can only be built on RedHat for now... Bye." + exit 0 +fi +RPM_MAJOR=`echo $RPM_VERSION | sed -e 's/\([0-9]\).*/\1/'`; +if test "x$RPM_MAJOR" = "x3"; then + echo "* RedHat 6.x build (RPM 3)" + export PACKAGE_SYSTEM_OBJECT=eazel-package-system-rpm3.o +else + if test "x$RPM_MAJOR" = "x4"; then + echo "* RedHat 7.x build (RPM 4)" + export PACKAGE_SYSTEM_OBJECT=eazel-package-system-rpm4.o + else + echo "* RPM version $RPM_VERSION not supported (only 3 or 4)." + exit 0 + fi +fi + + XLIBS="-L/usr/X11R6/lib -ldl -lXext -lX11 -lm -lSM -lICE " GLOG="-DG_LOG_DOMAIN=\\\"Nautilus-Installer\\\"" WARN_FLAG="-Wall -Werror" diff --git a/nautilus-installer/src/package-tree.c b/nautilus-installer/src/package-tree.c index 9939f18ba..dce542a49 100644 --- a/nautilus-installer/src/package-tree.c +++ b/nautilus-installer/src/package-tree.c @@ -284,13 +284,18 @@ package_customizer_find_package (PackageCustomizer *table, PackageData *package) } static GList * -get_errant_children_int (GList *bad, PackageInfo *info, PackageData *subpack) +get_errant_children_int (GList *bad, PackageInfo *info, PackageData *subpack, GList **path) { PackageDependency *dep; PackageInfo *sub_info; GList *iter; if (subpack != NULL) { + if (g_list_find (*path, subpack) != NULL) { + /* recursing... */ + return bad; + } + sub_info = package_customizer_find_package (info->table, subpack); if ((! gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (sub_info->checkbox))) && (g_list_find (bad, sub_info) == NULL)) { @@ -301,10 +306,13 @@ get_errant_children_int (GList *bad, PackageInfo *info, PackageData *subpack) subpack = info->package; } + *path = g_list_prepend (*path, subpack); for (iter = g_list_first (subpack->depends); iter != NULL; iter = g_list_next (iter)) { dep = (PackageDependency *)(iter->data); - bad = get_errant_children_int (bad, info, dep->package); + bad = get_errant_children_int (bad, info, dep->package, path); } + *path = g_list_remove (*path, subpack); + return bad; } @@ -313,7 +321,10 @@ get_errant_children_int (GList *bad, PackageInfo *info, PackageData *subpack) static GList * get_errant_children (PackageInfo *info) { - return get_errant_children_int (NULL, info, NULL); + GList *path; + + path = NULL; + return get_errant_children_int (NULL, info, NULL, &path); } /* display info about a package */ @@ -498,6 +509,7 @@ package_customizer_fill (PackageData *package, PackageCustomizer *table) private = table->private; if (package_customizer_find_package (table, package) != NULL) { + /* recursing */ return; } info = g_new0 (PackageInfo, 1); |