aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-02-26 16:01:02 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-02-26 16:15:55 +0000
commitf0e47a5bbc492e6bc93c52af1fbbfe77c3eeb756 (patch)
tree9c2126c5181b4dfb0b9184017493d2db811febd2
parentd465cb3a77b010a7c0ab791e69012143ad5405b7 (diff)
downloadpaludis-f0e47a5bbc492e6bc93c52af1fbbfe77c3eeb756.tar.gz
paludis-f0e47a5bbc492e6bc93c52af1fbbfe77c3eeb756.tar.xz
Add tokens to RepositoryMaskInfo
-rw-r--r--paludis/mask.hh2
-rw-r--r--paludis/repositories/e/e_repository_mask_file.cc6
-rw-r--r--python/mask.cc7
-rwxr-xr-xpython/metadata_key_TEST.py2
4 files changed, 12 insertions, 5 deletions
diff --git a/paludis/mask.hh b/paludis/mask.hh
index 5528842..90dfce4 100644
--- a/paludis/mask.hh
+++ b/paludis/mask.hh
@@ -49,6 +49,7 @@ namespace paludis
typedef Name<struct name_mask> mask;
typedef Name<struct name_mask_file> mask_file;
typedef Name<struct name_override_reason> override_reason;
+ typedef Name<struct name_token> token;
}
/**
@@ -66,6 +67,7 @@ namespace paludis
{
NamedValue<n::comment, std::shared_ptr<const Sequence<std::string> > > comment;
NamedValue<n::mask_file, FSPath> mask_file;
+ NamedValue<n::token, std::string> token;
};
/**
diff --git a/paludis/repositories/e/e_repository_mask_file.cc b/paludis/repositories/e/e_repository_mask_file.cc
index 9a548f1..edae90d 100644
--- a/paludis/repositories/e/e_repository_mask_file.cc
+++ b/paludis/repositories/e/e_repository_mask_file.cc
@@ -84,7 +84,11 @@ MaskFile::MaskFile(const FSPath & f, const LineConfigFileOptions & opts) :
}
_imp->lines.push_back(std::make_pair(*it, std::shared_ptr<RepositoryMaskInfo>(std::make_shared<RepositoryMaskInfo>(
- make_named_values<RepositoryMaskInfo>(n::comment() = comment, n::mask_file() = f)))));
+ make_named_values<RepositoryMaskInfo>(
+ n::comment() = comment,
+ n::mask_file() = f,
+ n::token() = ""
+ )))));
comment_used = true;
}
}
diff --git a/python/mask.cc b/python/mask.cc
index 8884cd3..60ef4a5 100644
--- a/python/mask.cc
+++ b/python/mask.cc
@@ -31,11 +31,12 @@ namespace bp = boost::python;
namespace
{
std::shared_ptr<RepositoryMaskInfo> make_repository_mask_info(
- const std::shared_ptr<const Sequence<std::string> > & s, const FSPath & f)
+ const std::shared_ptr<const Sequence<std::string> > & s, const FSPath & f, const std::string & t)
{
return std::make_shared<RepositoryMaskInfo>(make_named_values<RepositoryMaskInfo>(
n::comment() = s,
- n::mask_file() = f
+ n::mask_file() = f,
+ n::token() = t
));
}
}
@@ -300,7 +301,7 @@ void expose_mask()
.def("__init__",
bp::make_constructor(&make_repository_mask_info),
- "__init__(list of string, path_str)"
+ "__init__(list of string, path_str, token_str)"
)
.add_property("mask_file",
diff --git a/python/metadata_key_TEST.py b/python/metadata_key_TEST.py
index 92a0d6a..23c7dec 100755
--- a/python/metadata_key_TEST.py
+++ b/python/metadata_key_TEST.py
@@ -151,7 +151,7 @@ class TestCase_02_MetadataKeys_suclassing(unittest.TestCase):
MetadataRepositoryMaskInfoKey.__init__(self)
def value(self):
- return RepositoryMaskInfo(["comment"], "/foo")
+ return RepositoryMaskInfo(["comment"], "/foo", "")
def raw_name(self):
return "raw"