From 3f5c1fa1b64ae3d9de06f0e5215f655cdf153daa Mon Sep 17 00:00:00 2001 From: Tollef Fog Heen Date: Sun, 16 Oct 2005 18:06:02 +0000 Subject: [PATCH] Try to print out all the errors and not just the first. 2005-10-16 Tollef Fog Heen * main.c (main): Try to print out all the errors and not just the first. --- ChangeLog | 3 +++ main.c | 13 +++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 78518de..7528845 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2005-10-16 Tollef Fog Heen + * main.c (main): Try to print out all the errors and not just the + first. + * pkg.m4: Use --short-errors if it's available. * pkg.c (get_package_quiet): Add get_package_quiet which is just diff --git a/main.c b/main.c index 2d31d15..d0df377 100644 --- a/main.c +++ b/main.c @@ -459,6 +459,7 @@ main (int argc, char **argv) g_strstrip (str->str); { + gboolean failed = FALSE; GSList *reqs; GSList *iter; @@ -479,12 +480,14 @@ main (int argc, char **argv) if (req == NULL) { + failed = TRUE; verbose_error ("No package '%s' found\n", ver->name); - return 1; + goto nextiter; } if (!version_test (ver->comparison, req->version, ver->version)) { + failed = TRUE; verbose_error ("Requested '%s %s %s' but version of %s is %s\n", ver->name, comparison_to_str (ver->comparison), @@ -496,13 +499,19 @@ main (int argc, char **argv) verbose_error ("You may find new versions of %s at %s\n", req->name, req->url); - return 1; + goto nextiter; } packages = g_slist_prepend (packages, req); + nextiter: iter = g_slist_next (iter); } + + if (failed) { + return 1; + } + } g_string_free (str, TRUE); -- 2.39.5