1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-08-13 17:03:46 -04:00

sync_prepare: treat from_sync as a boolean

We only care that packages are being installed from a repo, not how
many.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Andrew Gregory 2014-01-13 23:01:44 -05:00 committed by Allan McRae
parent 62c76cf825
commit 8a434aeb46

View File

@ -371,7 +371,7 @@ int _alpm_sync_prepare(alpm_handle_t *handle, alpm_list_t **data)
alpm_list_t *i, *j;
alpm_list_t *deps = NULL;
alpm_list_t *unresolvable = NULL;
size_t from_sync = 0;
int from_sync = 0;
int ret = 0;
alpm_trans_t *trans = handle->trans;
@ -381,7 +381,10 @@ int _alpm_sync_prepare(alpm_handle_t *handle, alpm_list_t **data)
for(i = trans->add; i; i = i->next) {
alpm_pkg_t *spkg = i->data;
from_sync += (spkg->origin == ALPM_PKG_FROM_SYNCDB);
if (spkg->origin == ALPM_PKG_FROM_SYNCDB){
from_sync = 1;
break;
}
}
/* ensure all sync database are valid if we will be using them */