summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorPatrick Steinhardt <steinhardt.ptk@gmail.com>2013-06-04 11:20:14 +0200
committerAllan McRae <allan@archlinux.org>2013-06-26 07:32:15 +0200
commitd7d4f47d63e88a0b79eb2f77d83df218dfa359a0 (patch)
tree7d9580e4c83fc834aee167321a1faaa72273b657 /lib
parent93f9052557e6ccecaafbab4c3f47e14222cd96f1 (diff)
downloadpacman-d7d4f47d63e88a0b79eb2f77d83df218dfa359a0.tar.gz
pacman-d7d4f47d63e88a0b79eb2f77d83df218dfa359a0.tar.xz
Install unchanged backup files to get correct timestamps.
Fixes FS#35515. Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/libalpm/add.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c
index c20e7c61..cab04a8b 100644
--- a/lib/libalpm/add.c
+++ b/lib/libalpm/add.c
@@ -309,11 +309,13 @@ static int extract_single_file(alpm_handle_t *handle, struct archive *archive,
_alpm_log(handle, ALPM_LOG_DEBUG, "original: %s\n", hash_orig);
if(hash_local && hash_pkg && strcmp(hash_local, hash_pkg) == 0) {
- /* local and new files are the same, no sense in installing the file
- * over itself, regardless of what the original file was */
- _alpm_log(handle, ALPM_LOG_DEBUG,
- "action: leaving existing file in place\n");
- unlink(checkfile);
+ /* local and new files are the same, updating anyway to get
+ * correct timestamps */
+ _alpm_log(handle, ALPM_LOG_DEBUG, "action: installing new file: %s\n",
+ entryname_orig);
+ if(try_rename(handle, checkfile, filename)) {
+ errors++;
+ }
} else if(hash_orig && hash_pkg && strcmp(hash_orig, hash_pkg) == 0) {
/* original and new files are the same, leave the local version alone,
* including any user changes */