aboutsummaryrefslogtreecommitdiff
path: root/paludis/user_dep_spec.hh
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-06-14 19:58:35 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-06-15 10:42:03 +0100
commit706d8f3b19ec8ceca9ca19b0a9b3837346d539f0 (patch)
tree2cdc9a3e5e2d1a9b236d4ecd4ce5ff818d53fcca /paludis/user_dep_spec.hh
parent0d9e1813f031b6b4449654265f66b92595f73122 (diff)
downloadpaludis-706d8f3b19ec8ceca9ca19b0a9b3837346d539f0.tar.gz
paludis-706d8f3b19ec8ceca9ca19b0a9b3837346d539f0.tar.xz
Make parse_user_package_dep_spec more flexible.
parse_user_package_dep_spec will now disambiguate pkg to cat/pkg automatically. To do this it needs an Environment parameter, and optionally also a Filter. UserPackageDepSpecOptions now includes updso_no_disambiguation to disable this. If UserPackageDepSpecOptions includes updso_throw_if_set, and if given something that is a valid set, parse_user_package_dep_spec will throw GotASetNotAPackageDepSpec.
Diffstat (limited to 'paludis/user_dep_spec.hh')
-rw-r--r--paludis/user_dep_spec.hh13
1 files changed, 13 insertions, 0 deletions
diff --git a/paludis/user_dep_spec.hh b/paludis/user_dep_spec.hh
index c5bda6839..6af3b85d6 100644
--- a/paludis/user_dep_spec.hh
+++ b/paludis/user_dep_spec.hh
@@ -23,9 +23,22 @@
#include <paludis/user_dep_spec-fwd.hh>
#include <paludis/dep_spec.hh>
#include <paludis/slot_requirement.hh>
+#include <paludis/filter.hh>
namespace paludis
{
+ /**
+ * Create a PackageDepSpec from user input.
+ *
+ * \ingroup g_dep_spec
+ * \since 0.28
+ */
+ PackageDepSpec parse_user_package_dep_spec(
+ const std::string &,
+ const Environment * const,
+ const UserPackageDepSpecOptions &,
+ const Filter & = filter::All()) PALUDIS_VISIBLE;
+
class PALUDIS_VISIBLE UserSlotExactRequirement :
public SlotExactRequirement
{