[pacman-dev] remove.c - after pacsave still tries to delete

James Rosten seinfeld90 at gmail.com
Tue Jan 23 01:49:34 EST 2007


I noticed that even after moving it to *.pacsave it will still try to delete the
original file which fails and causes an error message which will only 'cause the
user to worry about this (possibly), which they don't need to.

Patch is below.

~ Jamie / yankees26

Signed-off-by: James Rosten <seinfeld90 at gmail.com>

-------------- next part --------------
--- pacman-lib.orig/lib/libalpm/remove.c	2007-01-19 04:28:45.000000000 -0500
+++ pacman-lib/lib/libalpm/remove.c	2007-01-23 01:43:58.000000000 -0500
@@ -225,9 +225,9 @@ static void unlink_file(pmpkg_t *info, a
 				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