paludis  Version 2.0.0
Public Member Functions | Protected Member Functions | List of all members
paludis::EnvironmentImplementation Class Referenceabstract

#include <environment_implementation.hh>

+ Inheritance diagram for paludis::EnvironmentImplementation:

Public Member Functions

virtual std::shared_ptr< const
FSPathSequence
bashrc_files () const PALUDIS_ATTRIBUTE((warn_unused_result))
 
virtual std::shared_ptr< const
FSPathSequence
syncers_dirs () const PALUDIS_ATTRIBUTE((warn_unused_result))
 
virtual std::shared_ptr< const
FSPathSequence
fetchers_dirs () const PALUDIS_ATTRIBUTE((warn_unused_result))
 
virtual std::string distribution () const PALUDIS_ATTRIBUTE((warn_unused_result))
 
virtual bool is_paludis_package (const QualifiedPackageName &) const PALUDIS_ATTRIBUTE((warn_unused_result))
 
virtual std::shared_ptr
< PackageIDSequence
operator[] (const Selection &) const PALUDIS_ATTRIBUTE((warn_unused_result))
 
virtual NotifierCallbackID add_notifier_callback (const NotifierCallbackFunction &)
 
virtual void remove_notifier_callback (const NotifierCallbackID)
 
virtual void trigger_notifier_callback (const NotifierCallbackEvent &) const
 
virtual void add_set (const SetName &, const SetName &, const std::function< std::shared_ptr< const SetSpecTree >()> &, const bool combine) const
 
virtual std::shared_ptr< const
SetNameSet
set_names () const PALUDIS_ATTRIBUTE((warn_unused_result))
 
virtual const std::shared_ptr
< const SetSpecTree
set (const SetName &) const PALUDIS_ATTRIBUTE((warn_unused_result))
 
virtual void add_repository (int importance, const std::shared_ptr< Repository > &)
 
virtual const std::shared_ptr
< const Repository
fetch_repository (const RepositoryName &) const PALUDIS_ATTRIBUTE((warn_unused_result))
 
virtual const std::shared_ptr
< Repository
fetch_repository (const RepositoryName &) PALUDIS_ATTRIBUTE((warn_unused_result))
 
virtual bool has_repository_named (const RepositoryName &) const PALUDIS_ATTRIBUTE((warn_unused_result))
 
virtual QualifiedPackageName fetch_unique_qualified_package_name (const PackageNamePart &, const Filter &=all_filter(), const bool disambiguate=true) const PALUDIS_ATTRIBUTE((warn_unused_result))
 
virtual bool more_important_than (const RepositoryName &, const RepositoryName &) const PALUDIS_ATTRIBUTE((warn_unused_result))
 
virtual RepositoryConstIterator begin_repositories () const PALUDIS_ATTRIBUTE((warn_unused_result))
 
virtual RepositoryConstIterator end_repositories () const PALUDIS_ATTRIBUTE((warn_unused_result))
 
virtual const std::shared_ptr
< const Set< std::string > > 
expand_licence (const std::string &) const
 
- Public Member Functions inherited from paludis::Environment
virtual const std::shared_ptr
< Repository
repository_from_new_config_file (const FSPath &) PALUDIS_ATTRIBUTE((warn_unused_result))=0
 
 Environment ()=default
 
virtual ~Environment ()=0
 
 Environment (const Environment &)=delete
 
Environmentoperator= (const Environment &)=delete
 
virtual const Tribool want_choice_enabled (const std::shared_ptr< const PackageID > &, const std::shared_ptr< const Choice > &, const UnprefixedChoiceName &) const PALUDIS_ATTRIBUTE((warn_unused_result))=0
 
virtual const std::string value_for_choice_parameter (const std::shared_ptr< const PackageID > &, const std::shared_ptr< const Choice > &, const UnprefixedChoiceName &) const PALUDIS_ATTRIBUTE((warn_unused_result))=0
 
virtual std::shared_ptr< const
Set< UnprefixedChoiceName > > 
known_choice_value_names (const std::shared_ptr< const PackageID > &, const std::shared_ptr< const Choice > &) const PALUDIS_ATTRIBUTE((warn_unused_result))=0
 
virtual Tribool interest_in_suggestion (const std::shared_ptr< const PackageID > &from_id, const PackageDepSpec &spec) const PALUDIS_ATTRIBUTE((warn_unused_result))=0
 
virtual bool accept_license (const std::string &, const std::shared_ptr< const PackageID > &) const PALUDIS_ATTRIBUTE((warn_unused_result))=0
 
virtual bool accept_keywords (const std::shared_ptr< const KeywordNameSet > &, const std::shared_ptr< const PackageID > &) const PALUDIS_ATTRIBUTE((warn_unused_result))=0
 
virtual const std::shared_ptr
< const Mask
mask_for_breakage (const std::shared_ptr< const PackageID > &) const PALUDIS_ATTRIBUTE((warn_unused_result))=0
 
virtual const std::shared_ptr
< const Mask
mask_for_user (const std::shared_ptr< const PackageID > &, const bool will_be_used_for_overridden) const PALUDIS_ATTRIBUTE((warn_unused_result))=0
 
virtual bool unmasked_by_user (const std::shared_ptr< const PackageID > &, const std::string &) const PALUDIS_ATTRIBUTE((warn_unused_result))=0
 
virtual std::shared_ptr< const
FSPathSequence
hook_dirs () const PALUDIS_ATTRIBUTE((warn_unused_result))=0
 
virtual uid_t reduced_uid () const =0
 
virtual gid_t reduced_gid () const =0
 
virtual std::shared_ptr< const
MirrorsSequence
mirrors (const std::string &) const PALUDIS_ATTRIBUTE((warn_unused_result))=0
 
virtual HookResult perform_hook (const Hook &, const std::shared_ptr< OutputManager > &optional_output_manager) const PALUDIS_ATTRIBUTE((warn_unused_result))=0
 
virtual bool add_to_world (const QualifiedPackageName &) const =0
 
virtual bool add_to_world (const SetName &) const =0
 
virtual bool remove_from_world (const QualifiedPackageName &) const =0
 
virtual bool remove_from_world (const SetName &) const =0
 
virtual void update_config_files_for_package_move (const PackageDepSpec &, const QualifiedPackageName &) const =0
 
virtual const std::shared_ptr
< const MetadataValueKey
< FSPath > > 
preferred_root_key () const =0
 
virtual const std::shared_ptr
< const MetadataValueKey
< FSPath > > 
system_root_key () const =0
 
virtual const std::shared_ptr
< const MetadataValueKey
< std::string > > 
format_key () const =0
 
virtual const std::shared_ptr
< const MetadataValueKey
< FSPath > > 
config_location_key () const =0
 
virtual const std::shared_ptr
< OutputManager
create_output_manager (const CreateOutputManagerInfo &) const =0
 
- Public Member Functions inherited from paludis::MetadataKeyHolder
MetadataConstIterator begin_metadata () const PALUDIS_ATTRIBUTE((warn_unused_result))
 
MetadataConstIterator end_metadata () const PALUDIS_ATTRIBUTE((warn_unused_result))
 
MetadataConstIterator find_metadata (const std::string &) const PALUDIS_ATTRIBUTE((warn_unused_result))
 

Protected Member Functions

virtual void populate_sets () const =0
 
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
 
virtual void need_keys_added () const =0
 

Basic operations

 EnvironmentImplementation ()
 
virtual ~EnvironmentImplementation ()=0
 

Additional Inherited Members

- Public Types inherited from paludis::Environment
typedef WrappedForwardIterator
< RepositoryConstIteratorTag,
const std::shared_ptr
< Repository > > 
RepositoryConstIterator
 
- Public Types inherited from paludis::MetadataKeyHolder
typedef WrappedForwardIterator
< MetadataConstIteratorTag,
const std::shared_ptr< const
MetadataKey > > 
MetadataConstIterator
 
- Static Protected Member Functions inherited from paludis::Environment
static const Filterall_filter () PALUDIS_ATTRIBUTE((warn_unused_result))
 

Detailed Description

Simplifies implementing the Environment interface.

Most Environment subclasses derive from this class, rather than directly from the abstract base. It provides default implementations for many methods.

See Also
Environment

Member Function Documentation

virtual NotifierCallbackID paludis::EnvironmentImplementation::add_notifier_callback ( const NotifierCallbackFunction &  )
virtual

Set a callback function to use when a particular event occurs.

The return value can be passed to remove_notifier_callback.

Since
0.40

Implements paludis::Environment.

virtual void paludis::EnvironmentImplementation::add_repository ( int  importance,
const std::shared_ptr< Repository > &   
)
virtual

Add a repository.

Since
0.61 is in Environment rather than PackageDatabase
Exceptions
DuplicateRepositoryErrorif a Repository with the same name as the new Repository already exists in our collection.

Implements paludis::Environment.

virtual void paludis::EnvironmentImplementation::add_set ( const SetName base_name,
const SetName combined_name,
const std::function< std::shared_ptr< const SetSpecTree >()> &  func,
const bool  combine 
) const
virtual

Add a package set.

Generally called by repositories, when Repository::populate_sets is called.

Parameters
base_nameThe basic name of the set, such as 'security'.
combined_nameThe name to use for this set when combine is true, such as 'security.myrepo'. If combine is false, should be the same as base_name.
funcA function that returns the set.
combineIf true, rename the set from foo to foo.reponame, and make the foo set contain foo.reponame, along with any other repositories' sets named foo. If false, throw if the set already exists.
Since
0.40

Implements paludis::Environment.

virtual std::shared_ptr<const FSPathSequence> paludis::EnvironmentImplementation::bashrc_files ( ) const
virtual

Return a collection of bashrc files to be used by the various components that are implemented in bash.

Implements paludis::Environment.

virtual const std::shared_ptr<const Set<std::string> > paludis::EnvironmentImplementation::expand_licence ( const std::string &  ) const
virtual

Expand a licence group into its constituent licences, recursively (if any of our repositories thinks it is a group).

The original group is included in the result.

Since
0.68

Implements paludis::Environment.

virtual const std::shared_ptr<const Repository> paludis::EnvironmentImplementation::fetch_repository ( const RepositoryName ) const
virtual

Fetch a named repository.

Since
0.61 is in Environment rather than PackageDatabase

Implements paludis::Environment.

virtual const std::shared_ptr<Repository> paludis::EnvironmentImplementation::fetch_repository ( const RepositoryName )
virtual

Fetch a named repository.

Since
0.61 is in Environment rather than PackageDatabase

Implements paludis::Environment.

virtual QualifiedPackageName paludis::EnvironmentImplementation::fetch_unique_qualified_package_name ( const PackageNamePart ,
const Filter = all_filter(),
const bool  disambiguate = true 
) const
virtual

Disambiguate a package name. If a filter is specified, limit the potential results to packages that match.

Exceptions
AmbiguousPackageNameErrorif there is no unambiguous disambiguation. If disambiguate is set to false, the exception will be always thrown in presence of ambiguity.
Since
0.56 takes the disambiguate flag.
0.61 is in Environment rather than PackageDatabase

Implements paludis::Environment.

virtual std::shared_ptr<const FSPathSequence> paludis::EnvironmentImplementation::fetchers_dirs ( ) const
virtual

Return directories to search for fetcher scripts.

Implements paludis::Environment.

virtual bool paludis::EnvironmentImplementation::has_repository_named ( const RepositoryName ) const
virtual

Do we have a named repository?

Since
0.61 is in Environment rather than PackageDatabase

Implements paludis::Environment.

virtual bool paludis::EnvironmentImplementation::is_paludis_package ( const QualifiedPackageName ) const
virtual

Is the specified package Paludis?

Used by InstallTask to decide whether to exec() after installing a package.

Implements paludis::Environment.

virtual bool paludis::EnvironmentImplementation::more_important_than ( const RepositoryName ,
const RepositoryName  
) const
virtual

Return true if the first repository is more important than the second.

Since
0.61 is in Environment rather than PackageDatabase

Implements paludis::Environment.

virtual std::shared_ptr<PackageIDSequence> paludis::EnvironmentImplementation::operator[] ( const Selection ) const
virtual

Select some packages.

Implements paludis::Environment.

virtual void paludis::EnvironmentImplementation::remove_notifier_callback ( const NotifierCallbackID  )
virtual

Remove a function added with add_notifier_callback.

Since
0.40

Implements paludis::Environment.

virtual const std::shared_ptr<const SetSpecTree> paludis::EnvironmentImplementation::set ( const SetName ) const
virtual

Return a named set.

If the named set is not known, returns a zero pointer.

Implements paludis::Environment.

virtual std::shared_ptr<const SetNameSet> paludis::EnvironmentImplementation::set_names ( ) const
virtual

Return all known named sets.

Implements paludis::Environment.

virtual std::shared_ptr<const FSPathSequence> paludis::EnvironmentImplementation::syncers_dirs ( ) const
virtual

Return directories to search for syncer scripts.

Implements paludis::Environment.

virtual void paludis::EnvironmentImplementation::trigger_notifier_callback ( const NotifierCallbackEvent ) const
virtual

Trigger a notifier callback.

Since
0.40

Implements paludis::Environment.


The documentation for this class was generated from the following file: