19#include <zypp-core/APIConfig.h>
39 const char *val = ::getenv(
"ZYPP_SINGLE_RPMTRANS");
45#if APIConfig(LIBZYPP_CONFIG_USE_CLASSIC_RPMTRANS_BY_DEFAULT)
63 for (
const auto & pi : q.poolItem() ) {
64 if ( pi.status().isToBeInstalled() )
123 {
_pimpl->_restrictToMedia = ( mediaNr_r == 1 ) ? 1 : 0;
return *
this; }
126 {
return _pimpl->_restrictToMedia; }
136 {
_pimpl->_downloadMode = val_r;
return *
this; }
141 DBG <<
_pimpl->_downloadMode <<
" is not compatible with singleTransMode, falling back to " <<
DownloadInAdvance << std::endl;
144 return _pimpl->_downloadMode;
148 {
_pimpl->_rpmInstFlags = newFlags_r;
return *
this; }
157 {
return _pimpl->_rpmInstFlags; }
178 {
_pimpl->_syncPoolAfterCommit = yesNo_r;
return *
this; }
181 {
return _pimpl->_syncPoolAfterCommit; }
186 WAR <<
"Ignore $ZYPP_SINGLE_RPMTRANS=1: Bug 1189788 - UsrMerge: filesystem package breaks system when upgraded in a single rpm transaction" << std::endl;
188 "[bsc#1189788] The filesystem package seems to be unable to perform the pending\n"
189 " UsrMerge reliably in a single transaction. The single_rpmtrans\n"
190 " backend will therefore be IGNORED and the transaction is performed\n"
191 " by the classic_rpmtrans backend."
193 _pimpl->_singleTransMode =
false;
195 return _pimpl->_singleTransMode;
200 str <<
"CommitPolicy(";
207 str <<
" syncPoolAfterCommit";
Interim helper class to collect global options and settings.
Impl * clone() const
clone for RWCOW_pointer
friend Impl * rwcowClone(const Impl *rhs)
bool _syncPoolAfterCommit
DownloadMode _downloadMode
target::rpm::RpmInstFlags _rpmInstFlags
unsigned _restrictToMedia
bool allowDowngrade() const
ZYppCommitPolicy & rpmInstFlags(target::rpm::RpmInstFlags newFlags_r)
The default target::rpm::RpmInstFlags.
bool singleTransModeEnabled() const
ZYppCommitPolicy & syncPoolAfterCommit(bool yesNo_r)
Kepp pool in sync with the Target databases after commit (default: true)
ZYppCommitPolicy & dryRun(bool yesNo_r)
Set dry run (default: false).
ZYppCommitPolicy & restrictToMedia(unsigned mediaNr_r)
Restrict commit to media 1.
DownloadMode downloadMode() const
bool rpmNoSignature() const
target::rpm::RpmInstFlags rpmInstFlags() const
ZYppCommitPolicy & downloadMode(DownloadMode val_r)
Commit download policy to use.
unsigned restrictToMedia() const
bool rpmExcludeDocs() const
bool syncPoolAfterCommit() const
RWCOW_pointer< Impl > _pimpl
Pointer to data.
bool replaceFiles() const
ZYpp::Ptr getZYpp()
Convenience to get the Pointer to the ZYpp instance.
Wrapper class for stat/lstat.
Container of Solvable providing a Capability (read only).
String related utilities and Regular expression matching.
int readlink(const Pathname &symlink_r, Pathname &target_r)
Like 'readlink'.
std::string hexstring(char n, int w=4)
bool strToFalse(const C_Str &str)
Return false if str is 0, false, no, off, never.
Easy-to use interface to the ZYPP dependency resolver.
bool isPreUsrmerge(const Pathname &root_r)
std::ostream & operator<<(std::ostream &str, const SerialNumber &obj)
bool singleTransEnabled()
bool transactionWillUsrmerge()
DownloadMode
Supported commit download policies.
@ DownloadAsNeeded
Alternating download and install.
@ DownloadInAdvance
First download all packages to the local cache.
callback::UserData UserData
typsafe map of userdata
static bool info(const std::string &msg_r, const UserData &userData_r=UserData())
send message text