mirror of
https://github.com/moparisthebest/pacman
synced 2024-11-05 09:05:03 -05:00
call alpm_option_get_localdb once in syncfirst()
Signed-off-by: Andrea Scarpino <andrea@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
1a8c792e8f
commit
b6ecb2329b
@ -578,10 +578,11 @@ static int sync_list(alpm_list_t *syncs, alpm_list_t *targets)
|
|||||||
|
|
||||||
static alpm_list_t *syncfirst(void) {
|
static alpm_list_t *syncfirst(void) {
|
||||||
alpm_list_t *i, *res = NULL;
|
alpm_list_t *i, *res = NULL;
|
||||||
|
pmdb_t *db_local = alpm_option_get_localdb();
|
||||||
|
|
||||||
for(i = config->syncfirst; i; i = alpm_list_next(i)) {
|
for(i = config->syncfirst; i; i = alpm_list_next(i)) {
|
||||||
char *pkgname = alpm_list_getdata(i);
|
char *pkgname = alpm_list_getdata(i);
|
||||||
pmpkg_t *pkg = alpm_db_get_pkg(alpm_option_get_localdb(), pkgname);
|
pmpkg_t *pkg = alpm_db_get_pkg(db_local, pkgname);
|
||||||
if(pkg == NULL) {
|
if(pkg == NULL) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user