[pacman-dev] [PATCH] skip unknown repo names for pacman -Sl

Andrew Gregory andrew.gregory.8 at gmail.com
Sun Jun 2 23:45:04 EDT 2013


Brings pacman -Sl behavior in line with other listing operations.

Signed-off-by: Andrew Gregory <andrew.gregory.8 at gmail.com>
---
 src/pacman/sync.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/pacman/sync.c b/src/pacman/sync.c
index 2093029..f8af176 100644
--- a/src/pacman/sync.c
+++ b/src/pacman/sync.c
@@ -503,12 +503,15 @@ static int sync_list(alpm_list_t *syncs, alpm_list_t *targets)
 			if(db == NULL) {
 				pm_printf(ALPM_LOG_ERROR,
 					_("repository \"%s\" was not found.\n"), repo);
-				alpm_list_free(ls);
-				return 1;
 			}
 
 			ls = alpm_list_add(ls, db);
 		}
+
+		if(!ls) {
+			/* all of our targets were invalid */
+			return 1;
+		}
 	} else {
 		ls = syncs;
 	}
-- 
1.8.3



More information about the pacman-dev mailing list