12 #ifndef ZYPP_TARGET_TARGETIMPL_H 13 #define ZYPP_TARGET_TARGETIMPL_H 18 #include <zypp/base/ReferenceCounted.h> 19 #include <zypp/base/NonCopyable.h> 20 #include <zypp/base/PtrTypes.h> 24 #include <zypp/Pathname.h> 31 #include <zypp/ManagedFile.h> 42 class CommitPackageCache;
75 void createAnonymousId()
const;
80 void createLastDistributionFlavorCache()
const;
104 void load(
bool force =
true );
126 {
return root_r /
"/var/lib/zypp"; }
138 virtual std::ostream &
dumpOn( std::ostream &
str )
const 140 return str <<
"TargetImpl";
148 bool providesFile (
const std::string & path_str,
const std::string & name_str)
const;
194 std::string distributionFlavor()
const;
196 static std::string distributionFlavor(
const Pathname & root_r );
199 std::string anonymousUniqueId()
const;
201 static std::string anonymousUniqueId(
const Pathname & root_r );
256 #endif // ZYPP_TARGET_TARGETIMPL_H ZYppCommitResult commit(ResPool pool_r, const ZYppCommitPolicy &policy_r)
Commit changes in the pool.
VendorAttr _vendorAttr
vendor equivalence settings.
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...
Interface to the rpm program.
Save and restore locale set from file.
bool solvfilesPathIsTemp() const
Whether we're using a temp.
Result returned from ZYpp::commit.
Pathname _tmpSolvfilesPath
SolvIdentFile _autoInstalledFile
user/auto installed database
TargetImpl(const Pathname &root_r="/", bool doRebuild_r=false)
Ctor.
Target::commit helper optimizing package provision.
void updateAutoInstalled()
Update the database of autoinstalled packages.
std::string _distributionVersion
Cache distributionVersion.
void commitFindFileConflicts(const ZYppCommitPolicy &policy_r, ZYppCommitResult &result_r)
Commit helper checking for file conflicts after download.
String related utilities and Regular expression matching.
DEFINE_PTR_TYPE(TargetImpl)
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::...
TraitsType::constPtrType constPtr
void installSrcPackage(const SrcPackage_constPtr &srcPackage_r)
Install a source package on the Target.
std::string targetDistributionFlavor() const
This is register.flavor attribute of the installed base product.
std::string targetDistributionRelease() const
This is register.release attribute of the installed base product.
rpm::RpmDb _rpm
RPM database.
std::string distributionVersion() const
This is version attribute of the installed base product.
const LocaleSet & locales() const
Return the loacale set.
LocaleSet requestedLocales() const
Languages to be supported by the system.
bool empty() const
Test for an empty path.
boost::noncopyable NonCopyable
Ensure derived classes cannot be copied.
Base class for concrete Target implementations.
Pathname _root
Path to the target.
Options and policies for ZYpp::commit.
RequestedLocalesFile _requestedLocalesFile
Requested Locales database.
Definition of vendor equivalence.
std::set< PoolItem > PoolItemSet
set of pool items
Pathname solvfilesPath() const
The solv file location actually in use (default or temp).
virtual std::ostream & dumpOn(std::ostream &str) const
Overload to realize stream output.
std::string targetDistribution() const
This is register.target attribute of the installed base product.
const VendorAttr & vendorAttr() const
The targets current vendor equivalence settings.
static Pathname home(const Pathname &root_r)
std::list< PoolItem > PoolItemList
list of pool items
Base class for reference counted objects.
Pathname home() const
The directory to store things.
HardLocksFile _hardLocksFile
Hard-Locks database.
Save and restore a list of solvable names (ident IdString)
Product::constPtr baseProduct() const
returns the target base installed product, also known as the distribution or platform.
std::string whoOwnsFile(const std::string &file_r) const
Return name of package owning file or empty string if no installed package owns file.
Pathname root() const
The root set for this target.
virtual ~TargetImpl()
Dtor.
Reference counted access to a Tp object calling a custom Dispose function when the last AutoDispose h...
std::ostream & operator<<(std::ostream &str, const TargetImpl &obj)
ManagedFile provideSrcPackage(const SrcPackage_constPtr &srcPackage_r)
Provides a source package on the Target.
Target::DistributionLabel distributionLabel() const
This is shortName and summary attribute of the installed base product.
void commitInSingleTransaction(const ZYppCommitPolicy &policy_r, CommitPackageCache &packageCache_r, ZYppCommitResult &result_r)
Commit ordered changes (internal helper)
Easy-to use interface to the ZYPP dependency resolver.
Pathname defaultSolvfilesPath() const
The systems default solv file location.
Save and restore hardlocks.
std::unordered_set< Locale > LocaleSet
friend std::ostream & operator<<(std::ostream &str, const TargetImpl &obj)
rpm::RpmDb & rpm()
The RPM database.
void load(bool force=true)