index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Xavier Chantry <shiningxc@gmail.com> | 2009-07-20 17:23:19 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2009-07-20 16:38:15 -0500 |
commit | 344ced22c347b347b55818bb93579ffa2eb9c70b (patch) | |
tree | 17b594152639e1f59cca1a79ff4a4ac076937335 /lib/libalpm | |
parent | 60b6cde637338657e72312aef1ff1d04314df745 (diff) |
-rw-r--r-- | lib/libalpm/add.c | 7 |
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 */ |