paludis Version 3.0.2
The one true package mangler
paludis::Repository Class Referenceabstract

#include <repository.hh>

Inheritance diagram for paludis::Repository:

Basic operations

 Repository (const Environment *const, const RepositoryName &, const RepositoryCapabilities &)
 Repository (const Repository &)=delete
Repository & operator= (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 > > cross_compile_host_key () const =0
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
virtual const std::shared_ptr< const MetadataValueKey< std::string > > tool_prefix_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 CategoryNamePartSet > category_names (const RepositoryContentMayExcludes &repository_content_may_excludes) const =0
virtual std::shared_ptr< const CategoryNamePartSet > unimportant_category_names (const RepositoryContentMayExcludes &repository_content_may_excludes) const
virtual const bool is_unimportant () const =0
virtual std::shared_ptr< const CategoryNamePartSet > category_names_containing_package (const PackageNamePart &p, const RepositoryContentMayExcludes &repository_content_may_excludes) const
virtual std::shared_ptr< const QualifiedPackageNameSet > package_names (const CategoryNamePart &c, const RepositoryContentMayExcludes &repository_content_may_excludes) const =0
virtual std::shared_ptr< const PackageIDSequence > package_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

typedef WrappedForwardIterator< MetadataConstIteratorTag, const std::shared_ptr< const MetadataKey > > MetadataConstIterator
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))
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

◆ can_drop_in_memory_cache()

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

References can_drop_in_memory_cache().

Referenced by can_drop_in_memory_cache().

◆ category_names()

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.

References category_names().

Referenced by category_names().

◆ category_names_containing_package()

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.

References category_names_containing_package().

Referenced by category_names_containing_package().

◆ format_key()

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.

References format_key().

Referenced by format_key().

◆ has_category_named()

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.

References has_category_named().

Referenced by has_category_named().

◆ has_package_named()

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.

References has_package_named().

Referenced by has_package_named().

◆ installed_root_key()

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.

References installed_root_key().

Referenced by installed_root_key().

◆ invalidate()

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

Invalidate any in memory cache.

Implemented in paludis::FakeRepositoryBase.

References invalidate().

Referenced by invalidate().

◆ is_unimportant()

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.

References is_unimportant().

Referenced by is_unimportant().

◆ location_key()

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.

References location_key().

Referenced by location_key().

◆ maybe_expand_licence_nonrecursively()

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.

References maybe_expand_licence_nonrecursively().

Referenced by maybe_expand_licence_nonrecursively().

◆ name()

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

Return our name.

References PALUDIS_ATTRIBUTE.

Referenced by paludis::FakeRepositoryBase::FakeRepositoryBase().

◆ package_ids()

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.

References package_ids().

Referenced by package_ids().

◆ package_names()

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.

References package_names().

Referenced by package_names().

◆ perform_hook()

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.

References PALUDIS_ATTRIBUTE, and perform_hook().

Referenced by perform_hook().

◆ populate_sets()

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.

References populate_sets().

Referenced by populate_sets().

◆ purge_invalid_cache()

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

Purge any invalid on-disk cache entries.

References purge_invalid_cache().

Referenced by purge_invalid_cache().

◆ regenerate_cache()

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

Regenerate any on disk cache.

References regenerate_cache().

Referenced by regenerate_cache().

◆ some_ids_might_not_be_masked()

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.

References some_ids_might_not_be_masked().

Referenced by some_ids_might_not_be_masked().

◆ some_ids_might_support_action()

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.

References some_ids_might_support_action().

Referenced by some_ids_might_support_action().

◆ sync()

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.

References sync().

Referenced by sync().

◆ sync_host_key()

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.

References sync_host_key().

Referenced by sync_host_key().

◆ unimportant_category_names()

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

Fetch unimportant categories.

References unimportant_category_names().

Referenced by unimportant_category_names().


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