1
0
mirror of https://github.com/moparisthebest/pacman synced 2025-01-10 13:28:12 -05:00

code cleanup

This commit is contained in:
Aurelien Foret 2006-01-13 21:51:05 +00:00
parent 08bf45aceb
commit 9bf647c82b

View File

@ -177,9 +177,6 @@ static int sync_synctree(list_t *syncs)
snprintf(path, PATH_MAX, "%s%s", root, dbpath);
ret = downloadfiles_forreal(sync->servers, path, files, lastupdate, newmtime);
if(strlen(newmtime)) {
vprint("sync: new mtime for %s: %s\n", sync->treename, newmtime);
}
FREELIST(files);
if(ret > 0) {
ERR(NL, "failed to synchronize %s\n", sync->treename);
@ -187,10 +184,13 @@ static int sync_synctree(list_t *syncs)
} else if(ret < 0) {
MSG(NL, " %s is up to date\n", sync->treename);
} else {
if(strlen(newmtime)) {
vprint("sync: new mtime for %s: %s\n", sync->treename, newmtime);
}
snprintf(path, PATH_MAX, "%s%s/%s" PM_EXT_DB, root, dbpath, sync->treename);
if(alpm_db_update(sync->db, path, newmtime) == -1) {
if(pm_errno != PM_ERR_DB_UPTODATE) {
ERR(NL, "failed to synchronize %s (%s)\n", sync->treename, alpm_strerror(pm_errno));
ERR(NL, "failed to update %s (%s)\n", sync->treename, alpm_strerror(pm_errno));
success--;
} else if(!strlen(newmtime)){
MSG(NL, ":: %s is up to date\n", sync->treename);