15 #include <zypp-core/base/String.h> 16 #include <zypp-core/base/StringV.h> 20 #include <zypp-core/base/LogControl.h> 21 #include <zypp-core/TriBool.h> 22 #include <zypp/PathInfo.h> 34 #ifdef SINGLE_RPMTRANS_AS_DEFAULT_FOR_ZYPPER 35 static bool singleTrans =
ImZYPPER();
36 #else // SINGLE_RPMTRANS_AS_DEFAULT_FOR_ZYPPER 37 static bool singleTrans =
ImZYPPER() && ([]()->
bool{
38 const char *val = ::getenv(
"ZYPP_SINGLE_RPMTRANS");
39 bool ret = ( val && std::string_view( val ) ==
"1" );
40 #ifdef NO_SINGLETRANS_USERMERGE 45 WAR <<
"Ignore $ZYPP_SINGLE_RPMTRANS=1: Bug 1189788 - UsrMerge: filesystem package breaks system when upgraded in a single rpm transaction" << std::endl;
47 "[boo#1189788] Tumbleweeds filesystem package seems to be unable to perform the\n" 48 " UsrMerge reliably in a single transaction. The requested\n" 49 " $ZYPP_SINGLE_RPMTRANS=1 will therefore be IGNORED because\n" 50 " the UsrMerge did not yet happen on this system." 57 "[TechPreview] $ZYPP_SINGLE_RPMTRANS=1 : New rpm install backend is enabled\n" 58 " If you find any bugs or issues please let us know:\n" 59 " https://bugzilla.opensuse.org/\n" 60 " Component: libzypp (or zypper)\n" 61 " And please attach the /var/log/zypper.log to the bug report." 66 #endif // SINGLE_RPMTRANS_AS_DEFAULT_FOR_ZYPPER 95 friend Impl * rwcowClone<Impl>(
const Impl * rhs );
127 DBG << val_r <<
" is not compatible with singleTransMode, falling back to " <<
DownloadInAdvance << std::endl;
183 str <<
"CommitPolicy(";
190 str <<
" syncPoolAfterCommit";
DownloadMode downloadMode() const
Alternating download and install.
First download all packages to the local cache.
int readlink(const Pathname &symlink_r, Pathname &target_r)
Like 'readlink'.
bool _syncPoolAfterCommit
ZYppCommitPolicy & rpmInstFlags(target::rpm::RpmInstFlags newFlags_r)
The default target::rpm::RpmInstFlags.
bool allowDowngrade() const
ZYppCommitPolicy & dryRun(bool yesNo_r)
Set dry run (default: false).
String related utilities and Regular expression matching.
std::ostream & operator<<(std::ostream &str, const SerialNumber &obj)
bool rpmExcludeDocs() const
target::rpm::RpmInstFlags rpmInstFlags() const
DownloadMode _downloadMode
Options and policies for ZYpp::commit.
ZYppCommitPolicy & downloadMode(DownloadMode val_r)
Commit download policy to use.
Interim helper class to collect global options and settings.
bool rpmNoSignature() const
unsigned _restrictToMedia
ZYppCommitPolicy & syncPoolAfterCommit(bool yesNo_r)
Kepp pool in sync with the Target databases after commit (default: true)
ZYppCommitPolicy & restrictToMedia(unsigned mediaNr_r)
Restrict commit to media 1.
Impl * clone() const
clone for RWCOW_pointer
bool replaceFiles() const
RWCOW_pointer< Impl > _pimpl
Pointer to data.
Typesafe passing of user data via callbacks.
Wrapper class for ::stat/::lstat.
bool singleTransModeEnabled() const
static bool info(const std::string &msg_r, const UserData &userData_r=UserData())
send message text
bool syncPoolAfterCommit() const
target::rpm::RpmInstFlags _rpmInstFlags
Easy-to use interface to the ZYPP dependency resolver.
std::string hexstring(char n, int w=4)
unsigned restrictToMedia() const
DownloadMode
Supported commit download policies.