code cleanup
This commit is contained in:
parent
08bf45aceb
commit
9bf647c82b
1 changed files with 4 additions and 4 deletions
|
@ -177,9 +177,6 @@ static int sync_synctree(list_t *syncs)
|
||||||
snprintf(path, PATH_MAX, "%s%s", root, dbpath);
|
snprintf(path, PATH_MAX, "%s%s", root, dbpath);
|
||||||
|
|
||||||
ret = downloadfiles_forreal(sync->servers, path, files, lastupdate, newmtime);
|
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);
|
FREELIST(files);
|
||||||
if(ret > 0) {
|
if(ret > 0) {
|
||||||
ERR(NL, "failed to synchronize %s\n", sync->treename);
|
ERR(NL, "failed to synchronize %s\n", sync->treename);
|
||||||
|
@ -187,10 +184,13 @@ static int sync_synctree(list_t *syncs)
|
||||||
} else if(ret < 0) {
|
} else if(ret < 0) {
|
||||||
MSG(NL, " %s is up to date\n", sync->treename);
|
MSG(NL, " %s is up to date\n", sync->treename);
|
||||||
} else {
|
} 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);
|
snprintf(path, PATH_MAX, "%s%s/%s" PM_EXT_DB, root, dbpath, sync->treename);
|
||||||
if(alpm_db_update(sync->db, path, newmtime) == -1) {
|
if(alpm_db_update(sync->db, path, newmtime) == -1) {
|
||||||
if(pm_errno != PM_ERR_DB_UPTODATE) {
|
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--;
|
success--;
|
||||||
} else if(!strlen(newmtime)){
|
} else if(!strlen(newmtime)){
|
||||||
MSG(NL, ":: %s is up to date\n", sync->treename);
|
MSG(NL, ":: %s is up to date\n", sync->treename);
|
||||||
|
|
Loading…
Add table
Reference in a new issue