[pacman-dev] CVS update of pacman-lib/lib/libalpm (remove.c)

Aaron Griffin aaron at archlinux.org
Tue Jan 23 11:05:21 EST 2007


    Date: Tuesday, January 23, 2007 @ 11:05:21
  Author: aaron
    Path: /home/cvs-pacman/pacman-lib/lib/libalpm

Modified: remove.c (1.56 -> 1.57)

James Rosten <seinfeld90 at gmail.com>
* attempt to unlink file AFTER moving to .pacsave always fails


----------+
 remove.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)


Index: pacman-lib/lib/libalpm/remove.c
diff -u pacman-lib/lib/libalpm/remove.c:1.56 pacman-lib/lib/libalpm/remove.c:1.57
--- pacman-lib/lib/libalpm/remove.c:1.56	Fri Jan 19 04:28:45 2007
+++ pacman-lib/lib/libalpm/remove.c	Tue Jan 23 11:05:21 2007
@@ -225,9 +225,10 @@
 				int list_count = alpm_list_count(trans->packages); /* this way we don't have to call alpm_list_count twice during PROGRESS */
 				PROGRESS(trans, PM_TRANS_PROGRESS_REMOVE_START, info->name, (double)(percent * 100), list_count, (list_count - alpm_list_count(targ) + 1));
 				++(*position);
-			}
-			if (unlink(line) == -1) {
-				_alpm_log(PM_LOG_ERROR, _("cannot remove file %s: %s"), file, strerror(errno));
+
+				if (unlink(line) == -1) {
+					_alpm_log(PM_LOG_ERROR, _("cannot remove file %s: %s"), file, strerror(errno));
+				}
 			}
 		}
 	}




More information about the pacman-dev mailing list