aboutsummaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-03-10 21:04:29 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-03-10 21:56:32 +0000
commit57e75ec95dffd6bccd5bfa3dbb2544d53d3f05f6 (patch)
tree6bdff8312f1591ff888d5f614893044daea47db1 /python
parent2ae50ba059835a056ac724a34d985fb73ae49cf6 (diff)
downloadpaludis-57e75ec95dffd6bccd5bfa3dbb2544d53d3f05f6.tar.gz
paludis-57e75ec95dffd6bccd5bfa3dbb2544d53d3f05f6.tar.xz
Don't need block_kinds any more
Diffstat (limited to 'python')
-rw-r--r--python/dep_spec.cc26
-rw-r--r--python/dep_spec.hh4
-rwxr-xr-xpython/dep_spec_TEST.py2
3 files changed, 7 insertions, 25 deletions
diff --git a/python/dep_spec.cc b/python/dep_spec.cc
index 5d7bb5e8d..b53d3a768 100644
--- a/python/dep_spec.cc
+++ b/python/dep_spec.cc
@@ -428,17 +428,15 @@ PythonSimpleURIDepSpec::PythonSimpleURIDepSpec(const SimpleURIDepSpec & d) :
{
}
-PythonBlockDepSpec::PythonBlockDepSpec(const std::string & t, const std::shared_ptr<const PythonPackageDepSpec> & a, const BlockKind s) :
+PythonBlockDepSpec::PythonBlockDepSpec(const std::string & t, const std::shared_ptr<const PythonPackageDepSpec> & a) :
PythonStringDepSpec(t),
- _spec(a),
- _kind(s)
+ _spec(a)
{
}
PythonBlockDepSpec::PythonBlockDepSpec(const BlockDepSpec & d) :
PythonStringDepSpec(d.text()),
- _spec(std::make_shared<PythonPackageDepSpec>(d.blocking())),
- _kind(d.block_kind())
+ _spec(std::make_shared<PythonPackageDepSpec>(d.blocking()))
{
}
@@ -448,12 +446,6 @@ PythonBlockDepSpec::blocking() const
return _spec;
}
-BlockKind
-PythonBlockDepSpec::block_kind() const
-{
- return _kind;
-}
-
PythonFetchableURIDepSpec::PythonFetchableURIDepSpec(const std::string & s) :
PythonStringDepSpec(s)
{
@@ -948,7 +940,7 @@ template <typename H_>
void
SpecTreeFromPython<H_>::real_visit(const PythonBlockDepSpec & d)
{
- _add_to->append(std::make_shared<BlockDepSpec>(d.text(), *d.blocking(), d.block_kind()));
+ _add_to->append(std::make_shared<BlockDepSpec>(d.text(), *d.blocking()));
}
template <typename H_>
@@ -1069,9 +1061,6 @@ void expose_dep_spec()
enum_auto("UserPackageDepSpecOption", last_updso,
"Options for parse_user_package_dep_spec.");
- enum_auto("BlockKind", last_bk,
- "Options for BlockDepSpec.");
-
/**
* Options
*/
@@ -1371,18 +1360,13 @@ void expose_dep_spec()
"BlockDepSpec",
"A BlockDepSpec represents a block on a package name (for example, 'app-editors/vim'), \n"
"possibly with associated version and SLOT restrictions.",
- bp::init<std::string, std::shared_ptr<const PythonPackageDepSpec>, BlockKind>("__init__(string, PackageDepSpec, BlockKind)")
+ bp::init<std::string, std::shared_ptr<const PythonPackageDepSpec> >("__init__(string, PackageDepSpec)")
)
.add_property("blocking", &PythonBlockDepSpec::blocking,
"[ro] PackageDepSpec\n"
"The spec we're blocking."
)
- .add_property("block_kind", &PythonBlockDepSpec::block_kind,
- "[ro] BlockKind\n"
- "Are we a strong block?"
- )
-
//Work around epydoc bug
.add_property("text", &PythonBlockDepSpec::text,
"[ro] string\n"
diff --git a/python/dep_spec.hh b/python/dep_spec.hh
index a33adb6c7..1a10fc191 100644
--- a/python/dep_spec.hh
+++ b/python/dep_spec.hh
@@ -246,14 +246,12 @@ namespace paludis
{
private:
std::shared_ptr<const PythonPackageDepSpec> _spec;
- BlockKind _kind;
public:
- PythonBlockDepSpec(const std::string &, const std::shared_ptr<const PythonPackageDepSpec> &, const BlockKind);
+ PythonBlockDepSpec(const std::string &, const std::shared_ptr<const PythonPackageDepSpec> &);
PythonBlockDepSpec(const BlockDepSpec &);
std::shared_ptr<const PythonPackageDepSpec> blocking() const;
- BlockKind block_kind() const;
};
class PALUDIS_VISIBLE PythonURILabelsDepSpec :
diff --git a/python/dep_spec_TEST.py b/python/dep_spec_TEST.py
index 375e7ee01..ec22662c4 100755
--- a/python/dep_spec_TEST.py
+++ b/python/dep_spec_TEST.py
@@ -31,7 +31,7 @@ class TestCase_1_DepSpecs(unittest.TestCase):
self.pds3 = parse_user_package_dep_spec("*/*::testrepo", self.env,
[UserPackageDepSpecOption.ALLOW_WILDCARDS])
self.pds4 = parse_user_package_dep_spec("cat/pkg::testrepo", self.env, [])
- self.bds = BlockDepSpec("!>=foo/bar-1:100::testrepo", self.pds, BlockKind.WEAK)
+ self.bds = BlockDepSpec("!>=foo/bar-1:100::testrepo", self.pds)
self.nds = NamedSetDepSpec("system")
def test_01_init(self):