|
libzypp 17.38.7
|
Base class for concrete Target implementations. More...
#include <zypp/target/TargetImpl.h>

Public Types | |
| using | PoolItemList = std::list<PoolItem> |
| list of pool items | |
| using | PoolItemSet = std::set<PoolItem> |
| set of pool items | |
Public Member Functions | |
| TargetImpl (const Pathname &root_r="/", bool doRebuild_r=false) | |
| Ctor. | |
| ~TargetImpl () override | |
| Dtor. | |
| void | createAnonymousId () const |
| generates the unique anonymous id which is called when creating the target | |
| void | createLastDistributionFlavorCache () const |
| generates a cache of the last product flavor | |
| Public Member Functions inherited from zypp::base::ReferenceCounted | |
| ReferenceCounted () | |
| Default ctor. | |
| ReferenceCounted (const ReferenceCounted &rhs) | |
| Copy ctor. | |
| virtual | ~ReferenceCounted () |
| Dtor. | |
| ReferenceCounted & | operator= (const ReferenceCounted &) |
| Assignment. | |
| unsigned | refCount () const |
| Return reference counter value. | |
| void | ref () const |
| Add a reference. | |
| void | unref () const |
| Release a reference. | |
Friends | |
| std::ostream & | operator<< (std::ostream &str, const TargetImpl &obj) |
| relates: TargetImpl Stream output | |
Solv file handling. | |
If target solv file is outdated, but (non-root-)user has no permission to create it at the default location, we use a temporary one. | |
| Pathname | _tmpSolvfilesPath |
| Pathname | _root |
| Path to the target. | |
| rpm::RpmDb | _rpm |
| RPM database. | |
| RequestedLocalesFile | _requestedLocalesFile |
| Requested Locales database. | |
| SolvIdentFile | _autoInstalledFile |
| user/auto installed database | |
| HardLocksFile | _hardLocksFile |
| Hard-Locks database. | |
| WatchFile | _baseproductWatcher |
| Cache distributionVersion. | |
| std::string | _distributionVersion |
| VendorAttr | _vendorAttr |
| vendor equivalence settings. | |
| void | load (bool force=true) |
| void | unload () |
| void | reload () |
| void | clearCache () |
| bool | buildCache () |
| Pathname | root () const |
| The root set for this target. | |
| Pathname | home () const |
| The directory to store things. | |
| ZYppCommitResult | commit (ResPool pool_r, const ZYppCommitPolicy &policy_r) |
| Commit changes in the pool. | |
| void | installSrcPackage (const SrcPackage_constPtr &srcPackage_r) |
| Install a source package on the Target. | |
| ManagedFile | provideSrcPackage (const SrcPackage_constPtr &srcPackage_r) |
| Provides a source package on the Target. | |
| std::ostream & | dumpOn (std::ostream &str) const override |
| Overload to realize stream output. | |
| rpm::RpmDb & | rpm () |
| The RPM database. | |
| bool | providesFile (const std::string &path_str, const std::string &name_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. | |
| Product::constPtr | baseProduct () const |
| returns the target base installed product, also known as the distribution or platform. | |
| LocaleSet | requestedLocales () const |
| Languages to be supported by the system. | |
| void | updateAutoInstalled () |
| Update the database of autoinstalled packages. | |
| 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. | |
| std::string | targetDistributionFlavor () const |
This is register.flavor attribute of the installed base product. | |
| Target::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 | |
| const VendorAttr & | vendorAttr () const |
| The targets current vendor equivalence settings. | |
| void | vendorAttr (VendorAttr vendorAttr_r) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| Pathname | defaultSolvfilesPath () const |
| The systems default solv file location. | |
| Pathname | solvfilesPath () const |
| The solv file location actually in use (default or temp). | |
| bool | solvfilesPathIsTemp () const |
| Whether we're using a temp. | |
| void | commit (const ZYppCommitPolicy &policy_r, CommitPackageCache &packageCache_r, ZYppCommitResult &result_r) |
| Commit ordered changes (internal helper). | |
| void | commitInSingleTransaction (const ZYppCommitPolicy &policy_r, CommitPackageCache &packageCache_r, ZYppCommitResult &result_r) |
| Commit ordered changes (internal helper). | |
| void | commitFindFileConflicts (const ZYppCommitPolicy &policy_r, ZYppCommitResult &result_r) |
| Commit helper checking for file conflicts after download. | |
| static Pathname | home (const Pathname &root_r) |
| static LocaleSet | requestedLocales (const Pathname &root_r) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| static std::string | targetDistribution (const Pathname &root_r) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| static std::string | targetDistributionRelease (const Pathname &root_r) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| static std::string | targetDistributionFlavor (const Pathname &root_r) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| static Target::DistributionLabel | distributionLabel (const Pathname &root_r) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| static std::string | distributionVersion (const Pathname &root_r) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| static std::string | distributionFlavor (const Pathname &root_r) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| static std::string | anonymousUniqueId (const Pathname &root_r) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
Additional Inherited Members | |
| Static Public Member Functions inherited from zypp::base::ReferenceCounted | |
| static void | add_ref (const ReferenceCounted *ptr_r) |
| Called by zypp::intrusive_ptr to add a reference. | |
| static void | release (const ReferenceCounted *ptr_r) |
| Called by zypp::intrusive_ptr to add a reference. | |
| Protected Member Functions inherited from zypp::base::ReferenceCounted | |
| virtual void | ref_to (unsigned) const |
| Trigger derived classes after refCount was increased. | |
| virtual void | unref_to (unsigned) const |
| Trigger derived classes after refCount was decreased. | |
Base class for concrete Target implementations.
Constructed by TargetFactory. Public access via Target interface.
Definition at line 54 of file TargetImpl.h.
| using zypp::target::TargetImpl::PoolItemList = std::list<PoolItem> |
list of pool items
Definition at line 60 of file TargetImpl.h.
| using zypp::target::TargetImpl::PoolItemSet = std::set<PoolItem> |
set of pool items
Definition at line 63 of file TargetImpl.h.
Ctor.
Definition at line 962 of file TargetImpl.cc.
|
override |
Dtor.
Definition at line 1091 of file TargetImpl.cc.
| void zypp::target::TargetImpl::createAnonymousId | ( | ) | const |
generates the unique anonymous id which is called when creating the target
Definition at line 1033 of file TargetImpl.cc.
| void zypp::target::TargetImpl::createLastDistributionFlavorCache | ( | ) | const |
generates a cache of the last product flavor
Definition at line 1055 of file TargetImpl.cc.
|
private |
The systems default solv file location.
Definition at line 1104 of file TargetImpl.cc.
|
inlineprivate |
The solv file location actually in use (default or temp).
Definition at line 93 of file TargetImpl.h.
|
inlineprivate |
| void zypp::target::TargetImpl::load | ( | bool | force = true | ) |
Definition at line 1276 of file TargetImpl.cc.
| void zypp::target::TargetImpl::unload | ( | ) |
Definition at line 1269 of file TargetImpl.cc.
| void zypp::target::TargetImpl::reload | ( | ) |
Definition at line 1264 of file TargetImpl.cc.
| void zypp::target::TargetImpl::clearCache | ( | ) |
Definition at line 1109 of file TargetImpl.cc.
| bool zypp::target::TargetImpl::buildCache | ( | ) |
Definition at line 1115 of file TargetImpl.cc.
|
inline |
The root set for this target.
Definition at line 117 of file TargetImpl.h.
|
inline |
The directory to store things.
Definition at line 121 of file TargetImpl.h.
Definition at line 124 of file TargetImpl.h.
| ZYppCommitResult zypp::target::TargetImpl::commit | ( | ResPool | pool_r, |
| const ZYppCommitPolicy & | policy_r ) |
Commit changes in the pool.
Definition at line 1412 of file TargetImpl.cc.
| void zypp::target::TargetImpl::installSrcPackage | ( | const SrcPackage_constPtr & | srcPackage_r | ) |
Install a source package on the Target.
Definition at line 3172 of file TargetImpl.cc.
| ManagedFile zypp::target::TargetImpl::provideSrcPackage | ( | const SrcPackage_constPtr & | srcPackage_r | ) |
Provides a source package on the Target.
Definition at line 3183 of file TargetImpl.cc.
|
inlineoverridevirtual |
Overload to realize stream output.
Reimplemented from zypp::base::ReferenceCounted.
Definition at line 137 of file TargetImpl.h.
| rpm::RpmDb & zypp::target::TargetImpl::rpm | ( | ) |
The RPM database.
Definition at line 2954 of file TargetImpl.cc.
| bool zypp::target::TargetImpl::providesFile | ( | const std::string & | path_str, |
| const std::string & | name_str ) const |
If the package is installed and provides the file Needed to evaluate split provides during Resolver::Upgrade().
Definition at line 2959 of file TargetImpl.cc.
|
inline |
Return name of package owning path_str or empty string if no installed package owns path_str.
Definition at line 149 of file TargetImpl.h.
| Product::constPtr zypp::target::TargetImpl::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.
if you require some base product attributes when the target is not loaded into the pool, see targetDistribution , targetDistributionRelease and distributionVersion that obtain the data on demand from the installed product information.
Definition at line 3033 of file TargetImpl.cc.
|
inline |
Languages to be supported by the system.
E.g. language specific packages to be installed.
Definition at line 156 of file TargetImpl.h.
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 3045 of file TargetImpl.cc.
| void zypp::target::TargetImpl::updateAutoInstalled | ( | ) |
Update the database of autoinstalled packages.
This is done on commit, so you usually don't need to call this explicitly.
Definition at line 3054 of file TargetImpl.cc.
| std::string zypp::target::TargetImpl::targetDistribution | ( | ) | const |
This is register.target attribute of the installed base product.
Used for registration and Service refresh.
Definition at line 3063 of file TargetImpl.cc.
|
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 3066 of file TargetImpl.cc.
| std::string zypp::target::TargetImpl::targetDistributionRelease | ( | ) | const |
This is register.release attribute of the installed base product.
Used for registration.
Definition at line 3069 of file TargetImpl.cc.
|
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 3072 of file TargetImpl.cc.
| std::string zypp::target::TargetImpl::targetDistributionFlavor | ( | ) | const |
This is register.flavor attribute of the installed base product.
Used for registration.
Definition at line 3075 of file TargetImpl.cc.
|
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 3078 of file TargetImpl.cc.
| Target::DistributionLabel zypp::target::TargetImpl::distributionLabel | ( | ) | const |
This is shortName and summary attribute of the installed base product.
Used e.g. for the bootloader menu.
Definition at line 3081 of file TargetImpl.cc.
|
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 3090 of file TargetImpl.cc.
| std::string zypp::target::TargetImpl::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 3099 of file TargetImpl.cc.
|
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 3109 of file TargetImpl.cc.
| std::string zypp::target::TargetImpl::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 3127 of file TargetImpl.cc.
|
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 3132 of file TargetImpl.cc.
| std::string zypp::target::TargetImpl::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 3153 of file TargetImpl.cc.
|
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 3158 of file TargetImpl.cc.
|
inline |
The targets current vendor equivalence settings.
Initialized from the targets /etc/zypp/vendors.d.
Definition at line 200 of file TargetImpl.h.
| void zypp::target::TargetImpl::vendorAttr | ( | VendorAttr | vendorAttr_r | ) |
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 3165 of file TargetImpl.cc.
|
private |
Commit ordered changes (internal helper).
Definition at line 1732 of file TargetImpl.cc.
|
private |
Commit ordered changes (internal helper).
Definition at line 2079 of file TargetImpl.cc.
|
private |
Commit helper checking for file conflicts after download.
Definition at line 122 of file TargetImpl.commitFindFileConflicts.cc.
|
friend |
relates: TargetImpl Stream output
Definition at line 241 of file TargetImpl.h.
|
private |
Definition at line 100 of file TargetImpl.h.
|
protected |
Path to the target.
Definition at line 223 of file TargetImpl.h.
|
protected |
RPM database.
Definition at line 225 of file TargetImpl.h.
|
protected |
Requested Locales database.
Definition at line 227 of file TargetImpl.h.
|
protected |
user/auto installed database
Definition at line 229 of file TargetImpl.h.
|
protected |
Hard-Locks database.
Definition at line 231 of file TargetImpl.h.
|
mutableprotected |
Cache distributionVersion.
Definition at line 233 of file TargetImpl.h.
|
mutableprotected |
Definition at line 234 of file TargetImpl.h.
|
protected |
vendor equivalence settings.
Definition at line 236 of file TargetImpl.h.