aboutsummaryrefslogtreecommitdiffstats
path: root/main/apk-tools/0005-cache-display-more-than-one-error.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/apk-tools/0005-cache-display-more-than-one-error.patch')
-rw-r--r--main/apk-tools/0005-cache-display-more-than-one-error.patch55
1 files changed, 55 insertions, 0 deletions
diff --git a/main/apk-tools/0005-cache-display-more-than-one-error.patch b/main/apk-tools/0005-cache-display-more-than-one-error.patch
new file mode 100644
index 0000000000..6e85218b18
--- /dev/null
+++ b/main/apk-tools/0005-cache-display-more-than-one-error.patch
@@ -0,0 +1,55 @@
+From d21303960544b5f11b7d69d0335f0903fb93d180 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Thu, 13 May 2010 09:26:19 +0000
+Subject: [PATCH 5/5] cache: display more than one error
+
+Display all packages that are bad in world rather than only first
+before exiting.
+---
+ src/cache.c | 15 ++++++++-------
+ 1 files changed, 8 insertions(+), 7 deletions(-)
+
+diff --git a/src/cache.c b/src/cache.c
+index 85d9777..49a71fa 100644
+--- a/src/cache.c
++++ b/src/cache.c
+@@ -30,7 +30,7 @@ static int cache_download(struct apk_database *db)
+ struct apk_package *pkg;
+ struct apk_repository *repo;
+ char item[PATH_MAX], cacheitem[PATH_MAX];
+- int i, r = 0;
++ int i, r = 0, errors = 0;
+
+ if (db->world == NULL)
+ return 0;
+@@ -41,12 +41,13 @@ static int cache_download(struct apk_database *db)
+
+ for (i = 0; i < db->world->num; i++) {
+ r = apk_state_lock_dependency(state, &db->world->item[i]);
+- if (r != 0) {
+- apk_error("Unable to select version for '%s': %d",
+- db->world->item[i].name->name, r);
+- goto err;
+- }
++ errors += r;
++ if (r != 0)
++ apk_error("Unable to select version for '%s'",
++ db->world->item[i].name->name);
+ }
++ if (errors)
++ goto err;
+
+ list_for_each_entry(change, &state->change_list_head, change_list) {
+ pkg = change->newpkg;
+@@ -67,7 +68,7 @@ static int cache_download(struct apk_database *db)
+ err:
+ if (state != NULL)
+ apk_state_unref(state);
+- return r;
++ return errors;
+ }
+
+ static int cache_clean(struct apk_database *db)
+--
+1.7.1
+