From 32f3104172cebd085e6415fd3c0ab6f6e803c334 Mon Sep 17 00:00:00 2001 From: Ciaran McCreesh Date: Mon, 16 Sep 2013 19:50:35 +0100 Subject: Check that volatile files exist --- paludis/repositories/e/do_install_action.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/paludis/repositories/e/do_install_action.cc b/paludis/repositories/e/do_install_action.cc index 540dde76e..d80ac0156 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")) { -- cgit v1.2.3