paludis Version 3.0.2
The one true package mangler
ndbam_merger.hh
1/* vim: set sw=4 sts=4 et foldmethod=syntax : */
2
3/*
4 * Copyright (c) 2007, 2008, 2009, 2010, 2011, 2013 Ciaran McCreesh
5 *
6 * This file is part of the Paludis package manager. Paludis is free software;
7 * you can redistribute it and/or modify it under the terms of the GNU General
8 * Public License version 2, as published by the Free Software Foundation.
9 *
10 * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
11 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
13 * details.
14 *
15 * You should have received a copy of the GNU General Public License along with
16 * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
17 * Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19
20#ifndef PALUDIS_GUARD_PALUDIS_REPOSITORIES_UNPACKAGED_NDBAM_MERGER_HH
21#define PALUDIS_GUARD_PALUDIS_REPOSITORIES_UNPACKAGED_NDBAM_MERGER_HH 1
22
23#include <paludis/fs_merger.hh>
25#include <paludis/util/named_value.hh>
26#include <paludis/output_manager-fwd.hh>
27#include <paludis/partitioning-fwd.hh>
28#include <functional>
29
30namespace paludis
31{
32 namespace n
33 {
34 typedef Name<struct name_config_protect> config_protect;
35 typedef Name<struct name_config_protect_mask> config_protect_mask;
36 typedef Name<struct name_contents_file> contents_file;
37 typedef Name<struct name_environment> environment;
38 typedef Name<struct name_fix_mtimes_before> fix_mtimes_before;
39 typedef Name<struct name_fs_merger_options> fs_merger_options;
40 typedef Name<struct name_get_new_ids_or_minus_one> get_new_ids_or_minus_one;
41 typedef Name<struct name_image> image;
42 typedef Name<struct name_install_under> install_under;
43 typedef Name<struct name_is_volatile> is_volatile;
44 typedef Name<struct name_merged_entries> merged_entries;
45 typedef Name<struct name_options> options;
46 typedef Name<struct name_output_manager> output_manager;
47 typedef Name<struct name_package_id> package_id;
48 typedef Name<struct name_parts> parts;
49 typedef Name<struct name_permit_destination> permit_destination;
50 typedef Name<struct name_root> root;
51 typedef Name<struct name_should_merge> should_merge;
52 }
53
75
76 /**
77 * Merger subclass for NDBAM.
78 *
79 * \ingroup g_ndbam
80 * \since 0.26
81 */
82 class PALUDIS_VISIBLE NDBAMMerger :
83 public FSMerger
84 {
85 private:
86 void display_override(const std::string &) const override;
87
89
90 public:
91 NDBAMMerger(const NDBAMMergerParams &);
92 ~NDBAMMerger() override;
93
94 Hook extend_hook(const Hook &) override;
95
96 void record_install_file(const FSPath &, const FSPath &, const std::string &, const FSMergerStatusFlags &) override;
97 void record_install_dir(const FSPath &, const FSPath &, const FSMergerStatusFlags &) override;
98 void record_install_under_dir(const FSPath &, const FSMergerStatusFlags &) override;
99 void record_install_sym(const FSPath &, const FSPath &, const FSMergerStatusFlags &) override;
100
101 void on_error(bool is_check, const std::string &) override;
102 void on_warn(bool is_check, const std::string &) override;
103 void on_enter_dir(bool is_check, const FSPath) override;
104
105 bool config_protected(const FSPath &, const FSPath &) override;
106 std::string make_config_protect_name(const FSPath &, const FSPath &) override;
107
108 void merge() override;
109 bool check() override;
110 };
111}
112
113#endif
Definition fs_path.hh:34
Definition hook.hh:75
void merge() override
Hook extend_hook(const Hook &) override
void on_enter_dir(bool is_check, const FSPath) override
void on_warn(bool is_check, const std::string &) override
bool check() override
void on_error(bool is_check, const std::string &) override
Definition named_value.hh:51
Definition pimp.hh:52
Options< FSMergerStatusFlag > FSMergerStatusFlags
Definition fs_merger-fwd.hh:45
#define PALUDIS_VISIBLE
Definition attributes.hh:59
Definition about_metadata-fwd.hh:24
Definition ndbam_merger.hh:55