aboutsummaryrefslogtreecommitdiff
path: root/paludis/environments/paludis
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-02-21 19:22:03 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-02-26 15:25:00 +0000
commit393adbc779c4bf332e9bb966a14f73fea002ae41 (patch)
tree23608fb619f830b585700444d036c3cae3ee091b /paludis/environments/paludis
parent04f54edce9cefa3a71fc274376b6a64e6eafee1f (diff)
downloadpaludis-393adbc779c4bf332e9bb966a14f73fea002ae41.tar.gz
paludis-393adbc779c4bf332e9bb966a14f73fea002ae41.tar.xz
Pass optional reason to unmask queries
Diffstat (limited to 'paludis/environments/paludis')
-rw-r--r--paludis/environments/paludis/package_mask_conf.cc2
-rw-r--r--paludis/environments/paludis/package_mask_conf.hh3
-rw-r--r--paludis/environments/paludis/paludis_environment.cc6
-rw-r--r--paludis/environments/paludis/paludis_environment.hh2
4 files changed, 7 insertions, 6 deletions
diff --git a/paludis/environments/paludis/package_mask_conf.cc b/paludis/environments/paludis/package_mask_conf.cc
index 4814e0edc..5287fc7e1 100644
--- a/paludis/environments/paludis/package_mask_conf.cc
+++ b/paludis/environments/paludis/package_mask_conf.cc
@@ -98,7 +98,7 @@ PackageMaskConf::add(const FSPath & filename)
}
bool
-PackageMaskConf::query(const std::shared_ptr<const PackageID> & e) const
+PackageMaskConf::query(const std::shared_ptr<const PackageID> & e, const std::string &) const
{
using namespace std::placeholders;
if (indirect_iterator(_imp->masks.end()) != std::find_if(
diff --git a/paludis/environments/paludis/package_mask_conf.hh b/paludis/environments/paludis/package_mask_conf.hh
index 8cd6568d8..cb927d073 100644
--- a/paludis/environments/paludis/package_mask_conf.hh
+++ b/paludis/environments/paludis/package_mask_conf.hh
@@ -63,7 +63,8 @@ namespace paludis
/**
* Query a mask.
*/
- bool query(const std::shared_ptr<const PackageID> &) const;
+ bool query(const std::shared_ptr<const PackageID> &,
+ const std::string &) const;
};
}
}
diff --git a/paludis/environments/paludis/paludis_environment.cc b/paludis/environments/paludis/paludis_environment.cc
index 1eea30535..8ec4bc9eb 100644
--- a/paludis/environments/paludis/paludis_environment.cc
+++ b/paludis/environments/paludis/paludis_environment.cc
@@ -192,9 +192,9 @@ PaludisEnvironment::accept_license(const std::string & license, const std::share
}
bool
-PaludisEnvironment::unmasked_by_user(const std::shared_ptr<const PackageID> & d) const
+PaludisEnvironment::unmasked_by_user(const std::shared_ptr<const PackageID> & d, const std::string & reason) const
{
- return _imp->config->package_unmask_conf()->query(d);
+ return _imp->config->package_unmask_conf()->query(d, reason);
}
std::shared_ptr<const FSPathSequence>
@@ -431,7 +431,7 @@ PaludisEnvironment::mask_for_breakage(const std::shared_ptr<const PackageID> & i
const std::shared_ptr<const Mask>
PaludisEnvironment::mask_for_user(const std::shared_ptr<const PackageID> & d, const bool o) const
{
- if (_imp->config->package_mask_conf()->query(d))
+ if (_imp->config->package_mask_conf()->query(d, ""))
return std::make_shared<UserConfigMask>(o);
return std::shared_ptr<const Mask>();
diff --git a/paludis/environments/paludis/paludis_environment.hh b/paludis/environments/paludis/paludis_environment.hh
index 8cbb899f6..14deb9b9b 100644
--- a/paludis/environments/paludis/paludis_environment.hh
+++ b/paludis/environments/paludis/paludis_environment.hh
@@ -126,7 +126,7 @@ namespace paludis
virtual const std::shared_ptr<const Mask> mask_for_user(const std::shared_ptr<const PackageID> &, const bool) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual bool unmasked_by_user(const std::shared_ptr<const PackageID> &) const
+ virtual bool unmasked_by_user(const std::shared_ptr<const PackageID> &, const std::string &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
virtual bool add_to_world(const QualifiedPackageName &) const;