aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Fernando J. Pereda <ferdy@ferdyx.org> 2008-06-30 08:16:33 +0000
committerAvatar Fernando J. Pereda <ferdy@ferdyx.org> 2008-06-30 08:25:04 +0000
commit1c359b6841082de0d5fb9b29719b2c410cb60b0f (patch)
tree44263f1cf7f2245f864157d2f6376fc498609308
parenta7eff252d935e5654a2e039dff6cce547e4fd999 (diff)
downloadpaludis-1c359b6841082de0d5fb9b29719b2c410cb60b0f.tar.gz
paludis-1c359b6841082de0d5fb9b29719b2c410cb60b0f.tar.xz
Don't unlink entries that don't need it
-rw-r--r--paludis/merger.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/paludis/merger.cc b/paludis/merger.cc
index cc0e9d1..9dbaf9f 100644
--- a/paludis/merger.cc
+++ b/paludis/merger.cc
@@ -520,10 +520,7 @@ Merger::on_file_over_file(bool is_check, const FSEntry & src, const FSEntry & ds
record_install_file(src, dst, cfgpro_name, install_file(src, dst, cfgpro_name));
}
else
- {
- unlink_file(dst / src.basename());
record_install_file(src, dst, src.basename(), install_file(src, dst, src.basename()) + msi_unlinked_first);
- }
}
void
@@ -539,7 +536,6 @@ Merger::on_file_over_sym(bool is_check, const FSEntry & src, const FSEntry & dst
if (is_check)
return;
- unlink_sym(dst / src.basename());
record_install_file(src, dst, src.basename(), install_file(src, dst, src.basename()) + msi_unlinked_first);
}
@@ -549,7 +545,6 @@ Merger::on_file_over_misc(bool is_check, const FSEntry & src, const FSEntry & ds
if (is_check)
return;
- unlink_misc(dst / src.basename());
record_install_file(src, dst, src.basename(), install_file(src, dst, src.basename()) + msi_unlinked_first);
}
@@ -717,6 +712,9 @@ Merger::install_file(const FSEntry & src, const FSEntry & dst_dir, const std::st
FSEntry dst(dst_dir / (stringify(dst_name) + "|paludis-midmerge"));
FSEntry dst_real(dst_dir / dst_name);
+ if (dst_real.is_regular_file())
+ dst_real.chmod(0);
+
if (0 != _imp->params[k::environment()]->perform_hook(extend_hook(
Hook("merger_install_file_pre")
("INSTALL_SOURCE", stringify(src))