libzypp
10.5.0
|
#include <Repository.h>
Classes | |
struct | EraseFromPool |
Functor removing Repository from it's Pool. More... | |
class | ProductInfoIterator |
Query class for Repository related products. More... | |
Public Types | |
typedef filter_iterator < detail::ByRepository, sat::detail::SolvableIterator > | SolvableIterator |
typedef sat::detail::size_type | size_type |
typedef sat::detail::RepoIdType | IdType |
typedef sat::ArrayAttr < std::string, std::string > | Keywords |
Public Member Functions | |
Repository () | |
Default ctor creates noRepository. | |
Repository (IdType id_r) | |
PoolImpl ctor. | |
bool | isSystemRepo () const |
Return whether this is the system repository. | |
std::string | alias () const |
Short unique string to identify a repo. | |
std::string | name () const |
Label to display for this repo. | |
Date | generatedTimestamp () const |
Timestamp when this repository was generated. | |
Date | suggestedExpirationTimestamp () const |
Suggested expiration timestamp. | |
Keywords | keywords () const |
repository keywords (tags) | |
bool | maybeOutdated () const |
The suggested expiration date of this repository already passed. | |
bool | isUpdateRepo () const |
if the repository claims to update something then it is an update repository | |
bool | providesUpdatesFor (const std::string &cpeid) const |
wether the repository claims to update something prod with key cpeid | |
bool | solvablesEmpty () const |
Whether Repository contains solvables. | |
size_type | solvablesSize () const |
Number of solvables in Repository. | |
SolvableIterator | solvablesBegin () const |
Iterator to the first Solvable. | |
SolvableIterator | solvablesEnd () const |
Iterator behind the last Solvable. | |
ProductInfoIterator | compatibleWithProductBegin () const |
Get an iterator to the beginning of the repository compatible distros. | |
ProductInfoIterator | compatibleWithProductEnd () const |
Get an iterator to the end of the repository compatible distros. | |
ProductInfoIterator | updatesProductBegin () const |
Get an iterator to the beginning of the repository compatible distros. | |
ProductInfoIterator | updatesProductEnd () const |
Get an iterator to the end of the repository compatible distros. | |
RepoInfo | info () const |
Return any associated RepoInfo. | |
void | setInfo (const RepoInfo &info_r) |
Set RepoInfo for this repository. | |
void | clearInfo () |
Remove any RepoInfo set for this repository. | |
void | eraseFromPool () |
Remove this Repository from it's Pool. | |
Repository | nextInPool () const |
Return next Repository in Pool (or noRepository). | |
::_Repo * | get () const |
Expert backdoor. | |
IdType | id () const |
Expert backdoor. | |
Repository content manipulating methods. | |
| |
void | addSolv (const Pathname &file_r) |
Load Solvables from a solv-file. | |
void | addHelix (const Pathname &file_r) |
Load Solvables from a helix-file. | |
sat::Solvable::IdType | addSolvables (unsigned count_r) |
Add count_r new empty Solvable to this Repository. | |
sat::Solvable::IdType | addSolvable () |
int | satInternalPriority () const |
libsolv internal priorities. | |
int | satInternalSubPriority () const |
Static Public Member Functions | |
static const std::string & | systemRepoAlias () |
Reserved system repository alias . | |
Static Public Attributes | |
static const Repository | noRepository |
Represents no Repository. | |
Private Member Functions | |
friend | base::SafeBool () const |
bool | boolTest () const |
Private Attributes | |
IdType | _id |
Related Functions | |
(Note that these are not member functions.) | |
std::ostream & | operator<< (std::ostream &str, const Repository &obj) |
bool | operator== (const Repository &lhs, const Repository &rhs) |
bool | operator!= (const Repository &lhs, const Repository &rhs) |
bool | operator< (const Repository &lhs, const Repository &rhs) |
Definition at line 38 of file Repository.h.
typedef filter_iterator<detail::ByRepository, sat::detail::SolvableIterator> zypp::Repository::SolvableIterator |
Definition at line 42 of file Repository.h.
Definition at line 43 of file Repository.h.
Definition at line 44 of file Repository.h.
typedef sat::ArrayAttr<std::string,std::string> zypp::Repository::Keywords |
Definition at line 46 of file Repository.h.
zypp::Repository::Repository | ( | ) | [inline] |
Default ctor creates noRepository.
Definition at line 50 of file Repository.h.
zypp::Repository::Repository | ( | IdType | id_r | ) | [inline, explicit] |
PoolImpl ctor.
Definition at line 54 of file Repository.h.
const std::string & zypp::Repository::systemRepoAlias | ( | ) | [static] |
Reserved system repository alias .
Definition at line 34 of file Repository.cc.
bool zypp::Repository::isSystemRepo | ( | ) | const |
Return whether this is the system repository.
Definition at line 50 of file Repository.cc.
std::string zypp::Repository::alias | ( | ) | const |
Short unique string to identify a repo.
ie: openSUSE-10.3
If you are looking for a label to display see name(). ie: "openSUSE 10.3 Main repository"
Definition at line 56 of file Repository.cc.
std::string zypp::Repository::name | ( | ) | const |
Label to display for this repo.
Definition at line 64 of file Repository.cc.
zypp::Date zypp::Repository::generatedTimestamp | ( | ) | const |
Timestamp when this repository was generated.
Usually this value is calculated as the newer timestamp from the timestamp of all the resources that conform the repository's metadata.
For example in a rpm-md repository, it would be the resource specified in the xml file whith the newest timestamp attribute (which is the timestamp of the file in the server ).
The timestamp is 0 if the repository does not specify when it was generated.
Definition at line 80 of file Repository.cc.
zypp::Date zypp::Repository::suggestedExpirationTimestamp | ( | ) | const |
Suggested expiration timestamp.
Repositories can define an amount of time they expire, with the generated timestamp as the base point of time.
Note that is the responsability of the repository to freshen the generated timestamp to tell the client that the repo is alive and updating the metadata.
The timestamp is 0 if the repository does not specify an expiration date.
Definition at line 87 of file Repository.cc.
Repository::Keywords zypp::Repository::keywords | ( | ) | const |
repository keywords (tags)
Definition at line 101 of file Repository.cc.
bool zypp::Repository::maybeOutdated | ( | ) | const |
The suggested expiration date of this repository already passed.
rpm-md repositories can provide this tag using the expire extension tag:
Definition at line 107 of file Repository.cc.
bool zypp::Repository::isUpdateRepo | ( | ) | const |
if the repository claims to update something then it is an update repository
This is implemented by looking at the repository updates tag.
Definition at line 140 of file Repository.cc.
bool zypp::Repository::providesUpdatesFor | ( | const std::string & | cpeid | ) | const |
wether the repository claims to update something prod with key cpeid
See http://cpe.mitre.org/ for more information on the Common Platform Enumearation.
Definition at line 123 of file Repository.cc.
bool zypp::Repository::solvablesEmpty | ( | ) | const |
Whether Repository contains solvables.
Definition at line 146 of file Repository.cc.
Repository::size_type zypp::Repository::solvablesSize | ( | ) | const |
Number of solvables in Repository.
Definition at line 152 of file Repository.cc.
Repository::SolvableIterator zypp::Repository::solvablesBegin | ( | ) | const |
Iterator to the first Solvable.
Definition at line 158 of file Repository.cc.
Repository::SolvableIterator zypp::Repository::solvablesEnd | ( | ) | const |
Iterator behind the last Solvable.
Definition at line 168 of file Repository.cc.
Repository::ProductInfoIterator zypp::Repository::compatibleWithProductBegin | ( | ) | const |
Get an iterator to the beginning of the repository compatible distros.
Definition at line 178 of file Repository.cc.
Repository::ProductInfoIterator zypp::Repository::compatibleWithProductEnd | ( | ) | const |
Get an iterator to the end of the repository compatible distros.
Definition at line 184 of file Repository.cc.
Repository::ProductInfoIterator zypp::Repository::updatesProductBegin | ( | ) | const |
Get an iterator to the beginning of the repository compatible distros.
Definition at line 189 of file Repository.cc.
Repository::ProductInfoIterator zypp::Repository::updatesProductEnd | ( | ) | const |
Get an iterator to the end of the repository compatible distros.
Definition at line 195 of file Repository.cc.
RepoInfo zypp::Repository::info | ( | ) | const |
Return any associated RepoInfo.
Definition at line 200 of file Repository.cc.
void zypp::Repository::setInfo | ( | const RepoInfo & | info_r | ) |
Set RepoInfo for this repository.
Exception | if this is noRepository |
Exception | if the RepoInfo::alias does not match the Repository::name. |
Definition at line 206 of file Repository.cc.
void zypp::Repository::clearInfo | ( | ) |
Remove any RepoInfo set for this repository.
Definition at line 218 of file Repository.cc.
void zypp::Repository::eraseFromPool | ( | ) |
Remove this Repository from it's Pool.
Definition at line 224 of file Repository.cc.
Repository zypp::Repository::nextInPool | ( | ) | const |
Return next Repository in Pool (or noRepository).
Definition at line 232 of file Repository.cc.
void zypp::Repository::addSolv | ( | const Pathname & | file_r | ) |
Load Solvables from a solv-file.
In case of an exception the repository remains in the Pool.
Exception | if this is noRepository |
Exception | if loading the solv-file fails. |
Definition at line 247 of file Repository.cc.
void zypp::Repository::addHelix | ( | const Pathname & | file_r | ) |
Load Solvables from a helix-file.
Supports loading of gzip compressed files (.gz). In case of an exception the repository remains in the Pool.
Exception | if this is noRepository |
Exception | if loading the helix-file fails. |
Definition at line 266 of file Repository.cc.
sat::detail::SolvableIdType zypp::Repository::addSolvables | ( | unsigned | count_r | ) |
Add count_r
new empty Solvable to this Repository.
Definition at line 288 of file Repository.cc.
sat::Solvable::IdType zypp::Repository::addSolvable | ( | ) | [inline] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 256 of file Repository.h.
_Repo * zypp::Repository::get | ( | ) | const |
Expert backdoor.
Definition at line 39 of file Repository.cc.
IdType zypp::Repository::id | ( | ) | const [inline] |
Expert backdoor.
Definition at line 264 of file Repository.h.
int zypp::Repository::satInternalPriority | ( | ) | const |
libsolv internal priorities.
Unlike the RepoInfo priority which tries to be YUM conform (H[1-99]L), this one is the solvers internal priority representation. It is type int
and as one might expect it, the higher the value the higher the priority. Subpriority is currently used to express media preferences (
Definition at line 67 of file Repository.cc.
int zypp::Repository::satInternalSubPriority | ( | ) | const |
Definition at line 73 of file Repository.cc.
zypp::Repository::base::SafeBool | ( | ) | const [private] |
bool zypp::Repository::boolTest | ( | ) | const [inline, private] |
Definition at line 280 of file Repository.h.
std::ostream & operator<< | ( | std::ostream & | str, |
const Repository & | obj | ||
) | [related] |
Stream output
Definition at line 299 of file Repository.cc.
bool operator== | ( | const Repository & | lhs, |
const Repository & | rhs | ||
) | [related] |
Definition at line 290 of file Repository.h.
bool operator!= | ( | const Repository & | lhs, |
const Repository & | rhs | ||
) | [related] |
Definition at line 294 of file Repository.h.
bool operator< | ( | const Repository & | lhs, |
const Repository & | rhs | ||
) | [related] |
Definition at line 298 of file Repository.h.
const Repository zypp::Repository::noRepository [static] |
Represents no Repository.
Definition at line 59 of file Repository.h.
IdType zypp::Repository::_id [private] |
Definition at line 282 of file Repository.h.