Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/add.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c
index ddbcfeea..1b228b2d 100644
--- a/lib/libalpm/add.c
+++ b/lib/libalpm/add.c
@@ -482,9 +482,9 @@ static int extract_single_file(struct archive *archive,
_alpm_log(PM_LOG_DEBUG, "original: %s\n", hash_orig);
if(!oldpkg) {
- /* looks like we have a local file that has a different hash as the
- * file in the package, move it to a .pacorig */
if(strcmp(hash_local, hash_pkg) != 0) {
+ /* looks like we have a local file that has a different hash as the
+ * file in the package, move it to a .pacorig */
char newpath[PATH_MAX];
snprintf(newpath, PATH_MAX, "%s.pacorig", filename);
@@ -508,6 +508,9 @@ static int extract_single_file(struct archive *archive,
alpm_logaction("warning: %s saved as %s\n", filename, newpath);
}
}
+ } else {
+ /* local file is identical to pkg one, so just remove pkg one */
+ unlink(checkfile);
}
} else if(hash_orig) {
/* the fun part */