diff options
-rw-r--r-- | src/pacman/sync.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/pacman/sync.c b/src/pacman/sync.c index 5f83c753..e3e87703 100644 --- a/src/pacman/sync.c +++ b/src/pacman/sync.c @@ -774,8 +774,19 @@ int pacman_sync(alpm_list_t *targets) /* clean the cache */ if(config->op_s_clean) { - int ret = sync_cleancache(config->op_s_clean); + int ret = 0; + + if(sync_trans_init(0) == -1) { + return(1); + } + + ret += sync_cleancache(config->op_s_clean); ret += sync_cleandb_all(); + + if(sync_trans_release() == -1) { + ret++; + } + return(ret); } |