#include <package_id.hh>
Masks | |
typedef WrappedForwardIterator < MasksConstIteratorTag, const std::tr1::shared_ptr< const Mask > > | MasksConstIterator |
MasksConstIterator | begin_masks () const PALUDIS_ATTRIBUTE((warn_unused_result)) |
MasksConstIterator | end_masks () const PALUDIS_ATTRIBUTE((warn_unused_result)) |
bool | masked () const PALUDIS_ATTRIBUTE((warn_unused_result)) |
virtual void | invalidate_masks () const |
virtual std::tr1::shared_ptr < const Set< std::string > > | breaks_portage () const PALUDIS_ATTRIBUTE((warn_unused_result))=0 |
Overridden masks | |
| |
typedef WrappedForwardIterator < OverriddenMasksConstIteratorTag, const std::tr1::shared_ptr < const OverriddenMask > > | OverriddenMasksConstIterator |
OverriddenMasksConstIterator | begin_overridden_masks () const PALUDIS_ATTRIBUTE((warn_unused_result)) |
OverriddenMasksConstIterator | end_overridden_masks () const PALUDIS_ATTRIBUTE((warn_unused_result)) |
Basic operations | |
PackageID () | |
virtual | ~PackageID ()=0 |
std::size_t | hash () const PALUDIS_ATTRIBUTE((warn_unused_result)) |
Name related operations | |
virtual const std::string | canonical_form (const PackageIDCanonicalForm) const =0 |
virtual const QualifiedPackageName | name () const =0 |
virtual const VersionSpec | version () const =0 |
virtual const std::tr1::shared_ptr< const Repository > | repository () const =0 |
virtual PackageDepSpec | uniquely_identifying_spec () const =0 |
Specific metadata keys | |
virtual const std::tr1::shared_ptr< const MetadataValueKey< SlotName > > | slot_key () const =0 |
virtual const std::tr1::shared_ptr< const MetadataValueKey < std::tr1::shared_ptr< const PackageID > > > | virtual_for_key () const =0 |
virtual const std::tr1::shared_ptr< const MetadataCollectionKey < KeywordNameSet > > | keywords_key () const =0 |
virtual const std::tr1::shared_ptr< const MetadataSpecTreeKey < ProvideSpecTree > > | provide_key () const =0 |
virtual const std::tr1::shared_ptr< const MetadataCollectionKey < PackageIDSequence > > | contains_key () const =0 |
virtual const std::tr1::shared_ptr< const MetadataValueKey < std::tr1::shared_ptr< const PackageID > > > | contained_in_key () const =0 |
virtual const std::tr1::shared_ptr< const MetadataSpecTreeKey < DependencySpecTree > > | build_dependencies_key () const =0 |
virtual const std::tr1::shared_ptr< const MetadataSpecTreeKey < DependencySpecTree > > | run_dependencies_key () const =0 |
virtual const std::tr1::shared_ptr< const MetadataSpecTreeKey < DependencySpecTree > > | post_dependencies_key () const =0 |
virtual const std::tr1::shared_ptr< const MetadataSpecTreeKey < DependencySpecTree > > | suggested_dependencies_key () const =0 |
virtual const std::tr1::shared_ptr< const MetadataSpecTreeKey < FetchableURISpecTree > > | fetches_key () const =0 |
virtual const std::tr1::shared_ptr< const MetadataSpecTreeKey < SimpleURISpecTree > > | homepage_key () const =0 |
virtual const std::tr1::shared_ptr< const MetadataValueKey< std::string > > | short_description_key () const =0 |
virtual const std::tr1::shared_ptr< const MetadataValueKey< std::string > > | long_description_key () const =0 |
virtual const std::tr1::shared_ptr< const MetadataValueKey < std::tr1::shared_ptr< const Contents > > > | contents_key () const =0 |
virtual const std::tr1::shared_ptr< const MetadataTimeKey > | installed_time_key () const =0 |
virtual const std::tr1::shared_ptr< const MetadataCollectionKey< Set < std::string > > > | from_repositories_key () const =0 |
virtual const std::tr1::shared_ptr< const MetadataValueKey< FSEntry > > | fs_location_key () const =0 |
virtual const std::tr1::shared_ptr< const MetadataValueKey< bool > > | transient_key () const =0 |
virtual const std::tr1::shared_ptr< const MetadataValueKey < std::tr1::shared_ptr< const Choices > > > | choices_key () const =0 |
Actions | |
virtual bool | supports_action (const SupportsActionTestBase &) const PALUDIS_ATTRIBUTE((warn_unused_result))=0 |
virtual void | perform_action (Action &) const =0 |
Extra comparisons | |
virtual bool | arbitrary_less_than_comparison (const PackageID &) const PALUDIS_ATTRIBUTE((warn_unused_result))=0 |
virtual std::size_t | extra_hash_value () const PALUDIS_ATTRIBUTE((warn_unused_result))=0 |
Public Member Functions | |
virtual const std::tr1::shared_ptr< const MetadataSpecTreeKey < DependencySpecTree > > | dependencies_key () const =0 |
Protected Member Functions | |
virtual void | add_mask (const std::tr1::shared_ptr< const Mask > &) const |
virtual void | add_overridden_mask (const std::tr1::shared_ptr< const OverriddenMask > &) const |
virtual void | need_masks_added () const =0 |
All PackageID instances have some basic identification data:
It should be noted that the above together are not sufficient to uniquely identify a package. Some repositories support multiple slots per version of a package, and some repositories support additional affixes that prevent a package from being uniquely identifiable merely by the above.
PackageID instances also have:
A PackageID instance may support certain actions, which are represented via an Action subclass instance.
virtual void paludis::PackageID::add_mask | ( | const std::tr1::shared_ptr< const Mask > & | ) | const [protected, virtual] |
Add a new Mask.
virtual void paludis::PackageID::add_overridden_mask | ( | const std::tr1::shared_ptr< const OverriddenMask > & | ) | const [protected, virtual] |
virtual void paludis::PackageID::need_masks_added | ( | ) | const [protected, pure virtual] |
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.
Implemented in paludis::FakePackageID.
virtual const std::string paludis::PackageID::canonical_form | ( | const | PackageIDCanonicalForm | ) | const [pure virtual] |
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.
Implemented in paludis::FakePackageID.
virtual const QualifiedPackageName paludis::PackageID::name | ( | ) | const [pure virtual] |
What is our package name?
Use canonical_form instead for outputting.
Implemented in paludis::FakePackageID.
virtual const VersionSpec paludis::PackageID::version | ( | ) | const [pure virtual] |
What is our package version?
Use canonical_form instead for outputting.
Implemented in paludis::FakePackageID.
virtual const std::tr1::shared_ptr<const Repository> paludis::PackageID::repository | ( | ) | const [pure virtual] |
What is our owning repository?
Implemented in paludis::FakePackageID.
virtual PackageDepSpec paludis::PackageID::uniquely_identifying_spec | ( | ) | const [pure virtual] |
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.
Implemented in paludis::FakePackageID.
virtual const std::tr1::shared_ptr<const MetadataValueKey<SlotName> > paludis::PackageID::slot_key | ( | ) | const [pure virtual] |
The slot, if specified, controls whether the package can be installed in parallel with other versions of the same package.
Implemented in paludis::FakePackageID.
virtual const std::tr1::shared_ptr<const MetadataValueKey<std::tr1::shared_ptr<const PackageID> > > paludis::PackageID::virtual_for_key | ( | ) | const [pure virtual] |
The virtual_for_key, if non-zero, indicates that we are an (old-style) virtual for another package. This affects dependency resolution.
Implemented in paludis::FakePackageID.
virtual const std::tr1::shared_ptr<const MetadataCollectionKey<KeywordNameSet> > paludis::PackageID::keywords_key | ( | ) | const [pure virtual] |
The keywords_key, if non-zero, is used by FindUnusedPackagesTask to determine whether a package is unused.
Implemented in paludis::FakePackageID.
virtual const std::tr1::shared_ptr<const MetadataSpecTreeKey<ProvideSpecTree> > paludis::PackageID::provide_key | ( | ) | const [pure virtual] |
The provide_key, if non-zero, indicates that a package provides certain old-style virtuals. This affects dependency resolution.
Implemented in paludis::FakePackageID.
virtual const std::tr1::shared_ptr<const MetadataCollectionKey<PackageIDSequence> > paludis::PackageID::contains_key | ( | ) | const [pure virtual] |
The contains_key, if non-zero, indicates that a package contains other packages. This affects dependency resolution.
Implemented in paludis::FakePackageID.
virtual const std::tr1::shared_ptr<const MetadataValueKey<std::tr1::shared_ptr<const PackageID> > > paludis::PackageID::contained_in_key | ( | ) | const [pure virtual] |
The contained_in_key, if non-zero, indicates that a package is contained in another package. This affects dependency resolution.
Implemented in paludis::FakePackageID.
virtual const std::tr1::shared_ptr<const MetadataSpecTreeKey<DependencySpecTree> > paludis::PackageID::build_dependencies_key | ( | ) | const [pure virtual] |
The build_dependencies_key, if non-zero, indicates a package's build-time dependencies.
Implemented in paludis::FakePackageID.
virtual const std::tr1::shared_ptr<const MetadataSpecTreeKey<DependencySpecTree> > paludis::PackageID::run_dependencies_key | ( | ) | const [pure virtual] |
The run_dependencies_key, if non-zero, indicates a package's run-time dependencies.
Implemented in paludis::FakePackageID.
virtual const std::tr1::shared_ptr<const MetadataSpecTreeKey<DependencySpecTree> > paludis::PackageID::post_dependencies_key | ( | ) | const [pure virtual] |
The post_dependencies_key, if non-zero, indicates a package's post-merge dependencies.
Implemented in paludis::FakePackageID.
virtual const std::tr1::shared_ptr<const MetadataSpecTreeKey<DependencySpecTree> > paludis::PackageID::suggested_dependencies_key | ( | ) | const [pure virtual] |
The suggested_dependencies_key, if non-zero, indicates a package's suggested post-merge dependencies.
Implemented in paludis::FakePackageID.
virtual const std::tr1::shared_ptr<const MetadataSpecTreeKey<FetchableURISpecTree> > paludis::PackageID::fetches_key | ( | ) | const [pure virtual] |
The fetches_key, if non-zero, indicates files that have to be fetched in order to install a package.
Implemented in paludis::FakePackageID.
virtual const std::tr1::shared_ptr<const MetadataSpecTreeKey<SimpleURISpecTree> > paludis::PackageID::homepage_key | ( | ) | const [pure virtual] |
The homepage_key, if non-zero, describes a package's homepages.
Implemented in paludis::FakePackageID.
virtual const std::tr1::shared_ptr<const MetadataValueKey<std::string> > paludis::PackageID::short_description_key | ( | ) | const [pure virtual] |
The short_description_key, if non-zero, provides a short (no more than a few hundred characters) description of a package.
Implemented in paludis::FakePackageID.
virtual const std::tr1::shared_ptr<const MetadataValueKey<std::string> > paludis::PackageID::long_description_key | ( | ) | const [pure virtual] |
The long_description_key, if non-zero, provides a long description of a package.
Implemented in paludis::FakePackageID.
virtual const std::tr1::shared_ptr<const MetadataValueKey<std::tr1::shared_ptr<const Contents> > > paludis::PackageID::contents_key | ( | ) | const [pure virtual] |
The contents_key, 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).
Implemented in paludis::FakePackageID.
virtual const std::tr1::shared_ptr<const MetadataTimeKey> paludis::PackageID::installed_time_key | ( | ) | const [pure virtual] |
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.
Implemented in paludis::FakePackageID.
virtual const std::tr1::shared_ptr<const MetadataCollectionKey<Set<std::string> > > paludis::PackageID::from_repositories_key | ( | ) | const [pure virtual] |
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.
Implemented in paludis::FakePackageID.
virtual const std::tr1::shared_ptr<const MetadataValueKey<FSEntry> > paludis::PackageID::fs_location_key | ( | ) | const [pure virtual] |
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.
Implemented in paludis::FakePackageID.
virtual const std::tr1::shared_ptr<const MetadataValueKey<bool> > paludis::PackageID::transient_key | ( | ) | const [pure virtual] |
The transient_key, if non-zero, indicates whether this PackageID's originating repository is volatile.
Implemented in paludis::FakePackageID.
virtual const std::tr1::shared_ptr<const MetadataValueKey<std::tr1::shared_ptr<const Choices> > > paludis::PackageID::choices_key | ( | ) | const [pure virtual] |
The choices_key, if non-zero, contains zero or more MetadataValueKey<std::tr1::shared_ptr<const Choice> > child keys holding choice information for this ID.
Implemented in paludis::FakePackageID.
virtual bool paludis::PackageID::supports_action | ( | const SupportsActionTestBase & | ) | const [pure virtual] |
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.
Implemented in paludis::FakePackageID.
virtual void paludis::PackageID::perform_action | ( | Action & | ) | const [pure virtual] |
Perform the specified action.
Implemented in paludis::FakePackageID.
bool paludis::PackageID::masked | ( | ) | const |
Do we have any effective masks? Equivalent to begin_masks() != end_masks().
virtual void paludis::PackageID::invalidate_masks | ( | ) | const [virtual] |
Invalidate any masks.
PackageID implementations may cache masks. This can cause problems if the operating environment changes. Calling this method will clear any masks held by the PackageID.
Reimplemented in paludis::FakePackageID.
virtual std::tr1::shared_ptr<const Set<std::string> > paludis::PackageID::breaks_portage | ( | ) | const [pure virtual] |
Do we break Portage, and if so, why?
This method may be used by Environment implementations to apply a "we don't want packages that break Portage" mask.
Implemented in paludis::FakePackageID.
virtual bool paludis::PackageID::arbitrary_less_than_comparison | ( | const PackageID & | ) | const [pure virtual] |
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.
Implemented in paludis::FakePackageID.
virtual std::size_t paludis::PackageID::extra_hash_value | ( | ) | const [pure virtual] |
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.
Implemented in paludis::FakePackageID.
virtual const std::tr1::shared_ptr<const MetadataSpecTreeKey<DependencySpecTree> > paludis::PackageID::dependencies_key | ( | ) | const [pure virtual] |
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, post_dependencies_key and suggested_dependencies_key.
Repositories that support this key must also provide the old split out keys.
Implemented in paludis::FakePackageID.