summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorTollef Fog Heen <tfheen@err.no>2005-10-16 18:06:02 +0000
committerTollef Fog Heen <tfheen@err.no>2005-10-16 18:06:02 +0000
commit3f5c1fa1b64ae3d9de06f0e5215f655cdf153daa (patch)
tree2f34ac2e4ec71be6db2283f02d2687289a5f5a6a /main.c
parent979c89dcb643e6cd14947945b0cba23f8f9a6ab7 (diff)
Try to print out all the errors and not just the first.
2005-10-16 Tollef Fog Heen <tfheen@err.no> * main.c (main): Try to print out all the errors and not just the first.
Diffstat (limited to 'main.c')
-rw-r--r--main.c13
1 files changed, 11 insertions, 2 deletions
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);