diff options
-rw-r--r-- | paludis/choice.hh | 9 | ||||
-rw-r--r-- | paludis/elike_choices.cc | 68 | ||||
-rw-r--r-- | paludis/elike_choices.hh | 18 | ||||
-rw-r--r-- | paludis/files.m4 | 1 | ||||
-rw-r--r-- | paludis/permitted_choice_value_parameter_values-fwd.hh | 31 | ||||
-rw-r--r-- | paludis/permitted_choice_value_parameter_values.cc | 55 | ||||
-rw-r--r-- | paludis/permitted_choice_value_parameter_values.hh | 83 | ||||
-rw-r--r-- | paludis/repositories/e/e_choice_value.cc | 13 | ||||
-rw-r--r-- | paludis/repositories/e/e_choice_value.hh | 7 | ||||
-rw-r--r-- | paludis/repositories/e/e_installed_repository_id.cc | 2 | ||||
-rw-r--r-- | paludis/repositories/e/ebuild_id.cc | 2 | ||||
-rw-r--r-- | paludis/repositories/fake/fake_package_id.cc | 5 |
12 files changed, 285 insertions, 9 deletions
diff --git a/paludis/choice.hh b/paludis/choice.hh index cd495982e..ae1622fe6 100644 --- a/paludis/choice.hh +++ b/paludis/choice.hh @@ -21,6 +21,7 @@ #define PALUDIS_GUARD_PALUDIS_CHOICE_HH 1 #include <paludis/choice-fwd.hh> +#include <paludis/permitted_choice_value_parameter_values-fwd.hh> #include <paludis/util/attributes.hh> #include <paludis/util/wrapped_forward_iterator.hh> #include <paludis/util/pimp.hh> @@ -371,6 +372,14 @@ namespace paludis */ virtual const std::string parameter() const PALUDIS_ATTRIBUTE((warn_unused_result)) = 0; + /** + * Permitted values for this flag's parameter, or null if there is no parameter. + * + * \since 0.59 + */ + virtual const std::shared_ptr<const PermittedChoiceValueParameterValues> permitted_parameter_values() const + PALUDIS_ATTRIBUTE((warn_unused_result)) = 0; + ///\} }; diff --git a/paludis/elike_choices.cc b/paludis/elike_choices.cc index 6e606b5cb..a82e609a4 100644 --- a/paludis/elike_choices.cc +++ b/paludis/elike_choices.cc @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2008, 2009, 2010 Ciaran McCreesh + * Copyright (c) 2008, 2009, 2010, 2011 Ciaran McCreesh * * This file is part of the Paludis package manager. Paludis is free software; * you can redistribute it and/or modify it under the terms of the GNU General @@ -19,13 +19,31 @@ #include <paludis/elike_choices.hh> #include <paludis/environment.hh> +#include <paludis/permitted_choice_value_parameter_values.hh> #include <paludis/util/tribool.hh> #include <paludis/util/stringify.hh> #include <paludis/util/destringify.hh> #include <paludis/util/log.hh> +#include <paludis/util/singleton-impl.hh> +#include <paludis/util/make_null_shared_ptr.hh> +#include <limits> using namespace paludis; +namespace +{ + struct CommonValues : + Singleton<CommonValues> + { + const std::shared_ptr<const PermittedChoiceValueParameterIntegerValue> permitted_jobs_values; + + CommonValues() : + permitted_jobs_values(new PermittedChoiceValueParameterIntegerValue(1, std::numeric_limits<int>::max())) + { + } + }; +} + const UnprefixedChoiceName ELikeStripChoiceValue::canonical_unprefixed_name() { @@ -94,6 +112,12 @@ ELikeStripChoiceValue::parameter() const return ""; } +const std::shared_ptr<const PermittedChoiceValueParameterValues> +ELikeStripChoiceValue::permitted_parameter_values() const +{ + return make_null_shared_ptr(); +} + const UnprefixedChoiceName ELikeSplitChoiceValue::canonical_unprefixed_name() { @@ -163,6 +187,12 @@ ELikeSplitChoiceValue::parameter() const return ""; } +const std::shared_ptr<const PermittedChoiceValueParameterValues> +ELikeSplitChoiceValue::permitted_parameter_values() const +{ + return make_null_shared_ptr(); +} + const UnprefixedChoiceName ELikeOptionalTestsChoiceValue::canonical_unprefixed_name() { @@ -231,6 +261,12 @@ ELikeOptionalTestsChoiceValue::parameter() const return ""; } +const std::shared_ptr<const PermittedChoiceValueParameterValues> +ELikeOptionalTestsChoiceValue::permitted_parameter_values() const +{ + return make_null_shared_ptr(); +} + const UnprefixedChoiceName ELikeRecommendedTestsChoiceValue::canonical_unprefixed_name() { @@ -299,6 +335,12 @@ ELikeRecommendedTestsChoiceValue::parameter() const return ""; } +const std::shared_ptr<const PermittedChoiceValueParameterValues> +ELikeRecommendedTestsChoiceValue::permitted_parameter_values() const +{ + return make_null_shared_ptr(); +} + const ChoicePrefixName paludis::canonical_build_options_prefix() { @@ -385,6 +427,12 @@ ELikeExpensiveTestsChoiceValue::parameter() const return ""; } +const std::shared_ptr<const PermittedChoiceValueParameterValues> +ELikeExpensiveTestsChoiceValue::permitted_parameter_values() const +{ + return make_null_shared_ptr(); +} + const UnprefixedChoiceName ELikeJobsChoiceValue::canonical_unprefixed_name() { @@ -475,6 +523,12 @@ ELikeJobsChoiceValue::parameter() const return _parameter; } +const std::shared_ptr<const PermittedChoiceValueParameterValues> +ELikeJobsChoiceValue::permitted_parameter_values() const +{ + return CommonValues::get_instance()->permitted_jobs_values; +} + const UnprefixedChoiceName ELikeTraceChoiceValue::canonical_unprefixed_name() { @@ -542,6 +596,12 @@ ELikeTraceChoiceValue::parameter() const return ""; } +const std::shared_ptr<const PermittedChoiceValueParameterValues> +ELikeTraceChoiceValue::permitted_parameter_values() const +{ + return make_null_shared_ptr(); +} + const UnprefixedChoiceName ELikePreserveWorkChoiceValue::canonical_unprefixed_name() { @@ -612,3 +672,9 @@ ELikePreserveWorkChoiceValue::parameter() const return ""; } +const std::shared_ptr<const PermittedChoiceValueParameterValues> +ELikePreserveWorkChoiceValue::permitted_parameter_values() const +{ + return make_null_shared_ptr(); +} + diff --git a/paludis/elike_choices.hh b/paludis/elike_choices.hh index 9304c7413..44030bfe1 100644 --- a/paludis/elike_choices.hh +++ b/paludis/elike_choices.hh @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2008, 2009, 2010 Ciaran McCreesh + * Copyright (c) 2008, 2009, 2010, 2011 Ciaran McCreesh * * This file is part of the Paludis package manager. Paludis is free software; * you can redistribute it and/or modify it under the terms of the GNU General @@ -48,6 +48,8 @@ namespace paludis virtual const std::string description() const PALUDIS_ATTRIBUTE((warn_unused_result)); virtual bool explicitly_listed() const PALUDIS_ATTRIBUTE((warn_unused_result)); virtual const std::string parameter() const PALUDIS_ATTRIBUTE((warn_unused_result)); + virtual const std::shared_ptr<const PermittedChoiceValueParameterValues> permitted_parameter_values() const + PALUDIS_ATTRIBUTE((warn_unused_result)); static const UnprefixedChoiceName canonical_unprefixed_name() PALUDIS_ATTRIBUTE((warn_unused_result)); static const ChoiceNameWithPrefix canonical_name_with_prefix() PALUDIS_ATTRIBUTE((warn_unused_result)); @@ -72,6 +74,8 @@ namespace paludis virtual const std::string description() const PALUDIS_ATTRIBUTE((warn_unused_result)); virtual bool explicitly_listed() const PALUDIS_ATTRIBUTE((warn_unused_result)); virtual const std::string parameter() const PALUDIS_ATTRIBUTE((warn_unused_result)); + virtual const std::shared_ptr<const PermittedChoiceValueParameterValues> permitted_parameter_values() const + PALUDIS_ATTRIBUTE((warn_unused_result)); static const UnprefixedChoiceName canonical_unprefixed_name() PALUDIS_ATTRIBUTE((warn_unused_result)); static const ChoiceNameWithPrefix canonical_name_with_prefix() PALUDIS_ATTRIBUTE((warn_unused_result)); @@ -97,6 +101,8 @@ namespace paludis virtual const std::string description() const PALUDIS_ATTRIBUTE((warn_unused_result)); virtual bool explicitly_listed() const PALUDIS_ATTRIBUTE((warn_unused_result)); virtual const std::string parameter() const PALUDIS_ATTRIBUTE((warn_unused_result)); + virtual const std::shared_ptr<const PermittedChoiceValueParameterValues> permitted_parameter_values() const + PALUDIS_ATTRIBUTE((warn_unused_result)); static const UnprefixedChoiceName canonical_unprefixed_name() PALUDIS_ATTRIBUTE((warn_unused_result)); static const ChoiceNameWithPrefix canonical_name_with_prefix() PALUDIS_ATTRIBUTE((warn_unused_result)); @@ -122,6 +128,8 @@ namespace paludis virtual const std::string description() const PALUDIS_ATTRIBUTE((warn_unused_result)); virtual bool explicitly_listed() const PALUDIS_ATTRIBUTE((warn_unused_result)); virtual const std::string parameter() const PALUDIS_ATTRIBUTE((warn_unused_result)); + virtual const std::shared_ptr<const PermittedChoiceValueParameterValues> permitted_parameter_values() const + PALUDIS_ATTRIBUTE((warn_unused_result)); static const UnprefixedChoiceName canonical_unprefixed_name() PALUDIS_ATTRIBUTE((warn_unused_result)); static const ChoiceNameWithPrefix canonical_name_with_prefix() PALUDIS_ATTRIBUTE((warn_unused_result)); @@ -147,6 +155,8 @@ namespace paludis virtual const std::string description() const PALUDIS_ATTRIBUTE((warn_unused_result)); virtual bool explicitly_listed() const PALUDIS_ATTRIBUTE((warn_unused_result)); virtual const std::string parameter() const PALUDIS_ATTRIBUTE((warn_unused_result)); + virtual const std::shared_ptr<const PermittedChoiceValueParameterValues> permitted_parameter_values() const + PALUDIS_ATTRIBUTE((warn_unused_result)); static const UnprefixedChoiceName canonical_unprefixed_name() PALUDIS_ATTRIBUTE((warn_unused_result)); static const ChoiceNameWithPrefix canonical_name_with_prefix() PALUDIS_ATTRIBUTE((warn_unused_result)); @@ -171,6 +181,8 @@ namespace paludis virtual const std::string description() const PALUDIS_ATTRIBUTE((warn_unused_result)); virtual bool explicitly_listed() const PALUDIS_ATTRIBUTE((warn_unused_result)); virtual const std::string parameter() const PALUDIS_ATTRIBUTE((warn_unused_result)); + virtual const std::shared_ptr<const PermittedChoiceValueParameterValues> permitted_parameter_values() const + PALUDIS_ATTRIBUTE((warn_unused_result)); static const UnprefixedChoiceName canonical_unprefixed_name() PALUDIS_ATTRIBUTE((warn_unused_result)); static const ChoiceNameWithPrefix canonical_name_with_prefix() PALUDIS_ATTRIBUTE((warn_unused_result)); @@ -194,6 +206,8 @@ namespace paludis virtual const std::string description() const PALUDIS_ATTRIBUTE((warn_unused_result)); virtual bool explicitly_listed() const PALUDIS_ATTRIBUTE((warn_unused_result)); virtual const std::string parameter() const PALUDIS_ATTRIBUTE((warn_unused_result)); + virtual const std::shared_ptr<const PermittedChoiceValueParameterValues> permitted_parameter_values() const + PALUDIS_ATTRIBUTE((warn_unused_result)); static const UnprefixedChoiceName canonical_unprefixed_name() PALUDIS_ATTRIBUTE((warn_unused_result)); static const ChoiceNameWithPrefix canonical_name_with_prefix() PALUDIS_ATTRIBUTE((warn_unused_result)); @@ -224,6 +238,8 @@ namespace paludis virtual const std::string description() const PALUDIS_ATTRIBUTE((warn_unused_result)); virtual bool explicitly_listed() const PALUDIS_ATTRIBUTE((warn_unused_result)); virtual const std::string parameter() const PALUDIS_ATTRIBUTE((warn_unused_result)); + virtual const std::shared_ptr<const PermittedChoiceValueParameterValues> permitted_parameter_values() const + PALUDIS_ATTRIBUTE((warn_unused_result)); static const UnprefixedChoiceName canonical_unprefixed_name() PALUDIS_ATTRIBUTE((warn_unused_result)); static const ChoiceNameWithPrefix canonical_name_with_prefix() PALUDIS_ATTRIBUTE((warn_unused_result)); diff --git a/paludis/files.m4 b/paludis/files.m4 index 4b1c11286..dd29fe5f6 100644 --- a/paludis/files.m4 +++ b/paludis/files.m4 @@ -82,6 +82,7 @@ add(`package_id', `hh', `cc', `fwd', `se') add(`paludis', `hh') add(`paludislike_options_conf', `hh', `cc', `fwd') add(`partially_made_package_dep_spec', `hh', `cc', `fwd', `se') +add(`permitted_choice_value_parameter_values', `hh', `cc', `fwd') add(`pretty_print_options', `hh', `cc', `fwd', `se') add(`pretty_printer', `hh', `cc', `fwd') add(`repository', `hh', `fwd', `cc') diff --git a/paludis/permitted_choice_value_parameter_values-fwd.hh b/paludis/permitted_choice_value_parameter_values-fwd.hh new file mode 100644 index 000000000..600f6e488 --- /dev/null +++ b/paludis/permitted_choice_value_parameter_values-fwd.hh @@ -0,0 +1,31 @@ +/* vim: set sw=4 sts=4 et foldmethod=syntax : */ + +/* + * Copyright (c) 2011 Ciaran McCreesh + * + * This file is part of the Paludis package manager. Paludis is free software; + * you can redistribute it and/or modify it under the terms of the GNU General + * Public License version 2, as published by the Free Software Foundation. + * + * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License along with + * this program; if not, write to the Free Software Foundation, Inc., 59 Temple + * Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef PALUDIS_GUARD_PALUDIS_PERMITTED_CHOICE_VALUE_PARAMETER_VALUES_FWD_HH +#define PALUDIS_GUARD_PALUDIS_PERMITTED_CHOICE_VALUE_PARAMETER_VALUES_FWD_HH 1 + +namespace paludis +{ + class PermittedChoiceValueParameterValues; + + class PermittedChoiceValueParameterIntegerValue; + class PermittedChoiceValueParameterEnumValue; +} + +#endif diff --git a/paludis/permitted_choice_value_parameter_values.cc b/paludis/permitted_choice_value_parameter_values.cc new file mode 100644 index 000000000..e8bdf3bc6 --- /dev/null +++ b/paludis/permitted_choice_value_parameter_values.cc @@ -0,0 +1,55 @@ +/* vim: set sw=4 sts=4 et foldmethod=syntax : */ + +/* + * Copyright (c) 2011 Ciaran McCreesh + * + * This file is part of the Paludis package manager. Paludis is free software; + * you can redistribute it and/or modify it under the terms of the GNU General + * Public License version 2, as published by the Free Software Foundation. + * + * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License along with + * this program; if not, write to the Free Software Foundation, Inc., 59 Temple + * Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include <paludis/permitted_choice_value_parameter_values.hh> + +using namespace paludis; + +PermittedChoiceValueParameterValues::~PermittedChoiceValueParameterValues() = default; + +PermittedChoiceValueParameterIntegerValue::PermittedChoiceValueParameterIntegerValue(const int min, const int max) : + _min(min), + _max(max) +{ +} + +int +PermittedChoiceValueParameterIntegerValue::minimum_allowed_value() const +{ + return _min; +} + +int +PermittedChoiceValueParameterIntegerValue::maximum_allowed_value() const +{ + return _max; +} + +PermittedChoiceValueParameterEnumValue::PermittedChoiceValueParameterEnumValue( + const std::shared_ptr<const Map<std::string, std::string> > & a) : + _allowed(a) +{ +} + +const std::shared_ptr<const Map<std::string, std::string> > +PermittedChoiceValueParameterEnumValue::allowed_values_and_descriptions() const +{ + return _allowed; +} + diff --git a/paludis/permitted_choice_value_parameter_values.hh b/paludis/permitted_choice_value_parameter_values.hh new file mode 100644 index 000000000..bae36ce8b --- /dev/null +++ b/paludis/permitted_choice_value_parameter_values.hh @@ -0,0 +1,83 @@ +/* vim: set sw=4 sts=4 et foldmethod=syntax : */ + +/* + * Copyright (c) 2011 Ciaran McCreesh + * + * This file is part of the Paludis package manager. Paludis is free software; + * you can redistribute it and/or modify it under the terms of the GNU General + * Public License version 2, as published by the Free Software Foundation. + * + * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License along with + * this program; if not, write to the Free Software Foundation, Inc., 59 Temple + * Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef PALUDIS_GUARD_PALUDIS_PERMITTED_CHOICE_VALUE_PARAMETER_VALUES_HH +#define PALUDIS_GUARD_PALUDIS_PERMITTED_CHOICE_VALUE_PARAMETER_VALUES_HH 1 + +#include <paludis/permitted_choice_value_parameter_values-fwd.hh> +#include <paludis/util/attributes.hh> +#include <paludis/util/simple_visitor.hh> +#include <paludis/util/type_list.hh> +#include <paludis/util/map-fwd.hh> +#include <memory> + +namespace paludis +{ + class PALUDIS_VISIBLE PermittedChoiceValueParameterValues : + public virtual DeclareAbstractAcceptMethods<PermittedChoiceValueParameterValues, MakeTypeList< + PermittedChoiceValueParameterIntegerValue, + PermittedChoiceValueParameterEnumValue + >::Type> + { + public: + virtual ~PermittedChoiceValueParameterValues(); + }; + + class PALUDIS_VISIBLE PermittedChoiceValueParameterIntegerValue : + public PermittedChoiceValueParameterValues, + public ImplementAcceptMethods<PermittedChoiceValueParameterValues, PermittedChoiceValueParameterIntegerValue> + { + private: + int _min, _max; + + public: + PermittedChoiceValueParameterIntegerValue(const int min, const int max); + + /** + * Minimum permitted value, or std::numeric_limits<int>::min() for + * no minumum. + */ + int minimum_allowed_value() const PALUDIS_ATTRIBUTE((warn_unused_result)); + + /** + * Maximum permitted value, or std::numeric_limits<int>::max() for + * no maximum. + */ + int maximum_allowed_value() const PALUDIS_ATTRIBUTE((warn_unused_result)); + }; + + class PALUDIS_VISIBLE PermittedChoiceValueParameterEnumValue : + public PermittedChoiceValueParameterValues, + public ImplementAcceptMethods<PermittedChoiceValueParameterValues, PermittedChoiceValueParameterEnumValue> + { + private: + const std::shared_ptr<const Map<std::string, std::string> > _allowed; + + public: + PermittedChoiceValueParameterEnumValue( + const std::shared_ptr<const Map<std::string, std::string> > &); + + /** + * Permitted values, with descriptions. + */ + const std::shared_ptr<const Map<std::string, std::string> > allowed_values_and_descriptions() const PALUDIS_ATTRIBUTE((warn_unused_result)); + }; +} + +#endif diff --git a/paludis/repositories/e/e_choice_value.cc b/paludis/repositories/e/e_choice_value.cc index 86157c616..fec3508e0 100644 --- a/paludis/repositories/e/e_choice_value.cc +++ b/paludis/repositories/e/e_choice_value.cc @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2008, 2009 Ciaran McCreesh + * Copyright (c) 2008, 2009, 2011 Ciaran McCreesh * * This file is part of the Paludis package manager. Paludis is free software; * you can redistribute it and/or modify it under the terms of the GNU General @@ -26,7 +26,7 @@ using namespace paludis::erepository; EChoiceValue::EChoiceValue(const ChoicePrefixName & r, const UnprefixedChoiceName & v, const ChoiceNameWithPrefix & np, const QualifiedPackageName & p, const std::shared_ptr<const UseDesc> & d, bool b, bool def, bool l, bool x, const std::string & o, - const std::string & pv) : + const std::string & pv, const std::shared_ptr<const PermittedChoiceValueParameterValues> & e) : _prefix(r), _unprefixed_name(v), _name_with_prefix(np), @@ -37,7 +37,8 @@ EChoiceValue::EChoiceValue(const ChoicePrefixName & r, const UnprefixedChoiceNam _locked(l), _explicitly_listed(x), _override_description(o), - _parameter(pv) + _parameter(pv), + _permitted(e) { } @@ -93,3 +94,9 @@ EChoiceValue::parameter() const return _parameter; } +const std::shared_ptr<const PermittedChoiceValueParameterValues> +EChoiceValue::permitted_parameter_values() const +{ + return _permitted; +} + diff --git a/paludis/repositories/e/e_choice_value.hh b/paludis/repositories/e/e_choice_value.hh index a27c5a530..71fc2604e 100644 --- a/paludis/repositories/e/e_choice_value.hh +++ b/paludis/repositories/e/e_choice_value.hh @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2008, 2009, 2010 Ciaran McCreesh + * Copyright (c) 2008, 2009, 2010, 2011 Ciaran McCreesh * * This file is part of the Paludis package manager. Paludis is free software; * you can redistribute it and/or modify it under the terms of the GNU General @@ -47,6 +47,7 @@ namespace paludis const bool _explicitly_listed; const std::string _override_description; const std::string _parameter; + const std::shared_ptr<const PermittedChoiceValueParameterValues> _permitted; public: EChoiceValue(const ChoicePrefixName & r, @@ -57,7 +58,8 @@ namespace paludis bool b, bool def, bool l, bool x, const std::string & o, - const std::string & pr); + const std::string & pr, + const std::shared_ptr<const PermittedChoiceValueParameterValues> & e); const UnprefixedChoiceName unprefixed_name() const; const ChoiceNameWithPrefix name_with_prefix() const; @@ -67,6 +69,7 @@ namespace paludis const std::string description() const; bool explicitly_listed() const; const std::string parameter() const PALUDIS_ATTRIBUTE((warn_unused_result)); + const std::shared_ptr<const PermittedChoiceValueParameterValues> permitted_parameter_values() const PALUDIS_ATTRIBUTE((warn_unused_result)); }; } } diff --git a/paludis/repositories/e/e_installed_repository_id.cc b/paludis/repositories/e/e_installed_repository_id.cc index e27057236..7a43ff606 100644 --- a/paludis/repositories/e/e_installed_repository_id.cc +++ b/paludis/repositories/e/e_installed_repository_id.cc @@ -1065,7 +1065,7 @@ EInstalledRepositoryID::make_choice_value(const std::shared_ptr<const Choice> & enabled = (raw_use_key()->value()->end() != raw_use_key()->value()->find(name_with_prefix)); return std::make_shared<EChoiceValue>(c->prefix(), v, ChoiceNameWithPrefix(name_with_prefix), name(), std::shared_ptr<const UseDesc>(), - enabled, enabled, true, explicitly_listed, override_description, ""); + enabled, enabled, true, explicitly_listed, override_description, "", make_null_shared_ptr()); } void diff --git a/paludis/repositories/e/ebuild_id.cc b/paludis/repositories/e/ebuild_id.cc index 86933dd0c..0b3a03051 100644 --- a/paludis/repositories/e/ebuild_id.cc +++ b/paludis/repositories/e/ebuild_id.cc @@ -1484,7 +1484,7 @@ EbuildID::make_choice_value( return std::make_shared<EChoiceValue>(choice->prefix(), value_name, ChoiceNameWithPrefix(name_with_prefix), name(), e_repo->use_desc(), - enabled, enabled_by_default, force_locked || locked, explicitly_listed, override_description, ""); + enabled, enabled_by_default, force_locked || locked, explicitly_listed, override_description, "", make_null_shared_ptr()); } namespace diff --git a/paludis/repositories/fake/fake_package_id.cc b/paludis/repositories/fake/fake_package_id.cc index ea827b956..bbfe333de 100644 --- a/paludis/repositories/fake/fake_package_id.cc +++ b/paludis/repositories/fake/fake_package_id.cc @@ -463,6 +463,11 @@ namespace { return env->value_for_choice_parameter(id, choice, value_name); } + + virtual const std::shared_ptr<const PermittedChoiceValueParameterValues> permitted_parameter_values() const + { + return make_null_shared_ptr(); + } }; } |