]> wolfpit.net Git - tool/Arch-pacman/.git/commitdiff
skip unknown repo names for pacman -Sl
authorAndrew Gregory <andrew.gregory.8@gmail.com>
Wed, 19 Jun 2013 05:15:02 +0000 (01:15 -0400)
committerAllan McRae <allan@archlinux.org>
Wed, 26 Jun 2013 05:32:16 +0000 (15:32 +1000)
Brings pacman -Sl behavior in line with other listing operations.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
src/pacman/sync.c

index 20930290709b3d9082db0adbd54803daaa167692..fc1314bedc5a5edf16e009f05cb3c73383ee6f38 100644 (file)
@@ -485,6 +485,7 @@ static int sync_list(alpm_list_t *syncs, alpm_list_t *targets)
 {
        alpm_list_t *i, *j, *ls = NULL;
        alpm_db_t *db_local = alpm_get_localdb(config->handle);
+       int ret = 0;
 
        if(targets) {
                for(i = targets; i; i = alpm_list_next(i)) {
@@ -503,8 +504,7 @@ 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;
+                               ret = 1;
                        }
 
                        ls = alpm_list_add(ls, db);
@@ -536,7 +536,7 @@ static int sync_list(alpm_list_t *syncs, alpm_list_t *targets)
                alpm_list_free(ls);
        }
 
-       return 0;
+       return ret;
 }
 
 static alpm_db_t *get_db(const char *dbname)