20#ifndef PALUDIS_GUARD_PALUDIS_FS_MERGER_HH
21#define PALUDIS_GUARD_PALUDIS_FS_MERGER_HH 1
26#include <paludis/util/named_value.hh>
27#include <paludis/util/timestamp.hh>
29#include <paludis/merger.hh>
32#include <paludis/partitioning-fwd.hh>
52 typedef Name<struct name_environment> environment;
53 typedef Name<struct name_fix_mtimes_before> fix_mtimes_before;
54 typedef Name<struct name_fs_merger_options> fs_merger_options;
55 typedef Name<struct name_get_new_ids_or_minus_one> get_new_ids_or_minus_one;
56 typedef Name<struct name_image> image;
57 typedef Name<struct name_install_under> install_under;
58 typedef Name<struct name_maybe_output_manager> maybe_output_manager;
59 typedef Name<struct name_merged_entries> merged_entries;
60 typedef Name<struct name_no_chown> no_chown;
61 typedef Name<struct name_options> options;
62 typedef Name<struct name_parts> parts;
63 typedef Name<struct name_permit_destination> permit_destination;
64 typedef Name<struct name_root> root;
65 typedef Name<struct name_should_merge> should_merge;
138 FSMergerError(
const std::string & msg)
noexcept;
139 FSMergerError(
int error,
const std::string & msg)
noexcept;
156 void track_renamed_dir_recursive(
const FSPath &);
157 void relabel_dir_recursive(
const FSPath &,
const FSPath &);
185 void on_file_main(
bool is_check,
const FSPath & src,
const FSPath & dst)
override;
186 virtual void on_file_over_nothing(
bool is_check,
const FSPath &,
const FSPath &);
187 virtual void on_file_over_file(
bool is_check,
const FSPath &,
const FSPath &);
188 virtual void on_file_over_dir(
bool is_check,
const FSPath &,
const FSPath &);
189 virtual void on_file_over_sym(
bool is_check,
const FSPath &,
const FSPath &);
190 virtual void on_file_over_misc(
bool is_check,
const FSPath &,
const FSPath &);
193 virtual void unlink_file(
FSPath);
198 void on_dir_main(
bool is_check,
const FSPath & src,
const FSPath & dst)
override;
199 virtual void on_dir_over_nothing(
bool is_check,
const FSPath &,
const FSPath &);
200 virtual void on_dir_over_file(
bool is_check,
const FSPath &,
const FSPath &);
201 virtual void on_dir_over_dir(
bool is_check,
const FSPath &,
const FSPath &);
202 virtual void on_dir_over_sym(
bool is_check,
const FSPath &,
const FSPath &);
203 virtual void on_dir_over_misc(
bool is_check,
const FSPath &,
const FSPath &);
206 virtual void unlink_dir(
FSPath);
210 void on_sym_main(
bool is_check,
const FSPath & src,
const FSPath & dst)
override;
211 virtual void on_sym_over_nothing(
bool is_check,
const FSPath &,
const FSPath &);
212 virtual void on_sym_over_file(
bool is_check,
const FSPath &,
const FSPath &);
213 virtual void on_sym_over_dir(
bool is_check,
const FSPath &,
const FSPath &);
214 virtual void on_sym_over_sym(
bool is_check,
const FSPath &,
const FSPath &);
215 virtual void on_sym_over_misc(
bool is_check,
const FSPath &,
const FSPath &);
218 virtual void unlink_sym(
FSPath);
221 virtual void unlink_misc(
FSPath);
223 void prepare_install_under()
override;
225 FSPath canonicalise_root_path(
const FSPath & f)
override;
234 virtual bool config_protected(
const FSPath &,
const FSPath &) = 0;
235 virtual std::string make_config_protect_name(
const FSPath &,
const FSPath &) = 0;
240 virtual void display_merge(
const EntryType &,
const FSPath &,
242 const std::string & =
"")
const;
250 FSMerger(
const FSMerger &) =
delete;
251 FSMerger & operator= (
const FSMerger &) =
delete;
void on_enter_dir(bool is_check, const FSPath) override
Hook extend_hook(const Hook &) override
void do_dir_recursive(bool is_check, const FSPath &, const FSPath &) override
Definition named_value.hh:51
Options< FSMergerStatusFlag > FSMergerStatusFlags
Definition fs_merger-fwd.hh:45
#define PALUDIS_ATTRIBUTE(x)
Definition attributes.hh:53
#define PALUDIS_VISIBLE
Definition attributes.hh:59
Definition about_metadata-fwd.hh:24
Definition fs_merger.hh:78
NamedValue< n::merged_entries, std::shared_ptr< FSPathSet > > merged_entries
Definition fs_merger.hh:107
NamedValue< n::should_merge, std::function< bool(const FSPath &)> > should_merge
Definition fs_merger.hh:121
NamedValue< n::fix_mtimes_before, Timestamp > fix_mtimes_before
Definition fs_merger.hh:87
NamedValue< n::parts, std::shared_ptr< const Partitioning > > parts
Definition fs_merger.hh:113
NamedValue< n::fs_merger_options, FSMergerOptions > fs_merger_options
Definition fs_merger.hh:94
NamedValue< n::permit_destination, PermitDestinationFn > permit_destination
Definition fs_merger.hh:116