Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=pacman-g2.git;a=commitdiff;h=acbc7ce67b0f6f88ad1efcc4cb51b1a703311a5d

commit acbc7ce67b0f6f88ad1efcc4cb51b1a703311a5d
Author: Melko <me...@frugalware.org>
Date:   Thu Feb 14 18:25:06 2013 +0100

libpacman/sync.c

* stop transaction earlier if a file isn't downloaded.
Actually if there are packages marked to be replaced
and download fails they are still removed, and then the transaction
fails because of not downloaded packages, leaving the system in broken
state.
This commit will make it fail earlier so that packages marked to be
replaced aren't removed too soon.

diff --git a/lib/libpacman/sync.c b/lib/libpacman/sync.c
index a3f0765..08f8527 100644
--- a/lib/libpacman/sync.c
+++ b/lib/libpacman/sync.c
@@ -857,6 +857,7 @@ int _pacman_trans_download_commit(pmtrans_t *trans, 
pmlist_t **data)
}
if(_pacman_downloadfiles(current->servers, ldir, files, tries) == -1) {
_pacman_log(PM_LOG_WARNING, _("failed to retrieve some files from %s\n"), 
current->treename);
+                                       retval=1;
done = 0;
}
FREELIST(files);
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to