summaryrefslogtreecommitdiffstats
path: root/lib/libalpm
diff options
context:
space:
mode:
authorAndrew Gregory <andrew.gregory.8@gmail.com>2014-01-14 05:01:44 +0100
committerAllan McRae <allan@archlinux.org>2014-01-15 07:05:31 +0100
commit8a434aeb4616cec416419a216a620038d98024d3 (patch)
tree2c3b78d971d13b47a276053b71954c4f9327169e /lib/libalpm
parent62c76cf82518ce5d8c69ece862108ee6256d863b (diff)
downloadpacman-8a434aeb4616cec416419a216a620038d98024d3.tar.gz
pacman-8a434aeb4616cec416419a216a620038d98024d3.tar.xz
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>
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/sync.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c
index 945fdb0e..17a3e8e6 100644
--- a/lib/libalpm/sync.c
+++ b/lib/libalpm/sync.c
@@ -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 */