diff options
author | Aurelien Foret <aurelien@archlinux.org> | 2006-02-14 19:29:26 +0100 |
---|---|---|
committer | Aurelien Foret <aurelien@archlinux.org> | 2006-02-14 19:29:26 +0100 |
commit | a56e13d770c8852b8d7d96e44164544876bbfe4f (patch) | |
tree | f33aa1d25896cf1d5a3f573b8fb8c1cd42d50f53 | |
parent | 9cc5e60e6d0da3ca41bd463d1a65eba6220e6cbe (diff) | |
download | pacman-a56e13d770c8852b8d7d96e44164544876bbfe4f.tar.gz pacman-a56e13d770c8852b8d7d96e44164544876bbfe4f.tar.xz |
added the possibility to force synctree update by using -Syy
-rw-r--r-- | src/pacman/sync.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/pacman/sync.c b/src/pacman/sync.c index 3eb85d8b..d146fac9 100644 --- a/src/pacman/sync.c +++ b/src/pacman/sync.c @@ -161,13 +161,15 @@ static int sync_synctree(int level, list_t *syncs) for(i = syncs; i; i = i->next) { list_t *files = NULL; char newmtime[16] = ""; - char *lastupdate; + char *lastupdate = NULL; sync_t *sync = (sync_t *)i->data; - /* get the lastupdate time */ - lastupdate = alpm_db_getinfo(sync->db, PM_DB_LASTUPDATE); - if(strlen(lastupdate) == 0) { - vprint("failed to get lastupdate time for %s (no big deal)\n", sync->treename); + if(level < 2) { + /* get the lastupdate time */ + lastupdate = alpm_db_getinfo(sync->db, PM_DB_LASTUPDATE); + if(strlen(lastupdate) == 0) { + vprint("failed to get lastupdate time for %s (no big deal)\n", sync->treename); + } } /* build a one-element list */ |