paludis  Version 2.6.0
List of all members
paludis::Repository Class Referenceabstract

#include <repository.hh>

+ Inheritance diagram for paludis::Repository:

Basic operations

 Repository (const Environment *const, const RepositoryName &, const RepositoryCapabilities &)
 
virtual ~Repository ()
 
 Repository (const Repository &)=delete
 
Repositoryoperator= (const Repository &)=delete
 

Repository information

const RepositoryName name () const noexcept PALUDIS_ATTRIBUTE((warn_unused_result))
 

Specific metadata keys

virtual const std::shared_ptr< const MetadataValueKey< std::string > > format_key () const =0
 
virtual const std::shared_ptr< const MetadataValueKey< FSPath > > location_key () const =0
 
virtual const std::shared_ptr< const MetadataValueKey< FSPath > > installed_root_key () const =0
 
virtual const std::shared_ptr< const MetadataCollectionKey< Map< std::string, std::string > > > sync_host_key () const =0
 

Repository content queries

virtual bool has_category_named (const CategoryNamePart &c, const RepositoryContentMayExcludes &repository_content_may_excludes) const =0
 
virtual bool has_package_named (const QualifiedPackageName &q, const RepositoryContentMayExcludes &repository_content_may_excludes) const =0
 
virtual std::shared_ptr< const CategoryNamePartSetcategory_names (const RepositoryContentMayExcludes &repository_content_may_excludes) const =0
 
virtual std::shared_ptr< const CategoryNamePartSetunimportant_category_names (const RepositoryContentMayExcludes &repository_content_may_excludes) const
 
virtual const bool is_unimportant () const =0
 
virtual std::shared_ptr< const CategoryNamePartSetcategory_names_containing_package (const PackageNamePart &p, const RepositoryContentMayExcludes &repository_content_may_excludes) const
 
virtual std::shared_ptr< const QualifiedPackageNameSetpackage_names (const CategoryNamePart &c, const RepositoryContentMayExcludes &repository_content_may_excludes) const =0
 
virtual std::shared_ptr< const PackageIDSequencepackage_ids (const QualifiedPackageName &p, const RepositoryContentMayExcludes &repository_content_may_excludes) const =0
 
virtual bool some_ids_might_support_action (const SupportsActionTestBase &) const =0
 
virtual bool some_ids_might_not_be_masked () const =0
 
virtual const std::shared_ptr< const Set< std::string > > maybe_expand_licence_nonrecursively (const std::string &) const =0
 

Repository behaviour methods

virtual void invalidate ()=0
 
virtual void regenerate_cache () const
 
virtual void purge_invalid_cache () const
 
virtual HookResult perform_hook (const Hook &hook, const std::shared_ptr< OutputManager > &optional_output_manager) PALUDIS_ATTRIBUTE((warn_unused_result))=0
 
virtual bool sync (const std::string &source, const std::string &revision, const std::shared_ptr< OutputManager > &) const =0
 
virtual void can_drop_in_memory_cache () const
 

Set methods

virtual void populate_sets () const =0
 

Additional Inherited Members

- Public Types inherited from paludis::MetadataKeyHolder
typedef WrappedForwardIterator< MetadataConstIteratorTag, const std::shared_ptr< const MetadataKey > > MetadataConstIterator
 
- 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))
 
- Public Attributes inherited from paludis::RepositoryCapabilities
NamedValue< n::destination_interface, RepositoryDestinationInterface * > destination_interface
 
NamedValue< n::environment_variable_interface, RepositoryEnvironmentVariableInterface * > environment_variable_interface
 
NamedValue< n::manifest_interface, RepositoryManifestInterface * > manifest_interface
 
- 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
 

Detailed Description

A Repository provides a representation of a physical repository to an Environment.

Member Function Documentation

virtual void paludis::Repository::can_drop_in_memory_cache ( ) const
virtual

Allow the Repository to drop any memory-cached metadata and PackageIDs it holds.

Since
0.42
virtual std::shared_ptr<const CategoryNamePartSet> paludis::Repository::category_names ( const RepositoryContentMayExcludes repository_content_may_excludes) const
pure virtual

Fetch our category names.

Implemented in paludis::FakeRepositoryBase.

virtual std::shared_ptr<const CategoryNamePartSet> paludis::Repository::category_names_containing_package ( const PackageNamePart p,
const RepositoryContentMayExcludes repository_content_may_excludes 
) const
virtual

Fetch categories that contain a named package.

virtual const std::shared_ptr<const MetadataValueKey<std::string> > paludis::Repository::format_key ( ) const
pure virtual

The format_key, if non-zero, holds our repository's format. Repository implementations should not return zero here, but clients should still check.

Implemented in paludis::FakeInstalledRepository, and paludis::FakeRepository.

virtual bool paludis::Repository::has_category_named ( const CategoryNamePart c,
const RepositoryContentMayExcludes repository_content_may_excludes 
) const
pure virtual

Do we have a category with the given name?

Since
0.59 takes repository_content_may_excludes

Implemented in paludis::FakeRepositoryBase.

virtual bool paludis::Repository::has_package_named ( const QualifiedPackageName q,
const RepositoryContentMayExcludes repository_content_may_excludes 
) const
pure virtual

Do we have a package in the given category with the given name?

Implemented in paludis::FakeRepositoryBase.

virtual const std::shared_ptr<const MetadataValueKey<FSPath> > paludis::Repository::installed_root_key ( ) const
pure virtual

The installed_root_key, if non-zero, specifies that we contain installed packages at the specified root.

This key is currently used in various places to determine whether a repository is an 'installed' repository or not.

Implemented in paludis::FakeInstalledRepository, and paludis::FakeRepository.

virtual void paludis::Repository::invalidate ( )
pure virtual

Invalidate any in memory cache.

Implemented in paludis::FakeRepositoryBase.

virtual const bool paludis::Repository::is_unimportant ( ) const
pure virtual

Are we unimportant?

In disambiguation, anything gets preferred over packages from unimportant repositories.

Since
0.46

Implemented in paludis::FakeInstalledRepository, and paludis::FakeRepository.

virtual const std::shared_ptr<const MetadataValueKey<FSPath> > paludis::Repository::location_key ( ) const
pure virtual

The location_key, if non-zero, holds the file or directory containing our repository's data, the format of which depends on the value of format_key.

Implemented in paludis::FakeInstalledRepository, and paludis::FakeRepository.

virtual const std::shared_ptr<const Set<std::string> > paludis::Repository::maybe_expand_licence_nonrecursively ( const std::string &  ) const
pure virtual

Possibly expand a licence.

May return a null pointer, if we don't define any licence groups, or if the thing being passed in doesn't look like a licence group.

This should not be recursive.

Callers should Environment::expand_licence, not this method.

Since
0.66

Implemented in paludis::FakeInstalledRepository, and paludis::FakeRepository.

const RepositoryName paludis::Repository::name ( ) const
noexcept

Return our name.

virtual std::shared_ptr<const PackageIDSequence> paludis::Repository::package_ids ( const QualifiedPackageName p,
const RepositoryContentMayExcludes repository_content_may_excludes 
) const
pure virtual

Fetch our IDs.

Implemented in paludis::FakeRepositoryBase.

virtual std::shared_ptr<const QualifiedPackageNameSet> paludis::Repository::package_names ( const CategoryNamePart c,
const RepositoryContentMayExcludes repository_content_may_excludes 
) const
pure virtual

Fetch our package names.

Implemented in paludis::FakeRepositoryBase.

virtual HookResult paludis::Repository::perform_hook ( const Hook hook,
const std::shared_ptr< OutputManager > &  optional_output_manager 
)
pure virtual

Perform a hook.

Since
0.40 (previously in an interface)
0.53 takes optional_output_manager

Implemented in paludis::FakeRepositoryBase.

virtual void paludis::Repository::populate_sets ( ) const
pure virtual

Call Environment::add_set for every set we define.

Environment will call this method at most once, so no cache or check for repeats is required. Nothing else should call this method.

Since
0.40

Implemented in paludis::FakeRepositoryBase.

virtual void paludis::Repository::purge_invalid_cache ( ) const
virtual

Purge any invalid on-disk cache entries.

virtual void paludis::Repository::regenerate_cache ( ) const
virtual

Regenerate any on disk cache.

virtual bool paludis::Repository::some_ids_might_not_be_masked ( ) const
pure virtual

Might some of our IDs be not masked?

Used to optimise various Generator and Filter queries.

Since
0.49

Implemented in paludis::FakeInstalledRepository, and paludis::FakeRepository.

virtual bool paludis::Repository::some_ids_might_support_action ( const SupportsActionTestBase ) const
pure virtual

Might some of our IDs support a particular action?

Used to optimise various Generator and Filter queries. If a repository doesn't support, say, InstallAction, a query can skip searching it entirely when looking for installable packages.

Implemented in paludis::FakeInstalledRepository, and paludis::FakeRepository.

virtual bool paludis::Repository::sync ( const std::string &  source,
const std::string &  revision,
const std::shared_ptr< OutputManager > &   
) const
pure virtual

Sync, if necessary.

Returns
True if we synced successfully, false if we skipped sync.
Since
0.42 (previously in an interface)
0.55 takes a source (may be empty)
0.61 takes a revision (may be empty)

Implemented in paludis::FakeRepositoryBase.

virtual const std::shared_ptr<const MetadataCollectionKey<Map<std::string, std::string> > > paludis::Repository::sync_host_key ( ) const
pure virtual

The sync_host_key, if present, should have value containing the host against which a sync will be performed for each suffix.

This is used to avoid starting multiple parallel syncs against the same host.

Since
0.44
0.55 is a Map<std::string, std::string>.

Implemented in paludis::FakeInstalledRepository, and paludis::FakeRepository.

virtual std::shared_ptr<const CategoryNamePartSet> paludis::Repository::unimportant_category_names ( const RepositoryContentMayExcludes repository_content_may_excludes) const
virtual

Fetch unimportant categories.


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