|
paludis Version 3.0.2
The one true package mangler
|
#include <test_environment.hh>
Public Member Functions | |
| bool | accept_license (const std::string &, const std::shared_ptr< const PackageID > &) const override PALUDIS_ATTRIBUTE((warn_unused_result)) |
| bool | accept_keywords (const std::shared_ptr< const KeywordNameSet > &, const std::shared_ptr< const PackageID > &) const override PALUDIS_ATTRIBUTE((warn_unused_result)) |
| const std::shared_ptr< const Mask > | mask_for_user (const std::shared_ptr< const PackageID > &, const bool) const override PALUDIS_ATTRIBUTE((warn_unused_result)) |
| bool | unmasked_by_user (const std::shared_ptr< const PackageID > &, const std::string &) const override PALUDIS_ATTRIBUTE((warn_unused_result)) |
| std::shared_ptr< const FSPathSequence > | hook_dirs () const override PALUDIS_ATTRIBUTE((warn_unused_result)) |
| std::string | reduced_username () const override |
| uid_t | reduced_uid () const override |
| gid_t | reduced_gid () const override |
| std::shared_ptr< const MirrorsSequence > | mirrors (const std::string &) const override PALUDIS_ATTRIBUTE((warn_unused_result)) |
| HookResult | perform_hook (const Hook &, const std::shared_ptr< OutputManager > &) const override PALUDIS_ATTRIBUTE((warn_unused_result)) |
| bool | add_to_world (const QualifiedPackageName &) const override |
| bool | add_to_world (const SetName &) const override |
| bool | remove_from_world (const QualifiedPackageName &) const override |
| bool | remove_from_world (const SetName &) const override |
| const std::shared_ptr< const MetadataValueKey< std::string > > | format_key () const override |
| const std::shared_ptr< const MetadataValueKey< FSPath > > | config_location_key () const override |
| const std::shared_ptr< const MetadataValueKey< FSPath > > | preferred_root_key () const override |
| const std::shared_ptr< const MetadataValueKey< FSPath > > | system_root_key () const override |
| Tribool | interest_in_suggestion (const std::shared_ptr< const PackageID > &from_id, const PackageDepSpec &spec) const override |
| const Tribool | want_choice_enabled (const std::shared_ptr< const PackageID > &, const std::shared_ptr< const Choice > &, const UnprefixedChoiceName &) const override PALUDIS_ATTRIBUTE((warn_unused_result)) |
| const std::string | value_for_choice_parameter (const std::shared_ptr< const PackageID > &, const std::shared_ptr< const Choice > &, const UnprefixedChoiceName &) const override PALUDIS_ATTRIBUTE((warn_unused_result)) |
| std::shared_ptr< const Set< UnprefixedChoiceName > > | known_choice_value_names (const std::shared_ptr< const PackageID > &, const std::shared_ptr< const Choice > &) const override PALUDIS_ATTRIBUTE((warn_unused_result)) |
| const std::shared_ptr< OutputManager > | create_output_manager (const CreateOutputManagerInfo &) const override |
| void | set_want_choice_enabled (const ChoicePrefixName &, const UnprefixedChoiceName &, const Tribool) |
| const std::shared_ptr< Repository > | repository_from_new_config_file (const FSPath &) override PALUDIS_ATTRIBUTE((noreturn)) |
| void | update_config_files_for_package_move (const PackageDepSpec &, const QualifiedPackageName &) const override |
| void | set_system_root (const FSPath &) |
| Public Member Functions inherited from paludis::EnvironmentImplementation | |
| std::shared_ptr< const FSPathSequence > | bashrc_files () const override PALUDIS_ATTRIBUTE((warn_unused_result)) |
| std::shared_ptr< const FSPathSequence > | syncers_dirs () const override PALUDIS_ATTRIBUTE((warn_unused_result)) |
| std::shared_ptr< const FSPathSequence > | fetchers_dirs () const override PALUDIS_ATTRIBUTE((warn_unused_result)) |
| std::string | distribution () const override PALUDIS_ATTRIBUTE((warn_unused_result)) |
| bool | is_paludis_package (const QualifiedPackageName &) const override PALUDIS_ATTRIBUTE((warn_unused_result)) |
| std::shared_ptr< PackageIDSequence > | operator[] (const Selection &) const override PALUDIS_ATTRIBUTE((warn_unused_result)) |
| NotifierCallbackID | add_notifier_callback (const NotifierCallbackFunction &) override |
| void | remove_notifier_callback (const NotifierCallbackID) override |
| void | trigger_notifier_callback (const NotifierCallbackEvent &) const override |
| void | add_set (const SetName &, const SetName &, const std::function< std::shared_ptr< const SetSpecTree >()> &, const bool combine) const override |
| std::shared_ptr< const SetNameSet > | set_names () const override PALUDIS_ATTRIBUTE((warn_unused_result)) |
| const std::shared_ptr< const SetSpecTree > | set (const SetName &) const override PALUDIS_ATTRIBUTE((warn_unused_result)) |
| void | add_repository (int importance, const std::shared_ptr< Repository > &) override |
| const std::shared_ptr< const Repository > | fetch_repository (const RepositoryName &) const override PALUDIS_ATTRIBUTE((warn_unused_result)) |
| const std::shared_ptr< Repository > | fetch_repository (const RepositoryName &) override PALUDIS_ATTRIBUTE((warn_unused_result)) |
| bool | has_repository_named (const RepositoryName &) const override PALUDIS_ATTRIBUTE((warn_unused_result)) |
| QualifiedPackageName | fetch_unique_qualified_package_name (const PackageNamePart &, const Filter &=all_filter(), const bool disambiguate=true) const override PALUDIS_ATTRIBUTE((warn_unused_result)) |
| bool | more_important_than (const RepositoryName &, const RepositoryName &) const override PALUDIS_ATTRIBUTE((warn_unused_result)) |
| RepositoryConstIterator | begin_repositories () const override PALUDIS_ATTRIBUTE((warn_unused_result)) |
| RepositoryConstIterator | end_repositories () const override PALUDIS_ATTRIBUTE((warn_unused_result)) |
| const std::shared_ptr< const Set< std::string > > | expand_licence (const std::string &) const override |
| IteratorRange< RepositoryConstIterator > | repositories () const |
| Environment (const Environment &)=delete | |
| Environment & | operator= (const Environment &)=delete |
| MetadataConstIterator | begin_metadata () const PALUDIS_ATTRIBUTE((warn_unused_result)) |
| MetadataConstIterator | end_metadata () const PALUDIS_ATTRIBUTE((warn_unused_result)) |
| IteratorRange< MetadataConstIterator > | metadata () const |
| MetadataConstIterator | find_metadata (const std::string &) const PALUDIS_ATTRIBUTE((warn_unused_result)) |
Protected Member Functions | |
| void | need_keys_added () const override |
| void | populate_sets () const override |
| Protected Member Functions inherited from paludis::EnvironmentImplementation | |
| virtual void | populate_standard_sets () const |
| void | set_always_exists (const SetName &) const |
| Protected Member Functions inherited from paludis::MetadataKeyHolder | |
| virtual void | add_metadata_key (const std::shared_ptr< const MetadataKey > &) const |
| virtual void | clear_metadata_keys () const |
Basic operations | |
| TestEnvironment (bool) | |
| TestEnvironment (const FSPath &) | |
| TestEnvironment (const FSPath &, bool) | |
Additional Inherited Members | |
| typedef WrappedForwardIterator< RepositoryConstIteratorTag, const std::shared_ptr< Repository > > | RepositoryConstIterator |
| typedef WrappedForwardIterator< MetadataConstIteratorTag, const std::shared_ptr< const MetadataKey > > | MetadataConstIterator |
| Static Protected Member Functions inherited from paludis::Environment | |
| static const Filter & | all_filter () PALUDIS_ATTRIBUTE((warn_unused_result)) |
A TestEnvironment is an environment used during testing that lets us control all the options rather than reading them from configuration files.
|
overridevirtual |
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.
References PALUDIS_ATTRIBUTE.
|
overridevirtual |
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.
References PALUDIS_ATTRIBUTE.
|
overridevirtual |
Add this package to world.
Implements paludis::Environment.
References add_to_world().
Referenced by add_to_world(), and add_to_world().
|
overridevirtual |
Add this set to world.
Implements paludis::Environment.
References add_to_world().
|
overridevirtual |
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.
References config_location_key().
Referenced by config_location_key().
|
overridevirtual |
Create an output manager.
Implements paludis::Environment.
References create_output_manager().
Referenced by create_output_manager().
|
overridevirtual |
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.
References format_key().
Referenced by format_key().
|
overridevirtual |
Return directories to search for hooks.
Implements paludis::Environment.
References PALUDIS_ATTRIBUTE.
|
overridevirtual |
Do we want to ignore or take a particular suggestion from a particular package?
Command line things override this.
Implements paludis::Environment.
References interest_in_suggestion().
Referenced by interest_in_suggestion().
|
overridevirtual |
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.
References known_choice_value_names(), and PALUDIS_ATTRIBUTE.
Referenced by known_choice_value_names().
|
overridevirtual |
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.
References PALUDIS_ATTRIBUTE.
|
overridevirtual |
Return the mirror URI prefixes for a named mirror.
Implements paludis::Environment.
References mirrors(), and PALUDIS_ATTRIBUTE.
Referenced by mirrors().
|
overrideprotectedvirtual |
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.
|
overridevirtual |
Perform a hook.
Implements paludis::Environment.
References PALUDIS_ATTRIBUTE, and perform_hook().
Referenced by perform_hook().
|
overrideprotectedvirtual |
Implements paludis::EnvironmentImplementation.
|
overridevirtual |
The preferred_root_key, which must not be null, specifies the preferred filesystem root for actions.
Implements paludis::Environment.
References preferred_root_key().
Referenced by preferred_root_key().
|
overridevirtual |
Group id to use when reduced privs are permissible.
Implements paludis::Environment.
References reduced_gid().
Referenced by reduced_gid().
|
overridevirtual |
User id to use when reduced privs are permissible.
Implements paludis::Environment.
References reduced_uid().
Referenced by reduced_uid().
|
overridevirtual |
User name to use when reduced privs are permissible.
Implements paludis::Environment.
References reduced_username().
Referenced by reduced_username().
|
overridevirtual |
Remove this package from world, if it is present.
Implements paludis::Environment.
References remove_from_world().
Referenced by remove_from_world(), and remove_from_world().
|
overridevirtual |
Remove this set from world, if it is present.
Implements paludis::Environment.
References remove_from_world().
|
overridevirtual |
Create a repository from a particular file.
Does not add the repository to the Environment.
This allows RepositoryRepository to add a repo config file, then sync that repo. If you aren't RepositoryRepository you shouldn't be calling this.
Implements paludis::Environment.
References PALUDIS_ATTRIBUTE, and repository_from_new_config_file().
Referenced by repository_from_new_config_file().
|
overridevirtual |
The system_root_key, which must not be null, specifies the filesystem root for dependencies etc. This is usually "/", unless something funky is going on.
Implements paludis::Environment.
References system_root_key().
Referenced by system_root_key().
|
overridevirtual |
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.
References PALUDIS_ATTRIBUTE.
|
overridevirtual |
Where possible, update configuration files with the first spec to use the second package name.
Does not necessarily invalidate any in-memory configuration.
Implements paludis::Environment.
References update_config_files_for_package_move().
Referenced by update_config_files_for_package_move().
|
overridevirtual |
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.
References PALUDIS_ATTRIBUTE, and value_for_choice_parameter().
Referenced by value_for_choice_parameter().
|
overridevirtual |
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.
References PALUDIS_ATTRIBUTE, and want_choice_enabled().
Referenced by want_choice_enabled().