14 #include <zypp/TmpPath.h> 15 #include <zypp/base/Logger.h> 16 #include <zypp/base/String.h> 40 static weak_ptr<callback::TempConnect<media::MediaChangeReport> > globalguard;
41 if ( condition_r && ! (
_guard = globalguard.lock()) )
72 MIL <<
"Initializing keyring..." << std::endl;
125 resolver()->setDefaultSolverFlags(
false );
130 MIL <<
"initTarget( " << root << (doRebuild_r?
", rebuilddb":
"") <<
")" << endl;
133 MIL <<
"Repeated call to initializeTarget()" << endl;
157 if ( getenv(
"ZYPP_TESTSUITE_FAKE_ARCH") )
162 MIL <<
"Attempt to commit (" << policy_r <<
")" << endl;
189 MIL <<
"Commit (" << policy_r <<
") returned: " 198 _target->_pimpl->installSrcPackage( srcPackage_r );
205 return _target->_pimpl->provideSrcPackage( srcPackage_r );
227 return str <<
"ZYppImpl";
237 return _tmpdir.
path();
Target_Ptr target() const
std::ostream & about(std::ostream &str) const
Print some detail about the current libzypp version.
void setHomePath(const Pathname &path)
set the home, if you need to change it
#define ZYPP_THROW(EXCPT)
Drops a logline and throws the Exception.
Result returned from ZYpp::commit.
static ZConfig & instance()
Singleton ctor.
ZYppCommitPolicy & dryRun(bool yesNo_r)
Set dry run (default: false).
String related utilities and Regular expression matching.
static const Pathname & defaultLocation()
DiskUsageCounter::MountPointSet diskUsage()
Resolver_Ptr resolver() const
DiskUsageCounter::MountPointSet getPartitions() const
void initializeTarget(const Pathname &root, bool doRebuild_r)
Temporarily connect a ReceiveReport then restore the previous one.
Temporarily set/unset an environment variable.
void changeTargetTo(Target_Ptr newtarget_r)
Hook for actions to trigger if the Target changes (initialize/finish)
std::set< MountPoint > MountPointSet
shared_ptr< DiskUsageCounter > _disk_usage
defined mount points, used for disk usage counting
ZYppCommitResult commit(const ZYppCommitPolicy &policy_r)
Commit changes and transactions.
bool empty() const
Test for an empty path.
static Pool instance()
Singleton ctor.
Dependency resolver interface.
Provide a new empty temporary directory and recursively delete it when no longer needed.
static const std::string & systemRepoAlias()
Reserved system repository alias .
Options and policies for ZYpp::commit.
Pathname tmpPath() const
Get the path where zypp related plugins store tmp data.
void installSrcPackage(const SrcPackage_constPtr &srcPackage_r)
Install a source package on the Target.
Pathname homePath() const
Get the path where zypp related plugins store persistent data and caches.
Pathname myTmpDir()
Global access to the zypp.TMPDIR (created on demand, deleted when libzypp is unloaded) ...
ZYppCommitPolicy & syncPoolAfterCommit(bool yesNo_r)
Kepp pool in sync with the Target databases after commit (default: true)
std::string numstring(char n, int w=0)
std::ostream & operator<<(std::ostream &str, const ZYppImpl &obj)
Base class for Exception.
Compute disk space occupied by packages across partitions/directories.
Reference counted access to a Tp object calling a custom Dispose function when the last AutoDispose h...
static callback::SendReport< JobReport > & instance()
Singleton sender instance.
Easy-to use interface to the ZYPP dependency resolver.
void setPartitions(const DiskUsageCounter::MountPointSet &mp)
void notifyTargetChanged()
internal
ManagedFile provideSrcPackage(const SrcPackage_constPtr &srcPackage_r)
Install a source package on the Target.
static MountPointSet detectMountPoints(const std::string &rootdir="/")
Get mountpoints of system below rootdir If we happen to detect snapshotting btrfs partitions...