paludis Version 3.0.2
The one true package mangler
paludis::FakeInstalledRepository Class Reference

#include <fake_installed_repository.hh>

Inheritance diagram for paludis::FakeInstalledRepository:

Public Member Functions

bool some_ids_might_support_action (const SupportsActionTestBase &) const override
bool some_ids_might_not_be_masked () const override
const bool is_unimportant () const override
const std::shared_ptr< const MetadataValueKey< std::string > > cross_compile_host_key () const override
const std::shared_ptr< const MetadataValueKey< std::string > > format_key () const override
const std::shared_ptr< const MetadataValueKey< FSPath > > location_key () const override
const std::shared_ptr< const MetadataValueKey< FSPath > > installed_root_key () const override
const std::shared_ptr< const MetadataCollectionKey< Map< std::string, std::string > > > sync_host_key () const override
const std::shared_ptr< const MetadataValueKey< std::string > > tool_prefix_key () const override
const std::shared_ptr< const Set< std::string > > maybe_expand_licence_nonrecursively (const std::string &) const override
Public Member Functions inherited from paludis::FakeRepositoryBase
 ~FakeRepositoryBase () override
void add_category (const CategoryNamePart &)
void add_package (const QualifiedPackageName &)
std::shared_ptr< FakePackageID > add_version (const QualifiedPackageName &, const VersionSpec &)
std::shared_ptr< FakePackageID > add_version (const std::string &c, const std::string &p, const std::string &v)
void invalidate () override
const Environment * environment () const
std::shared_ptr< const PackageIDSequence > package_ids (const QualifiedPackageName &, const RepositoryContentMayExcludes &) const override PALUDIS_ATTRIBUTE((warn_unused_result))
std::shared_ptr< const QualifiedPackageNameSet > package_names (const CategoryNamePart &, const RepositoryContentMayExcludes &) const override PALUDIS_ATTRIBUTE((warn_unused_result))
std::shared_ptr< const CategoryNamePartSet > category_names (const RepositoryContentMayExcludes &) const override PALUDIS_ATTRIBUTE((warn_unused_result))
bool has_package_named (const QualifiedPackageName &, const RepositoryContentMayExcludes &) const override PALUDIS_ATTRIBUTE((warn_unused_result))
bool has_category_named (const CategoryNamePart &, const RepositoryContentMayExcludes &) const override PALUDIS_ATTRIBUTE((warn_unused_result))
bool sync (const std::string &, const std::string &, const std::shared_ptr< OutputManager > &) const override
HookResult perform_hook (const Hook &hook, const std::shared_ptr< OutputManager > &) override
void populate_sets () const override
 Repository (const Repository &)=delete
Repository & operator= (const Repository &)=delete
const RepositoryName name () const noexcept PALUDIS_ATTRIBUTE((warn_unused_result))
virtual std::shared_ptr< const CategoryNamePartSet > unimportant_category_names (const RepositoryContentMayExcludes &repository_content_may_excludes) const
virtual std::shared_ptr< const CategoryNamePartSet > category_names_containing_package (const PackageNamePart &p, const RepositoryContentMayExcludes &repository_content_may_excludes) const
virtual void regenerate_cache () const
virtual void purge_invalid_cache () const
virtual void can_drop_in_memory_cache () const
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

bool is_suitable_destination_for (const std::shared_ptr< const PackageID > &) const override PALUDIS_ATTRIBUTE((warn_unused_result))
bool want_pre_post_phases () const override PALUDIS_ATTRIBUTE((warn_unused_result))
std::string split_debug_location () const override PALUDIS_ATTRIBUTE((warn_unused_result))
void merge (const MergeParams &) override
Protected Member Functions inherited from paludis::FakeRepositoryBase
 FakeRepositoryBase (const Environment *const env, const RepositoryName &name, const RepositoryCapabilities &caps)
void need_keys_added () const override
 Repository (const Environment *const, const RepositoryName &, const RepositoryCapabilities &)
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

 FakeInstalledRepository (const FakeInstalledRepositoryParams &)

RepositoryFactory functions

static RepositoryName repository_factory_name (const Environment *const env, const std::function< std::string(const std::string &)> &)
static std::shared_ptr< Repository > repository_factory_create (Environment *const env, const std::function< std::string(const std::string &)> &)
static std::shared_ptr< const RepositoryNameSet > repository_factory_dependencies (const Environment *const env, const std::function< std::string(const std::string &)> &)

Additional Inherited Members

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

Detailed Description

A fake repository for test cases, for installed packages.

Constructor & Destructor Documentation

◆ FakeInstalledRepository()

paludis::FakeInstalledRepository::FakeInstalledRepository ( const FakeInstalledRepositoryParams & )
Since
0.42

References FakeInstalledRepository().

Referenced by FakeInstalledRepository().

Member Function Documentation

◆ cross_compile_host_key()

const std::shared_ptr< const MetadataValueKey< std::string > > paludis::FakeInstalledRepository::cross_compile_host_key ( ) const
overridevirtual

Implements paludis::Repository.

◆ format_key()

const std::shared_ptr< const MetadataValueKey< std::string > > paludis::FakeInstalledRepository::format_key ( ) const
overridevirtual

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

Implements paludis::Repository.

References format_key().

Referenced by format_key().

◆ installed_root_key()

const std::shared_ptr< const MetadataValueKey< FSPath > > paludis::FakeInstalledRepository::installed_root_key ( ) const
overridevirtual

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.

Implements paludis::Repository.

References installed_root_key().

Referenced by installed_root_key().

◆ is_suitable_destination_for()

bool paludis::FakeInstalledRepository::is_suitable_destination_for ( const std::shared_ptr< const PackageID > & ) const
overrideprotectedvirtual

Are we a suitable destination for the specified package?

Since
0.58 takes id by shared_ptr

Implements paludis::RepositoryDestinationInterface.

References PALUDIS_ATTRIBUTE.

◆ is_unimportant()

const bool paludis::FakeInstalledRepository::is_unimportant ( ) const
overridevirtual

Are we unimportant?

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

Since
0.46

Implements paludis::Repository.

References is_unimportant().

Referenced by is_unimportant().

◆ location_key()

const std::shared_ptr< const MetadataValueKey< FSPath > > paludis::FakeInstalledRepository::location_key ( ) const
overridevirtual

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.

Implements paludis::Repository.

References location_key().

Referenced by location_key().

◆ maybe_expand_licence_nonrecursively()

const std::shared_ptr< const Set< std::string > > paludis::FakeInstalledRepository::maybe_expand_licence_nonrecursively ( const std::string & ) const
overridevirtual

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

Implements paludis::Repository.

References maybe_expand_licence_nonrecursively().

Referenced by maybe_expand_licence_nonrecursively().

◆ merge()

void paludis::FakeInstalledRepository::merge ( const MergeParams & )
overrideprotectedvirtual

Merge a package.

Implements paludis::RepositoryDestinationInterface.

References merge().

Referenced by merge().

◆ some_ids_might_not_be_masked()

bool paludis::FakeInstalledRepository::some_ids_might_not_be_masked ( ) const
overridevirtual

Might some of our IDs be not masked?

Used to optimise various Generator and Filter queries.

Since
0.49

Implements paludis::Repository.

References some_ids_might_not_be_masked().

Referenced by some_ids_might_not_be_masked().

◆ some_ids_might_support_action()

bool paludis::FakeInstalledRepository::some_ids_might_support_action ( const SupportsActionTestBase & ) const
overridevirtual

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.

Implements paludis::Repository.

References some_ids_might_support_action().

Referenced by some_ids_might_support_action().

◆ split_debug_location()

std::string paludis::FakeInstalledRepository::split_debug_location ( ) const
overrideprotectedvirtual

◆ sync_host_key()

const std::shared_ptr< const MetadataCollectionKey< Map< std::string, std::string > > > paludis::FakeInstalledRepository::sync_host_key ( ) const
overridevirtual

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>.

Implements paludis::Repository.

References sync_host_key().

Referenced by sync_host_key().

◆ tool_prefix_key()

const std::shared_ptr< const MetadataValueKey< std::string > > paludis::FakeInstalledRepository::tool_prefix_key ( ) const
overridevirtual

Implements paludis::Repository.

◆ want_pre_post_phases()

bool paludis::FakeInstalledRepository::want_pre_post_phases ( ) const
overrideprotectedvirtual

If true, pre and post install phases will be used when writing to this destination.

This should return true for 'real' filesystem destinations (whether or not root is /, if root merges are supported), and false for intermediate destinations such as binary repositories.

Implements paludis::RepositoryDestinationInterface.

References PALUDIS_ATTRIBUTE.


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