FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 03-29-2011, 02:27 PM
Andrea Scarpino
 
Default call alpm_option_get_localdb() once

---
src/pacman/sync.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/pacman/sync.c b/src/pacman/sync.c
index b12206c..0b34f04 100644
--- a/src/pacman/sync.c
+++ b/src/pacman/sync.c
@@ -578,10 +578,11 @@ static int sync_list(alpm_list_t *syncs, alpm_list_t
*targets)

static alpm_list_t *syncfirst(void) {
alpm_list_t *i, *res = NULL;
+ pmdb_t *db_local = alpm_option_get_localdb();

for(i = config->syncfirst; i; i = alpm_list_next(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) {
continue;
}
--
1.7.4.2
 

Thread Tools




All times are GMT. The time now is 08:49 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org