#include <test_environment.hh>
Basic operations | |
TestEnvironment () | |
TestEnvironment (const FSEntry &) | |
~TestEnvironment () | |
Public Member Functions | |
virtual std::tr1::shared_ptr < PackageDatabase > | package_database () PALUDIS_ATTRIBUTE((warn_unused_result)) |
virtual std::tr1::shared_ptr < const PackageDatabase > | package_database () const PALUDIS_ATTRIBUTE((warn_unused_result)) |
virtual std::string | paludis_command () const PALUDIS_ATTRIBUTE((warn_unused_result)) |
virtual void | set_paludis_command (const std::string &) |
const std::tr1::shared_ptr < const PackageID > | fetch_package_id (const QualifiedPackageName &, const VersionSpec &, const RepositoryName &) const PALUDIS_ATTRIBUTE((warn_unused_result)) |
virtual bool | accept_license (const std::string &, const PackageID &) const PALUDIS_ATTRIBUTE((warn_unused_result)) |
virtual bool | accept_keywords (const std::tr1::shared_ptr< const KeywordNameSet > &, const PackageID &) const PALUDIS_ATTRIBUTE((warn_unused_result)) |
virtual const std::tr1::shared_ptr< const Mask > | mask_for_breakage (const PackageID &) const PALUDIS_ATTRIBUTE((warn_unused_result)) |
virtual const std::tr1::shared_ptr< const Mask > | mask_for_user (const PackageID &, const bool) const PALUDIS_ATTRIBUTE((warn_unused_result)) |
virtual bool | unmasked_by_user (const PackageID &) const PALUDIS_ATTRIBUTE((warn_unused_result)) |
virtual std::tr1::shared_ptr < const FSEntrySequence > | hook_dirs () const PALUDIS_ATTRIBUTE((warn_unused_result)) |
virtual const FSEntry | root () const |
virtual uid_t | reduced_uid () const |
virtual gid_t | reduced_gid () const |
virtual std::tr1::shared_ptr < const MirrorsSequence > | mirrors (const std::string &) const PALUDIS_ATTRIBUTE((warn_unused_result)) |
virtual HookResult | perform_hook (const Hook &) const PALUDIS_ATTRIBUTE((warn_unused_result)) |
virtual void | add_to_world (const QualifiedPackageName &) const |
virtual void | add_to_world (const SetName &) const |
virtual void | remove_from_world (const QualifiedPackageName &) const |
virtual void | remove_from_world (const SetName &) const |
virtual const std::tr1::shared_ptr< const MetadataValueKey< std::string > > | format_key () const |
virtual const std::tr1::shared_ptr< const MetadataValueKey< FSEntry > > | config_location_key () const |
virtual const Tribool | want_choice_enabled (const std::tr1::shared_ptr< const PackageID > &, const std::tr1::shared_ptr< const Choice > &, const UnprefixedChoiceName &) const PALUDIS_ATTRIBUTE((warn_unused_result)) |
virtual const std::string | value_for_choice_parameter (const std::tr1::shared_ptr< const PackageID > &, const std::tr1::shared_ptr< const Choice > &, const UnprefixedChoiceName &) const PALUDIS_ATTRIBUTE((warn_unused_result)) |
virtual std::tr1::shared_ptr < const Set < UnprefixedChoiceName > > | known_choice_value_names (const std::tr1::shared_ptr< const PackageID > &, const std::tr1::shared_ptr< const Choice > &) const PALUDIS_ATTRIBUTE((warn_unused_result)) |
virtual const std::tr1::shared_ptr < OutputManager > | create_output_manager (const CreateOutputManagerInfo &) const |
void | set_want_choice_enabled (const ChoicePrefixName &, const UnprefixedChoiceName &, const Tribool) |
Protected Member Functions | |
virtual void | need_keys_added () const |
virtual void | populate_sets () const |
virtual void paludis::TestEnvironment::need_keys_added | ( | ) | const [protected, virtual] |
This method will be called before any of the metadata key iteration methods does its work. It can be used by subclasses to implement as-needed loading of keys.
Implements paludis::MetadataKeyHolder.
virtual std::string paludis::TestEnvironment::paludis_command | ( | ) | const [virtual] |
Return the command used to launch paludis (the client).
Implements paludis::Environment.
virtual void paludis::TestEnvironment::set_paludis_command | ( | const std::string & | ) | [virtual] |
Change the command used to launch paludis (the client).
Implements paludis::Environment.
const std::tr1::shared_ptr<const PackageID> paludis::TestEnvironment::fetch_package_id | ( | const QualifiedPackageName & | , | |
const VersionSpec & | , | |||
const RepositoryName & | ||||
) | const |
Convenience way of getting a package id.
virtual bool paludis::TestEnvironment::accept_license | ( | const std::string & | , | |
const PackageID & | ||||
) | const [virtual] |
Do we accept a particular license for a particular package?
Used by PackageID implementations. Generally PackageID's masks methods should be used rather than calling this directly.
Implements paludis::Environment.
virtual bool paludis::TestEnvironment::accept_keywords | ( | const std::tr1::shared_ptr< const KeywordNameSet > & | , | |
const PackageID & | ||||
) | const [virtual] |
Do we accept any of the specified keywords for a particular package?
If the collection includes "*", should return true.
Used by PackageID implementations. Generally PackageID's masks methods should be used rather than calling this directly.
Implements paludis::Environment.
virtual const std::tr1::shared_ptr<const Mask> paludis::TestEnvironment::mask_for_breakage | ( | const PackageID & | ) | const [virtual] |
Do we have a 'breaks' mask for a particular package?
Returns a zero pointer if no.
Used by PackageID implementations. Generally PackageID's masks methods should be used rather than calling this directly.
Implements paludis::Environment.
virtual const std::tr1::shared_ptr<const Mask> paludis::TestEnvironment::mask_for_user | ( | const PackageID & | , | |
const | will_be_used_for_overridden | |||
) | const [virtual] |
Do we have a 'user' mask for a particular package?
Returns a zero pointer if no.
If the second parameter is true, return a Mask suitable for being added to an OverriddenMask.
Used by PackageID implementations. Generally PackageID's masks methods should be used rather than calling this directly.
Implements paludis::Environment.
virtual bool paludis::TestEnvironment::unmasked_by_user | ( | const PackageID & | ) | const [virtual] |
Do we have a user unmask for a particular package?
This is only applied to repository and profile style masks, not keywords, licences etc. If true, user_mask shouldn't be used.
Used by PackageID implementations. Generally PackageID's masks methods should be used rather than calling this directly.
Implements paludis::Environment.
virtual std::tr1::shared_ptr<const FSEntrySequence> paludis::TestEnvironment::hook_dirs | ( | ) | const [virtual] |
Return directories to search for hooks.
Implements paludis::Environment.
virtual const FSEntry paludis::TestEnvironment::root | ( | ) | const [virtual] |
Our root location for installs.
Implements paludis::Environment.
virtual uid_t paludis::TestEnvironment::reduced_uid | ( | ) | const [virtual] |
User id to use when reduced privs are permissible.
Implements paludis::Environment.
virtual gid_t paludis::TestEnvironment::reduced_gid | ( | ) | const [virtual] |
Group id to use when reduced privs are permissible.
Implements paludis::Environment.
virtual std::tr1::shared_ptr<const MirrorsSequence> paludis::TestEnvironment::mirrors | ( | const std::string & | ) | const [virtual] |
Return the mirror URI prefixes for a named mirror.
Implements paludis::Environment.
virtual HookResult paludis::TestEnvironment::perform_hook | ( | const Hook & | ) | const [virtual] |
Perform a hook.
Implements paludis::Environment.
virtual void paludis::TestEnvironment::add_to_world | ( | const QualifiedPackageName & | ) | const [virtual] |
Add this package to world.
Implements paludis::Environment.
virtual void paludis::TestEnvironment::add_to_world | ( | const SetName & | ) | const [virtual] |
Add this set to world.
Implements paludis::Environment.
virtual void paludis::TestEnvironment::remove_from_world | ( | const QualifiedPackageName & | ) | const [virtual] |
Remove this package from world, if it is present.
Implements paludis::Environment.
virtual void paludis::TestEnvironment::remove_from_world | ( | const SetName & | ) | const [virtual] |
Remove this set from world, if it is present.
Implements paludis::Environment.
virtual const std::tr1::shared_ptr<const MetadataValueKey<std::string> > paludis::TestEnvironment::format_key | ( | ) | const [virtual] |
The format_key, if non-zero, holds our environment's format. Environment implementations should not return zero here, but clients should still check.
Implements paludis::Environment.
virtual const std::tr1::shared_ptr<const MetadataValueKey<FSEntry> > paludis::TestEnvironment::config_location_key | ( | ) | const [virtual] |
The config_location_key, if non-zero, specifies the location of the configuration file or directory, the contents of which depends on the format returned by format_key.
Implements paludis::Environment.
virtual const Tribool paludis::TestEnvironment::want_choice_enabled | ( | const std::tr1::shared_ptr< const PackageID > & | , | |
const std::tr1::shared_ptr< const Choice > & | , | |||
const UnprefixedChoiceName & | ||||
) | const [virtual] |
Do we want a choice enabled for a particular package?
Only for use by Repository, to get defaults from the environment. Clients should query the metadata key directly.
The third parameter is the name of the value, which might not have been created yet.
Implements paludis::Environment.
virtual const std::string paludis::TestEnvironment::value_for_choice_parameter | ( | const std::tr1::shared_ptr< const PackageID > & | , | |
const std::tr1::shared_ptr< const Choice > & | , | |||
const UnprefixedChoiceName & | ||||
) | const [virtual] |
What string value, if any, is set for the parameter for a particular choice for a particular package?
There is no difference between "not set" and "set to an empty string".
Only for use by Repository, to get defaults from the environment. Clients should query the metadata key directly.
The third parameter is the name of the value, which might not have been created yet.
Implements paludis::Environment.
virtual std::tr1::shared_ptr<const Set<UnprefixedChoiceName> > paludis::TestEnvironment::known_choice_value_names | ( | const std::tr1::shared_ptr< const PackageID > & | , | |
const std::tr1::shared_ptr< const Choice > & | ||||
) | const [virtual] |
Return a collection of known value names for a particular choice.
Only for use by Repository, to get defaults from the environment. Clients should query the metadata key directly.
This is to deal with cases like USE_EXPAND values, where the repository doesn't know all possible values.
Implements paludis::Environment.
virtual const std::tr1::shared_ptr<OutputManager> paludis::TestEnvironment::create_output_manager | ( | const CreateOutputManagerInfo & | ) | const [virtual] |