#include <Target.h>
Classes | |
struct | DistributionLabel |
Public Types | |
typedef target::TargetImpl | Impl |
typedef intrusive_ptr< Impl > | Impl_Ptr |
typedef std::list< PoolItem > | PoolItemList |
Public Member Functions | |
void | buildCache () |
builds or refreshes the target cache | |
void | cleanCache () |
cleans the target cache (.solv files) | |
void | load () |
load resolvables into the pool | |
void | unload () |
unload target resolvables from the pool | |
target::rpm::RpmDb & | rpmDb () |
Refference to the RPM database. | |
bool | providesFile (const std::string &name_str, const std::string &path_str) const |
If the package is installed and provides the file Needed to evaluate split provides during Resolver::Upgrade(). | |
std::string | whoOwnsFile (const std::string &path_str) const |
Return name of package owning path_str or empty string if no installed package owns path_str. | |
Pathname | root () const |
Return the root set for this target. | |
Pathname | assertRootPrefix (const Pathname &path_r) const |
Return the path prefixed by the target root, unless it already is prefixed. | |
Date | timestamp () const |
return the last modification date of the target | |
Product::constPtr | baseProduct () const |
returns the target base installed product, also known as the distribution or platform. | |
Target (const Pathname &root="/", bool doRebuild_r=false) | |
Ctor. | |
Target (const Impl_Ptr &impl_r) | |
Ctor. | |
Static Public Member Functions | |
static Target_Ptr | nullimpl () |
Null implementation. | |
Private Member Functions | |
std::ostream & | dumpOn (std::ostream &str) const |
Stream output. | |
Private Attributes | |
RW_pointer< Impl, rw_pointer::Intrusive< Impl > > | _pimpl |
Pointer to implementation. | |
Static Private Attributes | |
static Target_Ptr | _nullimpl |
Friends | |
class | zypp_detail::ZYppImpl |
Direct access to Impl. | |
std::ostream & | operator<< (std::ostream &str, const Target &obj) |
Base product and registration. | |
Static methods herein allow to retrieve the values without explicitly initializing the Target.
They take a targets root directory as argument. If an empty Pathname is passed, an already existing Targets root is used, otherwise | |
std::string | targetDistribution () const |
This is register.target attribute of the installed base product. | |
std::string | targetDistributionRelease () const |
This is register.release attribute of the installed base product. | |
DistributionLabel | distributionLabel () const |
This is shortName and summary attribute of the installed base product. | |
std::string | distributionVersion () const |
This is version attribute of the installed base product. | |
std::string | distributionFlavor () const |
This is flavor attribute of the installed base product but does not require the target to be loaded as it remembers the last used one. | |
std::string | anonymousUniqueId () const |
anonymous unique id | |
static std::string | targetDistribution (const Pathname &root_r) |
static std::string | targetDistributionRelease (const Pathname &root_r) |
static DistributionLabel | distributionLabel (const Pathname &root_r) |
static std::string | distributionVersion (const Pathname &root_r) |
static std::string | distributionFlavor (const Pathname &root_r) |
static std::string | anonymousUniqueId (const Pathname &root_r) |
Definition at line 49 of file Target.h.
typedef target::TargetImpl zypp::Target::Impl |
typedef intrusive_ptr<Impl> zypp::Target::Impl_Ptr |
typedef std::list<PoolItem> zypp::Target::PoolItemList |
zypp::Target::Target | ( | const Pathname & | root = "/" , |
|
bool | doRebuild_r = false | |||
) | [explicit] |
Ctor.
If doRebuild_r
is true
, an already existing database is rebuilt (rpm --rebuilddb ).
Definition at line 32 of file Target.cc.
Referenced by nullimpl().
zypp::Target::Target | ( | const Impl_Ptr & | impl_r | ) | [explicit] |
void zypp::Target::buildCache | ( | ) |
void zypp::Target::cleanCache | ( | ) |
void zypp::Target::load | ( | ) |
void zypp::Target::unload | ( | ) |
Target_Ptr zypp::Target::nullimpl | ( | ) | [static] |
Null implementation.
Definition at line 51 of file Target.cc.
References _nullimpl, zypp::target::TargetImpl::nullimpl(), and Target().
target::rpm::RpmDb & zypp::Target::rpmDb | ( | ) |
bool zypp::Target::providesFile | ( | const std::string & | name_str, | |
const std::string & | path_str | |||
) | const |
std::string zypp::Target::whoOwnsFile | ( | const std::string & | path_str | ) | const |
Pathname zypp::Target::root | ( | ) | const |
Return the root set for this target.
Definition at line 88 of file Target.cc.
References _pimpl.
Referenced by assertRootPrefix().
Pathname zypp::Target::assertRootPrefix | ( | const Pathname & | path_r | ) | const [inline] |
Date zypp::Target::timestamp | ( | ) | const |
Product::constPtr zypp::Target::baseProduct | ( | ) | const |
returns the target base installed product, also known as the distribution or platform.
returns 0 if there is no base installed product in the pool.
Definition at line 103 of file Target.cc.
References _pimpl.
std::string zypp::Target::targetDistribution | ( | ) | const |
This is register.target
attribute of the installed base product.
Used for registration and Service refresh.
Definition at line 106 of file Target.cc.
References _pimpl.
Referenced by zypp::media::agentString(), zypp::media::MediaAria2c::agentString(), zypp::RepoManager::refreshService(), and targetDistribution().
std::string zypp::Target::targetDistribution | ( | const Pathname & | root_r | ) | [static] |
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 108 of file Target.cc.
References targetDistribution().
std::string zypp::Target::targetDistributionRelease | ( | ) | const |
This is register.release
attribute of the installed base product.
Used for registration.
Definition at line 111 of file Target.cc.
References _pimpl.
Referenced by targetDistributionRelease().
std::string zypp::Target::targetDistributionRelease | ( | const Pathname & | root_r | ) | [static] |
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 113 of file Target.cc.
References targetDistributionRelease().
Target::DistributionLabel zypp::Target::distributionLabel | ( | ) | const |
This is shortName
and summary
attribute of the installed base product.
Used e.g. for the bootloader menu.
Definition at line 116 of file Target.cc.
References _pimpl.
Referenced by distributionLabel().
Target::DistributionLabel zypp::Target::distributionLabel | ( | const Pathname & | root_r | ) | [static] |
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 118 of file Target.cc.
References distributionLabel().
std::string zypp::Target::distributionVersion | ( | ) | const |
This is version
attribute of the installed base product.
For example http://download.opensue.org/update/11.0 The 11.0 corresponds to the base product version.
Definition at line 121 of file Target.cc.
References _pimpl.
Referenced by distributionVersion().
std::string zypp::Target::distributionVersion | ( | const Pathname & | root_r | ) | [static] |
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 123 of file Target.cc.
References distributionVersion().
std::string zypp::Target::distributionFlavor | ( | ) | const |
This is flavor
attribute of the installed base product but does not require the target to be loaded as it remembers the last used one.
It can be empty is the target has never been loaded, as the value is not present in the system but computer from a package provides
Definition at line 126 of file Target.cc.
References _pimpl.
Referenced by distributionFlavor(), and zypp::media::distributionFlavorHeader().
std::string zypp::Target::distributionFlavor | ( | const Pathname & | root_r | ) | [static] |
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 128 of file Target.cc.
References distributionFlavor().
std::string zypp::Target::anonymousUniqueId | ( | ) | const |
anonymous unique id
This id is generated once and stays in the saved in the target. It is unique and is used only for statistics.
Definition at line 131 of file Target.cc.
References _pimpl.
Referenced by zypp::media::anonymousIdHeader(), and anonymousUniqueId().
std::string zypp::Target::anonymousUniqueId | ( | const Pathname & | root_r | ) | [static] |
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 133 of file Target.cc.
References anonymousUniqueId().
std::ostream & zypp::Target::dumpOn | ( | std::ostream & | str | ) | const [private, virtual] |
Stream output.
Reimplemented from zypp::base::ReferenceCounted.
Definition at line 97 of file Target.cc.
References _pimpl.
friend class zypp_detail::ZYppImpl [friend] |
std::ostream & operator<< | ( | std::ostream & | str, | |
const Target & | obj | |||
) | [friend] |
RW_pointer<Impl,rw_pointer::Intrusive<Impl> > zypp::Target::_pimpl [private] |
Pointer to implementation.
Definition at line 205 of file Target.h.
Referenced by anonymousUniqueId(), baseProduct(), buildCache(), cleanCache(), distributionFlavor(), distributionLabel(), distributionVersion(), dumpOn(), load(), providesFile(), root(), rpmDb(), targetDistribution(), targetDistributionRelease(), timestamp(), unload(), and whoOwnsFile().
Target_Ptr zypp::Target::_nullimpl [static, private] |