aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2013-09-16 19:50:35 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2013-09-17 13:22:18 +0100
commit32f3104172cebd085e6415fd3c0ab6f6e803c334 (patch)
tree145123e05a4f749f9aeedbec527759ad6da7815e
parent038b4de8fa821ca9eec55dbf1c0dbadd451a3bd0 (diff)
downloadpaludis-32f3104172cebd085e6415fd3c0ab6f6e803c334.tar.gz
paludis-32f3104172cebd085e6415fd3c0ab6f6e803c334.tar.xz
Check that volatile files exist
-rw-r--r--paludis/repositories/e/do_install_action.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/paludis/repositories/e/do_install_action.cc b/paludis/repositories/e/do_install_action.cc
index 540dde7..d80ac01 100644
--- a/paludis/repositories/e/do_install_action.cc
+++ b/paludis/repositories/e/do_install_action.cc
@@ -296,6 +296,16 @@ paludis::erepository::do_install_action(
&used_this_for_config_protect, std::ref(used_config_protect), std::placeholders::_1),
n::want_phase() = install_action.options.want_phase()
));
+
+ if (volatile_files && phase->option("check_merge")) {
+ for (auto & v : *volatile_files) {
+ if (! (package_builddir / "image" / v).stat().is_regular_file_or_symlink_to_regular_file())
+ throw ActionFailedError("Can't install '" + stringify(*id)
+ + "' to destination '" + stringify(install_action.options.destination()->name())
+ + "' because '" + stringify(v) + "' was marked using exvolatile, but it is not a regular "
+ "file or a symlink to a regular file");
+ }
+ }
}
else if (phase->option("strip"))
{