mirror of
https://github.com/moparisthebest/pacman
synced 2024-08-13 17:03:46 -04:00
Install unchanged backup files to get correct timestamps.
Fixes FS#35515. Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
93f9052557
commit
d7d4f47d63
@ -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);
|
_alpm_log(handle, ALPM_LOG_DEBUG, "original: %s\n", hash_orig);
|
||||||
|
|
||||||
if(hash_local && hash_pkg && strcmp(hash_local, hash_pkg) == 0) {
|
if(hash_local && hash_pkg && strcmp(hash_local, hash_pkg) == 0) {
|
||||||
/* local and new files are the same, no sense in installing the file
|
/* local and new files are the same, updating anyway to get
|
||||||
* over itself, regardless of what the original file was */
|
* correct timestamps */
|
||||||
_alpm_log(handle, ALPM_LOG_DEBUG,
|
_alpm_log(handle, ALPM_LOG_DEBUG, "action: installing new file: %s\n",
|
||||||
"action: leaving existing file in place\n");
|
entryname_orig);
|
||||||
unlink(checkfile);
|
if(try_rename(handle, checkfile, filename)) {
|
||||||
|
errors++;
|
||||||
|
}
|
||||||
} else if(hash_orig && hash_pkg && strcmp(hash_orig, hash_pkg) == 0) {
|
} else if(hash_orig && hash_pkg && strcmp(hash_orig, hash_pkg) == 0) {
|
||||||
/* original and new files are the same, leave the local version alone,
|
/* original and new files are the same, leave the local version alone,
|
||||||
* including any user changes */
|
* including any user changes */
|
||||||
|
Loading…
Reference in New Issue
Block a user