aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-08-23 01:29:31 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-08-23 01:29:31 +0100
commit6f646d1b35a5cde9e4716fdc9dcecfb23aa991bf (patch)
treec408a629491ae12648796e81c8dee8e7a23f0b6a
parent33fd8ae2939ecc7f82788d7892936cb64089e700 (diff)
downloadpaludis-6f646d1b35a5cde9e4716fdc9dcecfb23aa991bf.tar.gz
paludis-6f646d1b35a5cde9e4716fdc9dcecfb23aa991bf.tar.xz
Use distribution concepts for masks
Fixes: ticket:636
-rw-r--r--paludis/distribution.cc1
-rw-r--r--paludis/distribution.hh2
-rw-r--r--paludis/distributions/exherbo.conf1
-rw-r--r--paludis/distributions/gentoo.conf1
-rw-r--r--paludis/repositories/e/ebuild_id.cc8
5 files changed, 11 insertions, 2 deletions
diff --git a/paludis/distribution.cc b/paludis/distribution.cc
index 60f6b19..3149518 100644
--- a/paludis/distribution.cc
+++ b/paludis/distribution.cc
@@ -67,6 +67,7 @@ namespace paludis
values.insert(std::make_pair(strip_trailing_string(d->basename(), ".conf"),
make_shared_ptr(new Distribution(make_named_values<Distribution>(
value_for<n::concept_keyword>(k.get("concept_keyword")),
+ value_for<n::concept_license>(k.get("concept_license")),
value_for<n::concept_use>(k.get("concept_use")),
value_for<n::default_environment>(k.get("default_environment")),
value_for<n::extra_data_dir>(FSEntry(strip_trailing_string(stringify(d->realpath()), ".conf"))),
diff --git a/paludis/distribution.hh b/paludis/distribution.hh
index 946d41c..847bbbf 100644
--- a/paludis/distribution.hh
+++ b/paludis/distribution.hh
@@ -45,6 +45,7 @@ namespace paludis
namespace n
{
struct concept_keyword;
+ struct concept_license;
struct concept_use;
struct default_environment;
struct extra_data_dir;
@@ -68,6 +69,7 @@ namespace paludis
struct Distribution
{
NamedValue<n::concept_keyword, std::string> concept_keyword;
+ NamedValue<n::concept_license, std::string> concept_license;
NamedValue<n::concept_use, std::string> concept_use;
NamedValue<n::default_environment, std::string> default_environment;
NamedValue<n::extra_data_dir, FSEntry> extra_data_dir;
diff --git a/paludis/distributions/exherbo.conf b/paludis/distributions/exherbo.conf
index 6344a7f..1ba46ad 100644
--- a/paludis/distributions/exherbo.conf
+++ b/paludis/distributions/exherbo.conf
@@ -1,6 +1,7 @@
# Basic configuration for Exherbo
concept_keyword = platform
+concept_license = licence
concept_use = Option flag
default_environment = paludis
fallback_environment =
diff --git a/paludis/distributions/gentoo.conf b/paludis/distributions/gentoo.conf
index 63f1234..b4d6bde 100644
--- a/paludis/distributions/gentoo.conf
+++ b/paludis/distributions/gentoo.conf
@@ -1,6 +1,7 @@
# Basic configuration for Gentoo
concept_keyword = keyword
+concept_license = license
concept_use = USE flag
default_environment = paludis
fallback_environment = portage
diff --git a/paludis/repositories/e/ebuild_id.cc b/paludis/repositories/e/ebuild_id.cc
index 5abe2ca..47f4e43 100644
--- a/paludis/repositories/e/ebuild_id.cc
+++ b/paludis/repositories/e/ebuild_id.cc
@@ -353,14 +353,18 @@ EbuildID::need_masks_added() const
if (keywords_key())
if (! _imp->environment->accept_keywords(keywords_key()->value(), *this))
- add_mask(make_shared_ptr(new EUnacceptedMask('K', "keywords", keywords_key())));
+ add_mask(make_shared_ptr(new EUnacceptedMask('K',
+ DistributionData::get_instance()->distribution_from_string(
+ _imp->environment->distribution())->concept_keyword(), keywords_key())));
if (license_key())
{
LicenceChecker c(_imp->environment, &Environment::accept_license, this);
license_key()->value()->accept(c);
if (! c.ok)
- add_mask(make_shared_ptr(new EUnacceptedMask('L', "license", license_key())));
+ add_mask(make_shared_ptr(new EUnacceptedMask('L',
+ DistributionData::get_instance()->distribution_from_string(
+ _imp->environment->distribution())->concept_license(), license_key())));
}
if (! _imp->environment->unmasked_by_user(*this))