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

#include <fake_package_id.hh>

Inheritance diagram for paludis::FakePackageID:

Public Member Functions

const std::string canonical_form (const PackageIDCanonicalForm) const override
const QualifiedPackageName name () const override
const VersionSpec version () const override
const RepositoryName repository_name () const override
PackageDepSpec uniquely_identifying_spec () const override
const std::shared_ptr< const MetadataValueKey< Slot > > slot_key () const override
const std::shared_ptr< const MetadataCollectionKey< KeywordNameSet > > keywords_key () const override
const std::shared_ptr< const MetadataSpecTreeKey< DependencySpecTree > > dependencies_key () const override
const std::shared_ptr< const MetadataSpecTreeKey< DependencySpecTree > > build_dependencies_key () const override
const std::shared_ptr< const MetadataSpecTreeKey< DependencySpecTree > > run_dependencies_key () const override
const std::shared_ptr< const MetadataSpecTreeKey< DependencySpecTree > > post_dependencies_key () const override
const std::shared_ptr< const MetadataSpecTreeKey< FetchableURISpecTree > > fetches_key () const override
const std::shared_ptr< const MetadataSpecTreeKey< SimpleURISpecTree > > homepage_key () const override
const std::shared_ptr< const MetadataValueKey< std::string > > short_description_key () const override
const std::shared_ptr< const MetadataValueKey< std::string > > long_description_key () const override
const std::shared_ptr< const MetadataTimeKey > installed_time_key () const override
const std::shared_ptr< const MetadataValueKey< FSPath > > fs_location_key () const override
virtual const std::shared_ptr< const MetadataValueKey< long > > size_of_download_required_key () const
virtual const std::shared_ptr< const MetadataValueKey< long > > size_of_all_distfiles_key () const
const std::shared_ptr< const MetadataCollectionKey< Set< std::string > > > behaviours_key () const override
const std::shared_ptr< const MetadataCollectionKey< Set< std::string > > > from_repositories_key () const override
const std::shared_ptr< const MetadataValueKey< std::shared_ptr< const Choices > > > choices_key () const override
const std::shared_ptr< const MetadataSpecTreeKey< LicenseSpecTree > > license_key () const
char use_expand_separator () const
bool arbitrary_less_than_comparison (const PackageID &) const override
std::size_t extra_hash_value () const override
bool supports_action (const SupportsActionTestBase &) const override PALUDIS_ATTRIBUTE((warn_unused_result))
void perform_action (Action &) const override
const std::shared_ptr< const Contents > contents () const override
Public Member Functions inherited from paludis::PackageID
virtual void can_drop_in_memory_cache () const
MasksConstIterator begin_masks () const PALUDIS_ATTRIBUTE((warn_unused_result))
MasksConstIterator end_masks () const PALUDIS_ATTRIBUTE((warn_unused_result))
IteratorRange< MasksConstIterator > masks () const
bool masked () const PALUDIS_ATTRIBUTE((warn_unused_result))
OverriddenMasksConstIterator begin_overridden_masks () const PALUDIS_ATTRIBUTE((warn_unused_result))
OverriddenMasksConstIterator end_overridden_masks () const PALUDIS_ATTRIBUTE((warn_unused_result))
IteratorRange< OverriddenMasksConstIterator > overridden_masks () const
std::size_t hash () const PALUDIS_ATTRIBUTE((warn_unused_result))
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 need_masks_added () const override
Protected Member Functions inherited from paludis::PackageID
virtual void add_mask (const std::shared_ptr< const Mask > &) const
virtual void add_overridden_mask (const std::shared_ptr< const OverriddenMask > &) 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

 FakePackageID (const Environment *const e, const RepositoryName &, const QualifiedPackageName &, const VersionSpec &)

Modifiable keys

const std::shared_ptr< FakeMetadataKeywordSetKey > keywords_key ()
const std::shared_ptr< FakeMetadataSpecTreeKey< DependencySpecTree > > build_dependencies_key ()
const std::shared_ptr< FakeMetadataSpecTreeKey< DependencySpecTree > > run_dependencies_key ()
const std::shared_ptr< FakeMetadataSpecTreeKey< DependencySpecTree > > post_dependencies_key ()
const std::shared_ptr< FakeMetadataSpecTreeKey< FetchableURISpecTree > > fetches_key ()
const std::shared_ptr< FakeMetadataSpecTreeKey< SimpleURISpecTree > > homepage_key ()
const std::shared_ptr< FakeMetadataChoicesKey > choices_key ()
const std::shared_ptr< Set< std::string > > behaviours_set ()
void set_slot (const SlotName &)
void set_slot (const SlotName &, const SlotName &)

Additional Inherited Members

typedef WrappedForwardIterator< MasksConstIteratorTag, const std::shared_ptr< const Mask > > MasksConstIterator
typedef WrappedForwardIterator< OverriddenMasksConstIteratorTag, const std::shared_ptr< const OverriddenMask > > OverriddenMasksConstIterator
typedef WrappedForwardIterator< MetadataConstIteratorTag, const std::shared_ptr< const MetadataKey > > MetadataConstIterator

Detailed Description

A PackageID in a FakeRepository or a FakeInstalledRepository.

Various keys can be modified.

Since
0.26

Member Function Documentation

◆ arbitrary_less_than_comparison()

bool paludis::FakePackageID::arbitrary_less_than_comparison ( const PackageID & ) const
overridevirtual

Perform an arbitrary less than comparison on another PackageID.

Used by PackageIDSetComparator and operator==. This function should not be used by anything else.

This function will only be called if the other PackageID has the same name, version and repository as this. If this is not enough to uniquely identify an ID (e.g. if there is an affix, or if multiple slots per version are allowed), then this function's implementation must differentiate appropriately.

Implements paludis::PackageID.

◆ behaviours_key()

const std::shared_ptr< const MetadataCollectionKey< Set< std::string > > > paludis::FakePackageID::behaviours_key ( ) const
overridevirtual

The behaviours_key may contain strings indicating that the PackageID behaves in a particular way.

Strings with recognised meanings currently are:

  • "transient", saying that an installed ID's origin is expected not to exist
  • "used", saying that an installed ID should not be treated as unused
  • "unbinaryable", saying that we should be excluded from requests to create a binary
  • "unchrootable", saying that we should be excluded from requests to install to a chroot
  • "binary", saying that we are already a binary package
Since
0.48

Implements paludis::PackageID.

◆ build_dependencies_key()

const std::shared_ptr< const MetadataSpecTreeKey< DependencySpecTree > > paludis::FakePackageID::build_dependencies_key ( ) const
overridevirtual

The build_dependencies_key, if non-zero, indicates a package's build-time dependencies.

Implements paludis::PackageID.

Referenced by choices_key().

◆ canonical_form()

const std::string paludis::FakePackageID::canonical_form ( const PackageIDCanonicalForm ) const
overridevirtual

Return our canonical string representation.

This method (which is called by paludis::stringify()) should be used when outputting a PackageID or a PackageID's version. Some repositories need to display additional information to identify a package, so outputting merely the name and / or version may be insufficient.

Implements paludis::PackageID.

◆ choices_key()

const std::shared_ptr< const MetadataValueKey< std::shared_ptr< const Choices > > > paludis::FakePackageID::choices_key ( ) const
overridevirtual

The choices_key, if non-zero, contains zero or more MetadataValueKey<std::shared_ptr<const Choice> > child keys holding choice information for this ID.

Implements paludis::PackageID.

References build_dependencies_key(), choices_key(), fetches_key(), homepage_key(), keywords_key(), post_dependencies_key(), and run_dependencies_key().

Referenced by choices_key().

◆ contents()

const std::shared_ptr< const Contents > paludis::FakePackageID::contents ( ) const
overridevirtual

The contents, if non-zero, contains the contents of a package. For installed packages, this means the files installed; for installable packages, this means the files that will be installed (if known, which it may be for some binary packages).

Since
0.66

Implements paludis::PackageID.

◆ dependencies_key()

const std::shared_ptr< const MetadataSpecTreeKey< DependencySpecTree > > paludis::FakePackageID::dependencies_key ( ) const
overridevirtual

The dependencies_key, if non-zero, provides all of a package's dependencies.

If dependencies_key is used, the client should ignore build_dependencies_key, run_dependencies_key and post_dependencies_key.

Repositories that support this key must also provide the old split out keys.

Since
0.41

Implements paludis::PackageID.

◆ extra_hash_value()

std::size_t paludis::FakePackageID::extra_hash_value ( ) const
overridevirtual

Provide any additional hash information for a PackageID.

The standard PackageID hash incorporates the repository name, the package name and the version of the package. If this function is defined, its value is also used when determining a hash. This can provide increased performance if a repository uses affixes or multiple slots per version.

Implements paludis::PackageID.

◆ fetches_key()

const std::shared_ptr< const MetadataSpecTreeKey< FetchableURISpecTree > > paludis::FakePackageID::fetches_key ( ) const
overridevirtual

The fetches_key, if non-zero, indicates files that have to be fetched in order to install a package.

Implements paludis::PackageID.

Referenced by choices_key().

◆ from_repositories_key()

const std::shared_ptr< const MetadataCollectionKey< Set< std::string > > > paludis::FakePackageID::from_repositories_key ( ) const
overridevirtual

The from_repositories key, if non-zero, contains the set of repositories that the ID is 'from'. An ID can be 'from' multiple repositories if, for example, it was built via a binary package.

Implements paludis::PackageID.

◆ fs_location_key()

const std::shared_ptr< const MetadataValueKey< FSPath > > paludis::FakePackageID::fs_location_key ( ) const
overridevirtual

The fs_location_key, if non-zero, indicates the filesystem location (for example, the ebuild file or VDB directory) that best describes the location of a PackageID.

Implements paludis::PackageID.

◆ homepage_key()

const std::shared_ptr< const MetadataSpecTreeKey< SimpleURISpecTree > > paludis::FakePackageID::homepage_key ( ) const
overridevirtual

The homepage_key, if non-zero, describes a package's homepages.

Implements paludis::PackageID.

Referenced by choices_key().

◆ installed_time_key()

const std::shared_ptr< const MetadataTimeKey > paludis::FakePackageID::installed_time_key ( ) const
overridevirtual

The installed_time_key, if non-zero, contains the time a package was installed. It affects dependency resolution if DepList is using dl_reinstall_scm_daily or dl_reinstall_scm_weekly.

Implements paludis::PackageID.

◆ keywords_key()

const std::shared_ptr< const MetadataCollectionKey< KeywordNameSet > > paludis::FakePackageID::keywords_key ( ) const
overridevirtual

The keywords_key, if non-zero, is used by FindUnusedPackagesTask to determine whether a package is unused.

Implements paludis::PackageID.

Referenced by choices_key().

◆ long_description_key()

const std::shared_ptr< const MetadataValueKey< std::string > > paludis::FakePackageID::long_description_key ( ) const
overridevirtual

The long_description_key, if non-zero, provides a long description of a package.

Implements paludis::PackageID.

◆ name()

const QualifiedPackageName paludis::FakePackageID::name ( ) const
overridevirtual

What is our package name?

Use canonical_form instead for outputting.

Implements paludis::PackageID.

◆ need_keys_added()

void paludis::FakePackageID::need_keys_added ( ) const
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.

◆ need_masks_added()

void paludis::FakePackageID::need_masks_added ( ) const
overrideprotectedvirtual

This method will be called before any of the mask iteration methods does its work. It can be used by subclasses to implement as-needed loading of masks.

Implements paludis::PackageID.

◆ perform_action()

void paludis::FakePackageID::perform_action ( Action & ) const
overridevirtual

Perform the specified action.

Implements paludis::PackageID.

◆ post_dependencies_key()

const std::shared_ptr< const MetadataSpecTreeKey< DependencySpecTree > > paludis::FakePackageID::post_dependencies_key ( ) const
overridevirtual

The post_dependencies_key, if non-zero, indicates a package's post-merge dependencies.

Implements paludis::PackageID.

Referenced by choices_key().

◆ repository_name()

const RepositoryName paludis::FakePackageID::repository_name ( ) const
overridevirtual

What is our owning repository?

Since
0.58

Implements paludis::PackageID.

◆ run_dependencies_key()

const std::shared_ptr< const MetadataSpecTreeKey< DependencySpecTree > > paludis::FakePackageID::run_dependencies_key ( ) const
overridevirtual

The run_dependencies_key, if non-zero, indicates a package's run-time dependencies.

Implements paludis::PackageID.

Referenced by choices_key().

◆ short_description_key()

const std::shared_ptr< const MetadataValueKey< std::string > > paludis::FakePackageID::short_description_key ( ) const
overridevirtual

The short_description_key, if non-zero, provides a short (no more than a few hundred characters) description of a package.

Implements paludis::PackageID.

◆ slot_key()

const std::shared_ptr< const MetadataValueKey< Slot > > paludis::FakePackageID::slot_key ( ) const
overridevirtual

The slot, if specified, controls whether the package can be installed in parallel with other versions of the same package.

Since
0.36

Implements paludis::PackageID.

◆ supports_action()

bool paludis::FakePackageID::supports_action ( const SupportsActionTestBase & ) const
overridevirtual

Do we support a particular action?

Attempting to call perform_action with an unsupported action type will lead to an UnsupportedActionError. However, in performance critical code and in situations where creating a full Action subclass instance is non-trivial, supports_action is much simpler.

Implements paludis::PackageID.

References PALUDIS_ATTRIBUTE.

◆ uniquely_identifying_spec()

PackageDepSpec paludis::FakePackageID::uniquely_identifying_spec ( ) const
overridevirtual

Return a PackageDepSpec that uniquely identifies us.

When stringified, can be turned back into an equivalent unique PackageDepSpec by using parse_user_package_dep_spec.

Since
0.36

Implements paludis::PackageID.

◆ version()

const VersionSpec paludis::FakePackageID::version ( ) const
overridevirtual

What is our package version?

Use canonical_form instead for outputting.

Implements paludis::PackageID.


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