#include <Package.h>
Public Types | |
typedef Package | Self |
typedef ResTraits< Self > | TraitsType |
typedef TraitsType::PtrType | Ptr |
typedef TraitsType::constPtrType | constPtr |
typedef sat::ArrayAttr < PackageKeyword, IdString > | Keywords |
typedef sat::ArrayAttr < std::string, std::string > | FileList |
Public Member Functions | |
VendorSupportOption | vendorSupport () const |
Returns the level of supportability the vendor gives to this package. | |
bool | maybeUnsupported () const |
True if the vendor support for this package is unknown or explictly unsupported. | |
Changelog | changelog () const |
Get the package change log. | |
std::string | buildhost () const |
std::string | distribution () const |
The distribution string. | |
std::string | license () const |
std::string | packager () const |
std::string | group () const |
Keywords | keywords () const |
std::string | url () const |
Don't ship it as class Url, because it might be in fact anything but a legal Url. | |
ByteCount | sourcesize () const |
Size of corresponding the source package. | |
std::list< std::string > | authors () const |
FileList | filelist () const |
Return the packages filelist (if available). | |
CheckSum | checksum () const |
Checksum the source says this package should have. | |
OnMediaLocation | location () const |
Location of the resolvable in the repository. | |
Source package handling | |
std::string | sourcePkgName () const |
Name of the source rpm this package was built from. | |
Edition | sourcePkgEdition () const |
Edition of the source rpm this package was built from. | |
std::string | sourcePkgType () const |
The type of the source rpm ("src" or "nosrc" ). | |
std::string | sourcePkgLongName () const |
The source rpms "name-version-release.type" . | |
Protected Member Functions | |
Package (const sat::Solvable &solvable_r) | |
Ctor. | |
virtual | ~Package () |
Dtor. | |
Friends | |
Ptr | make (const sat::Solvable &solvable_r) |
Directly create a certain kind of ResObject from sat::Solvable. |
Definition at line 32 of file Package.h.
typedef Package zypp::Package::Self |
typedef ResTraits<Self> zypp::Package::TraitsType |
typedef sat::ArrayAttr<std::string,std::string> zypp::Package::FileList |
zypp::Package::Package | ( | const sat::Solvable & | solvable_r | ) | [protected] |
zypp::Package::~Package | ( | ) | [protected, virtual] |
VendorSupportOption zypp::Package::vendorSupport | ( | ) | const |
Returns the level of supportability the vendor gives to this package.
If the identical package happens to appear in multiple repos with different support levels, the maximum level is returned.
This is one value from VendorSupportOption.
Definition at line 45 of file Package.cc.
References zypp::sat::ArrayAttr< _ResultT, _AttrT >::begin(), zypp::sat::WhatProvides::begin(), zypp::Resolvable::edition(), zypp::sat::Solvable::edition(), zypp::sat::ArrayAttr< _ResultT, _AttrT >::end(), zypp::sat::WhatProvides::end(), for_, zypp::sat::Solvable::ident(), zypp::Resolvable::ident(), zypp::sat::Solvable::identical(), zypp::sat::SolvAttr::keywords, zypp::VendorSupportACC, zypp::VendorSupportLevel1, zypp::VendorSupportLevel2, zypp::VendorSupportLevel3, zypp::VendorSupportUnknown, and zypp::VendorSupportUnsupported.
Referenced by maybeUnsupported().
bool zypp::Package::maybeUnsupported | ( | ) | const |
True if the vendor support for this package is unknown or explictly unsupported.
Definition at line 90 of file Package.cc.
References vendorSupport(), zypp::VendorSupportACC, zypp::VendorSupportUnknown, and zypp::VendorSupportUnsupported.
Changelog zypp::Package::changelog | ( | ) | const |
Get the package change log.
Definition at line 98 of file Package.cc.
References ERR, zypp::Resolvable::name(), zypp::ResObject::repository(), and WAR.
std::string zypp::Package::buildhost | ( | ) | const |
Definition at line 117 of file Package.cc.
References zypp::sat::SolvAttr::buildhost, and zypp::sat::Solvable::lookupStrAttribute().
std::string zypp::Package::distribution | ( | ) | const |
The distribution string.
E.g. code-11
.
Reimplemented from zypp::ResObject.
Definition at line 120 of file Package.cc.
References zypp::sat::SolvAttr::distribution, and zypp::sat::Solvable::lookupStrAttribute().
std::string zypp::Package::license | ( | ) | const |
Definition at line 123 of file Package.cc.
References zypp::sat::SolvAttr::license, and zypp::sat::Solvable::lookupStrAttribute().
std::string zypp::Package::packager | ( | ) | const |
Definition at line 126 of file Package.cc.
References zypp::sat::Solvable::lookupStrAttribute(), and zypp::sat::SolvAttr::packager.
std::string zypp::Package::group | ( | ) | const |
Definition at line 129 of file Package.cc.
References zypp::sat::SolvAttr::group, and zypp::sat::Solvable::lookupStrAttribute().
Package::Keywords zypp::Package::keywords | ( | ) | const |
Definition at line 132 of file Package.cc.
References zypp::sat::SolvAttr::keywords, and zypp::Resolvable::satSolvable().
std::string zypp::Package::url | ( | ) | const |
Don't ship it as class Url, because it might be in fact anything but a legal Url.
Definition at line 135 of file Package.cc.
References zypp::sat::Solvable::lookupStrAttribute(), and zypp::sat::SolvAttr::url.
ByteCount zypp::Package::sourcesize | ( | ) | const |
Size of corresponding the source package.
Definition at line 138 of file Package.cc.
References zypp::sat::Solvable::lookupNumAttribute(), and zypp::sat::SolvAttr::sourcesize.
std::list< std::string > zypp::Package::authors | ( | ) | const |
Definition at line 141 of file Package.cc.
References zypp::sat::SolvAttr::authors, zypp::sat::Solvable::lookupStrAttribute(), and zypp::url::split().
Package::FileList zypp::Package::filelist | ( | ) | const |
Return the packages filelist (if available).
The returned FileList appears to be a container of std::string
. In fact it is a query, so it does not consume much memory.
Definition at line 148 of file Package.cc.
References zypp::sat::SolvAttr::filelist, and zypp::Resolvable::satSolvable().
std::string zypp::Package::sourcePkgName | ( | ) | const |
Name of the source rpm this package was built from.
Definition at line 157 of file Package.cc.
References zypp::sat::Solvable::id(), zypp::sat::Solvable::lookupIdAttribute(), zypp::Resolvable::name(), and zypp::sat::SolvAttr::sourcename.
Referenced by sourcePkgLongName().
Edition zypp::Package::sourcePkgEdition | ( | ) | const |
Edition of the source rpm this package was built from.
Definition at line 164 of file Package.cc.
References zypp::Resolvable::edition(), zypp::sat::Solvable::id(), zypp::sat::Solvable::lookupIdAttribute(), and zypp::sat::SolvAttr::sourceevr.
Referenced by sourcePkgLongName().
std::string zypp::Package::sourcePkgType | ( | ) | const |
The type of the source rpm ("src"
or "nosrc"
).
Definition at line 171 of file Package.cc.
References zypp::sat::Solvable::lookupStrAttribute(), and zypp::sat::SolvAttr::sourcearch.
Referenced by sourcePkgLongName().
std::string zypp::Package::sourcePkgLongName | ( | ) | const |
The source rpms "name-version-release.type"
.
Definition at line 174 of file Package.cc.
References zypp::str::form(), sourcePkgEdition(), sourcePkgName(), and sourcePkgType().
CheckSum zypp::Package::checksum | ( | ) | const |
Checksum the source says this package should have.
Definition at line 151 of file Package.cc.
References zypp::sat::SolvAttr::checksum, and zypp::sat::Solvable::lookupCheckSumAttribute().
OnMediaLocation zypp::Package::location | ( | ) | const |
Location of the resolvable in the repository.
OnMediaLocation conatins all information required to retrieve the packge (url, checksum, etc.).
Definition at line 154 of file Package.cc.
References zypp::sat::Solvable::lookupLocation().
Ptr make | ( | const sat::Solvable & | solvable_r | ) | [friend] |
Directly create a certain kind of ResObject from sat::Solvable.
If the sat::Solvables kind is not appropriate, a NULL pointer is returned.
sat::Solvable s; ResObject::Ptr p( makeResObject( s ) ); ResObject::Ptr q( make<ResObject>( s ) ); Package::Ptr pkg( make<Package>( s ) );
Definition at line 236 of file ResObject.h.