summaryrefslogtreecommitdiff
path: root/lib/libalpm
diff options
context:
space:
mode:
authorJudd Vinet <judd@archlinux.org>2006-01-22 02:30:15 +0000
committerJudd Vinet <judd@archlinux.org>2006-01-22 02:30:15 +0000
commit26ec9573ef6a7c71caea25c498a81acefc9544be (patch)
tree9c02c125f15fe7c1651a735e4c45c43cd826aafd /lib/libalpm
parent59c82a0a947960c4f4beaf5b1a658e581a586d42 (diff)
changed behaviour with original=X,current=Y,new=Z backup scenario -- install new file as .pacnew and keep old one in place
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/add.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c
index e8dfb491..a91634af 100644
--- a/lib/libalpm/add.c
+++ b/lib/libalpm/add.c
@@ -504,16 +504,11 @@ int add_commit(pmtrans_t *trans, pmdb_t *db)
installnew = 1;
} else {
char newpath[PATH_MAX];
- _alpm_log(PM_LOG_DEBUG, "action: saving current file and installing new one");
+ _alpm_log(PM_LOG_DEBUG, "action: leaving file in place, installing new one as .pacnew\n");
+ strncat(expath, ".pacnew", PATH_MAX);
installnew = 1;
- snprintf(newpath, PATH_MAX, "%s.pacsave", expath);
- if(rename(expath, newpath)) {
- _alpm_log(PM_LOG_ERROR, "could not rename %s (%s)", pathname, strerror(errno));
- alpm_logaction("error: could not rename %s (%s)", expath, strerror(errno));
- } else {
- _alpm_log(PM_LOG_WARNING, "%s saved as %s.pacsave", pathname, pathname);
- alpm_logaction("warning: %s saved as %s", expath, newpath);
- }
+ _alpm_log(PM_LOG_WARNING, "extracting %s as %s.pacnew", pathname, pathname);
+ alpm_logaction("warning: extracting %s%s as %s", handle->root, pathname, expath);
}
if(installnew) {