Go to the documentation of this file.
15 #include <sys/utsname.h>
16 #if __GLIBC_PREREQ (2,16)
20 #include <solv/solvversion.h>
42 #undef ZYPP_BASE_LOGGER_LOGGROUP
43 #define ZYPP_BASE_LOGGER_LOGGROUP "zconfig"
63 Arch _autodetectSystemArchitecture()
66 if ( ::uname( &buf ) < 0 )
68 ERR <<
"Can't determine system architecture" << endl;
72 Arch architecture( buf.machine );
73 MIL <<
"Uname architecture is '" << buf.machine <<
"'" << endl;
75 if ( architecture == Arch_i686 )
80 std::ifstream cpuinfo(
"/proc/cpuinfo" );
83 for( iostr::EachLine in( cpuinfo ); in; in.next() )
87 if ( in->find(
"cx8" ) == std::string::npos
88 || in->find(
"cmov" ) == std::string::npos )
90 architecture = Arch_i586;
91 WAR <<
"CPU lacks 'cx8' or 'cmov': architecture downgraded to '" << architecture <<
"'" << endl;
99 ERR <<
"Cant open " <<
PathInfo(
"/proc/cpuinfo") << endl;
102 else if ( architecture == Arch_sparc || architecture == Arch_sparc64 )
105 std::ifstream cpuinfo(
"/proc/cpuinfo" );
108 for( iostr::EachLine in( cpuinfo ); in; in.next() )
112 if ( in->find(
"sun4v" ) != std::string::npos )
114 architecture = ( architecture == Arch_sparc64 ? Arch_sparc64v : Arch_sparcv9v );
115 WAR <<
"CPU has 'sun4v': architecture upgraded to '" << architecture <<
"'" << endl;
117 else if ( in->find(
"sun4u" ) != std::string::npos )
119 architecture = ( architecture == Arch_sparc64 ? Arch_sparc64 : Arch_sparcv9 );
120 WAR <<
"CPU has 'sun4u': architecture upgraded to '" << architecture <<
"'" << endl;
122 else if ( in->find(
"sun4m" ) != std::string::npos )
124 architecture = Arch_sparcv8;
125 WAR <<
"CPU has 'sun4m': architecture upgraded to '" << architecture <<
"'" << endl;
133 ERR <<
"Cant open " <<
PathInfo(
"/proc/cpuinfo") << endl;
136 else if ( architecture == Arch_armv7l || architecture == Arch_armv6l )
138 std::ifstream platform(
"/etc/rpm/platform" );
141 for( iostr::EachLine in( platform ); in; in.next() )
145 architecture = Arch_armv7hl;
146 WAR <<
"/etc/rpm/platform contains armv7hl-: architecture upgraded to '" << architecture <<
"'" << endl;
151 architecture = Arch_armv6hl;
152 WAR <<
"/etc/rpm/platform contains armv6hl-: architecture upgraded to '" << architecture <<
"'" << endl;
158 #if __GLIBC_PREREQ (2,16)
159 else if ( architecture == Arch_ppc64 )
161 const char * platform = (
const char *)getauxval( AT_PLATFORM );
163 if ( platform && sscanf( platform,
"power%d", &powerlvl ) == 1 && powerlvl > 6 )
164 architecture = Arch_ppc64p7;
187 Locale _autodetectTextLocale()
189 Locale ret( Locale::enCode );
190 const char * envlist[] = {
"LC_ALL",
"LC_MESSAGES",
"LANG", NULL };
191 for (
const char ** envvar = envlist; *envvar; ++envvar )
193 const char * envlang = getenv( *envvar );
196 std::string envstr( envlang );
197 if ( envstr !=
"POSIX" && envstr !=
"C" )
199 Locale lang( envstr );
202 MIL <<
"Found " << *envvar <<
"=" << envstr << endl;
209 MIL <<
"Default text locale is '" << ret <<
"'" << endl;
210 #warning HACK AROUND BOOST_TEST_CATCH_SYSTEM_ERRORS
211 setenv(
"BOOST_TEST_CATCH_SYSTEM_ERRORS",
"no", 1 );
216 inline Pathname _autodetectSystemRoot()
219 return target ? target->root() :
Pathname();
222 inline Pathname _autodetectZyppConfPath()
224 const char *env_confpath = getenv(
"ZYPP_CONF" );
225 return env_confpath ? env_confpath :
"/etc/zypp/zypp.conf";
271 :
Option<Tp>( initial_r ), _default( initial_r )
276 { this->set( _default.get() ); }
280 { setDefault( newval_r ); restoreToDefault(); }
284 {
return _default.get(); }
288 { _default.set( newval_r ); }
309 : _parsedZyppConf ( override_r )
310 , cfg_arch ( defaultSystemArchitecture() )
311 , cfg_textLocale ( defaultTextLocale() )
312 , updateMessagesNotify (
"" )
313 , repo_add_probe ( false )
314 , repo_refresh_delay ( 10 )
315 , repoLabelIsAlias ( false )
316 , download_use_deltarpm ( true )
317 , download_use_deltarpm_always ( false )
318 , download_media_prefer_download( true )
319 , download_mediaMountdir (
"/var/adm/mount" )
320 , download_max_concurrent_connections( 5 )
321 , download_min_download_speed ( 0 )
322 , download_max_download_speed ( 0 )
323 , download_max_silent_tries ( 5 )
324 , download_transfer_timeout ( 180 )
327 , repoGpgCheck ( indeterminate )
328 , pkgGpgCheck ( indeterminate )
329 , solver_onlyRequires ( false )
330 , solver_allowVendorChange ( false )
331 , solver_dupAllowDowngrade ( true )
332 , solver_dupAllowNameChange ( true )
333 , solver_dupAllowArchChange ( true )
334 , solver_dupAllowVendorChange ( true )
335 , solver_cleandepsOnRemove ( false )
336 , solver_upgradeTestcasesToKeep ( 2 )
337 , solverUpgradeRemoveDroppedPackages( true )
338 , apply_locks_file ( true )
339 , pluginsPath (
"/usr/lib/zypp/plugins" )
341 MIL <<
"libzypp: " << VERSION << endl;
344 if ( _parsedZyppConf.empty() )
346 _parsedZyppConf = _autodetectZyppConfPath();
352 INT <<
"Reconfigure to " << _parsedZyppConf << endl;
353 ZConfig::instance()._pimpl.reset(
this );
355 if (
PathInfo(_parsedZyppConf).isExist() )
362 string section(*sit);
368 string entry(it->first);
369 string value(it->second);
371 if ( section ==
"main" )
373 if ( entry ==
"arch" )
376 if ( carch != cfg_arch )
378 WAR <<
"Overriding system architecture (" << cfg_arch <<
"): " << carch << endl;
382 else if ( entry ==
"cachedir" )
386 else if ( entry ==
"metadatadir" )
388 cfg_metadata_path =
Pathname(value);
390 else if ( entry ==
"solvfilesdir" )
392 cfg_solvfiles_path =
Pathname(value);
394 else if ( entry ==
"packagesdir" )
396 cfg_packages_path =
Pathname(value);
398 else if ( entry ==
"configdir" )
402 else if ( entry ==
"reposdir" )
404 cfg_known_repos_path =
Pathname(value);
406 else if ( entry ==
"servicesdir" )
408 cfg_known_services_path =
Pathname(value);
410 else if ( entry ==
"varsdir" )
414 else if ( entry ==
"repo.add.probe" )
418 else if ( entry ==
"repo.refresh.delay" )
422 else if ( entry ==
"repo.refresh.locales" )
424 std::vector<std::string> tmp;
425 str::split( value, back_inserter( tmp ),
", \t" );
427 boost::function<
Locale(
const std::string &)> transform(
428 [](
const std::string & str_r)->
Locale{
return Locale(str_r); }
430 repoRefreshLocales.insert( make_transform_iterator( tmp.begin(), transform ),
431 make_transform_iterator( tmp.end(), transform ) );
433 else if ( entry ==
"download.use_deltarpm" )
435 download_use_deltarpm =
str::strToBool( value, download_use_deltarpm );
437 else if ( entry ==
"download.use_deltarpm.always" )
439 download_use_deltarpm_always =
str::strToBool( value, download_use_deltarpm_always );
441 else if ( entry ==
"download.media_preference" )
443 download_media_prefer_download.restoreToDefault(
str::compareCI( value,
"volatile" ) != 0 );
446 else if ( entry ==
"download.media_mountdir" )
448 download_mediaMountdir.restoreToDefault(
Pathname(value) );
451 else if ( entry ==
"download.max_concurrent_connections" )
455 else if ( entry ==
"download.min_download_speed" )
459 else if ( entry ==
"download.max_download_speed" )
463 else if ( entry ==
"download.max_silent_tries" )
467 else if ( entry ==
"download.transfer_timeout" )
470 if ( download_transfer_timeout < 0 ) download_transfer_timeout = 0;
471 else if ( download_transfer_timeout > 3600 ) download_transfer_timeout = 3600;
473 else if ( entry ==
"commit.downloadMode" )
475 commit_downloadMode.set( deserializeDownloadMode( value ) );
477 else if ( entry ==
"gpgcheck" )
481 else if ( entry ==
"repo_gpgcheck" )
485 else if ( entry ==
"pkg_gpgcheck" )
489 else if ( entry ==
"vendordir" )
493 else if ( entry ==
"multiversiondir" )
495 cfg_multiversion_path =
Pathname(value);
497 else if ( entry ==
"solver.onlyRequires" )
499 solver_onlyRequires.set(
str::strToBool( value, solver_onlyRequires ) );
501 else if ( entry ==
"solver.allowVendorChange" )
503 solver_allowVendorChange.set(
str::strToBool( value, solver_allowVendorChange ) );
505 else if ( entry ==
"solver.dupAllowDowngrade" )
507 solver_dupAllowDowngrade.set(
str::strToBool( value, solver_dupAllowDowngrade ) );
509 else if ( entry ==
"solver.dupAllowNameChange" )
511 solver_dupAllowNameChange.set(
str::strToBool( value, solver_dupAllowNameChange ) );
513 else if ( entry ==
"solver.dupAllowArchChange" )
515 solver_dupAllowArchChange.set(
str::strToBool( value, solver_dupAllowArchChange ) );
517 else if ( entry ==
"solver.dupAllowVendorChange" )
519 solver_dupAllowVendorChange.set(
str::strToBool( value, solver_dupAllowVendorChange ) );
521 else if ( entry ==
"solver.cleandepsOnRemove" )
523 solver_cleandepsOnRemove.set(
str::strToBool( value, solver_cleandepsOnRemove ) );
525 else if ( entry ==
"solver.upgradeTestcasesToKeep" )
527 solver_upgradeTestcasesToKeep.set( str::strtonum<unsigned>( value ) );
529 else if ( entry ==
"solver.upgradeRemoveDroppedPackages" )
531 solverUpgradeRemoveDroppedPackages.restoreToDefault(
str::strToBool( value, solverUpgradeRemoveDroppedPackages.getDefault() ) );
533 else if ( entry ==
"solver.checkSystemFile" )
535 solver_checkSystemFile =
Pathname(value);
537 else if ( entry ==
"solver.checkSystemFileDir" )
539 solver_checkSystemFileDir =
Pathname(value);
541 else if ( entry ==
"multiversion" )
546 else if ( entry ==
"locksfile.path" )
550 else if ( entry ==
"locksfile.apply" )
554 else if ( entry ==
"update.datadir" )
558 else if ( entry ==
"update.scriptsdir" )
560 update_scripts_path =
Pathname(value);
562 else if ( entry ==
"update.messagessdir" )
564 update_messages_path =
Pathname(value);
566 else if ( entry ==
"update.messages.notify" )
568 updateMessagesNotify.set( value );
570 else if ( entry ==
"rpm.install.excludedocs" )
575 else if ( entry ==
"history.logfile" )
579 else if ( entry ==
"credentials.global.dir" )
581 credentials_global_dir_path =
Pathname(value);
583 else if ( entry ==
"credentials.global.file" )
585 credentials_global_file_path =
Pathname(value);
595 MIL << _parsedZyppConf <<
" not found, using defaults instead." << endl;
596 _parsedZyppConf = _parsedZyppConf.extend(
" (NOT FOUND)" );
600 if ( getenv(
"ZYPP_TESTSUITE_FAKE_ARCH" ) )
602 Arch carch( getenv(
"ZYPP_TESTSUITE_FAKE_ARCH" ) );
603 if ( carch != cfg_arch )
605 WAR <<
"ZYPP_TESTSUITE_FAKE_ARCH: Overriding system architecture (" << cfg_arch <<
"): " << carch << endl;
609 MIL <<
"ZConfig singleton created." << endl;
700 typedef std::map<Pathname,MultiversionSpec>
SpecMap;
708 if ( root_r.
empty() )
710 bool cacheHit = _specMap.count( root_r );
718 scanConfAt( root_r, ret, zConfImpl_r );
719 scanDirAt( root_r, ret, zConfImpl_r );
720 using zypp::operator<<;
721 MIL <<
"MultiversionSpec '" << root_r <<
"' = " << ret << endl;
732 static const str::regex rx(
"^multiversion *= *(.*)" );
735 [&](
int num_r, std::string line_r )->
bool
750 if ( multiversionDir.
empty() )
756 [&spec_r](
const Pathname & dir_r,
const char *
const & name_r )->
bool
758 MIL <<
"Parsing " << dir_r/name_r << endl;
760 [&spec_r](
int num_r, std::string line_r )->
bool
762 DBG <<
" found " << line_r << endl;
763 spec_r.insert( std::move(line_r) );
775 {
return _multiversionMap.getSpec( _autodetectSystemRoot(), *
this ); }
794 ZConfig & ZConfig::instance()
796 static ZConfig _instance;
820 {
return _autodetectSystemRoot(); }
825 return (
_pimpl->cfg_repo_mgr_root_path.empty()
830 {
_pimpl->cfg_repo_mgr_root_path = root; }
840 static Arch _val( _autodetectSystemArchitecture() );
845 {
return _pimpl->cfg_arch; }
849 if ( arch_r !=
_pimpl->cfg_arch )
851 WAR <<
"Overriding system architecture (" <<
_pimpl->cfg_arch <<
"): " << arch_r << endl;
852 _pimpl->cfg_arch = arch_r;
864 static Locale _val( _autodetectTextLocale() );
869 {
return _pimpl->cfg_textLocale; }
873 if ( locale_r !=
_pimpl->cfg_textLocale )
875 WAR <<
"Overriding text locale (" <<
_pimpl->cfg_textLocale <<
"): " << locale_r << endl;
876 _pimpl->cfg_textLocale = locale_r;
877 #warning prefer signal
887 {
return !
_pimpl->userData.empty(); }
890 {
return _pimpl->userData; }
894 for_( ch, str_r.begin(), str_r.end() )
896 if ( *ch <
' ' && *ch !=
'\t' )
898 ERR <<
"New user data string rejectded: char " << (int)*ch <<
" at position " << (ch - str_r.begin()) << endl;
902 MIL <<
"Set user data string to '" << str_r <<
"'" << endl;
911 return (
_pimpl->cfg_cache_path.empty()
917 return (
_pimpl->cfg_cache_path.empty()
918 ?
Pathname(
"/var/cache/zypp/pubkeys") :
_pimpl->cfg_cache_path/
"pubkeys" );
923 _pimpl->cfg_cache_path = path_r;
928 return (
_pimpl->cfg_metadata_path.empty()
934 _pimpl->cfg_metadata_path = path_r;
939 return (
_pimpl->cfg_solvfiles_path.empty()
945 _pimpl->cfg_solvfiles_path = path_r;
950 return (
_pimpl->cfg_packages_path.empty()
956 _pimpl->cfg_packages_path = path_r;
963 return (
_pimpl->cfg_config_path.empty()
969 return (
_pimpl->cfg_known_repos_path.empty()
975 return (
_pimpl->cfg_known_services_path.empty()
981 return (
_pimpl->cfg_vars_path.empty()
987 return (
_pimpl->cfg_vendor_path.empty()
993 return (
_pimpl->locks_file.empty()
1000 {
return _pimpl->repo_add_probe; }
1003 {
return _pimpl->repo_refresh_delay; }
1009 {
return _pimpl->repoLabelIsAlias; }
1012 {
_pimpl->repoLabelIsAlias = yesno_r; }
1015 {
return _pimpl->download_use_deltarpm; }
1021 {
return _pimpl->download_media_prefer_download; }
1024 {
_pimpl->download_media_prefer_download.set( yesno_r ); }
1027 {
_pimpl->download_media_prefer_download.restoreToDefault(); }
1030 {
return _pimpl->download_max_concurrent_connections; }
1033 {
return _pimpl->download_min_download_speed; }
1036 {
return _pimpl->download_max_download_speed; }
1039 {
return _pimpl->download_max_silent_tries; }
1042 {
return _pimpl->download_transfer_timeout; }
1049 {
return _pimpl->commit_downloadMode; }
1066 {
return _pimpl->solver_onlyRequires; }
1069 {
return _pimpl->solver_allowVendorChange; }
1077 {
return _pimpl->solver_cleandepsOnRemove; }
1080 {
return (
_pimpl->solver_checkSystemFile.empty()
1084 {
return (
_pimpl->solver_checkSystemFileDir.empty()
1088 {
return _pimpl->solver_upgradeTestcasesToKeep; }
1096 inline void sigMultiversionSpecChanged()
1109 {
return _pimpl->apply_locks_file; }
1113 return (
_pimpl->update_data_path.empty()
1119 return (
_pimpl->update_messages_path.empty()
1125 return (
_pimpl->update_scripts_path.empty()
1130 {
return _pimpl->updateMessagesNotify; }
1133 {
_pimpl->updateMessagesNotify.set( val_r ); }
1136 {
_pimpl->updateMessagesNotify.restoreToDefault(); }
1141 {
return _pimpl->rpmInstallFlags; }
1146 return (
_pimpl->history_log_path.empty() ?
1152 return (
_pimpl->credentials_global_dir_path.empty() ?
1153 Pathname(
"/etc/zypp/credentials.d") :
_pimpl->credentials_global_dir_path );
1158 return (
_pimpl->credentials_global_file_path.empty() ?
1159 Pathname(
"/etc/zypp/credentials.cat") :
_pimpl->credentials_global_file_path );
1165 {
return "system-release"; }
1170 {
return _pimpl->pluginsPath.get(); }
1176 str <<
"libzypp: " << VERSION << endl;
1178 str <<
"libsolv: " << solv_version;
1179 if ( ::strcmp( solv_version, LIBSOLV_VERSION_STRING ) )
1180 str <<
" (built against " << LIBSOLV_VERSION_STRING <<
")";
1183 str <<
"zypp.conf: '" <<
_pimpl->_parsedZyppConf <<
"'" << endl;
static Pool instance()
Singleton ctor.
Pathname cfg_solvfiles_path
Option< bool > solver_dupAllowDowngrade
void scanConfAt(const Pathname root_r, MultiversionSpec &spec_r, const Impl &zConfImpl_r)
void resetSolverUpgradeRemoveDroppedPackages()
Reset solverUpgradeRemoveDroppedPackages to the zypp.conf default.
bool repo_add_probe() const
Whether repository urls should be probed.
void multiversionSpecChanged()
Option< bool > solver_cleandepsOnRemove
TriBool strToTriBool(const C_Str &str)
Parse str into a bool if it's a legal true or false string; else indterminate.
section_const_iterator sectionsBegin() const
MultiversionSpec & multiversion()
DefaultOption(const value_type &initial_r)
bool solver_dupAllowNameChange() const
DUP tune: Whether to follow package renames upon DUP.
void reconfigureZConfig(const Pathname &override_r)
void setSolverUpgradeRemoveDroppedPackages(bool val_r)
Set solverUpgradeRemoveDroppedPackages to val_r.
TriBool repoGpgCheck() const
Check repo matadata signatures (indeterminate - according to gpgcheck)
bool apply_locks_file() const
Whether locks file should be read and applied after start (true)
void resetUpdateMessagesNotify()
Reset to the zypp.conf default.
DownloadMode commit_downloadMode() const
Commit download policy to use as default.
long download_transfer_timeout() const
Maximum time in seconds that you allow a transfer operation to take.
Pathname update_scripts_path
Pathname configPath() const
Path where the configfiles are kept (/etc/zypp).
Pathname cfg_known_services_path
bool download_use_deltarpm
bool solver_dupAllowArchChange() const
DUP tune: Whether to allow package arch changes upon DUP.
LocaleSet repoRefreshLocales
int download_transfer_timeout
Pathname repoPackagesPath() const
Path where the repo packages are downloaded and kept (repoCachePath()/packages).
void setRepoCachePath(const Pathname &path_r)
Set a new path as the default repo cache path.
void setRepoManagerRoot(const Pathname &root)
Sets the RepoManager root directory.
Option< bool > solver_dupAllowVendorChange
const value_type & get() const
Get the value.
void restoreToDefault()
Reset value to the current default.
Pathname solver_checkSystemFileDir() const
Directory, which may or may not contain files in which dependencies described which has to be fulfill...
Pathname cfg_metadata_path
const std::set< std::string > & multiversionSpec() const
Pathname update_messages_path
bool solver_onlyRequires() const
Solver regards required packages,patterns,...
int download_max_concurrent_connections
Option(const value_type &initial_r)
No default ctor, explicit initialisation!
void set_default_download_media_prefer_download()
Set download_media_prefer_download to the configfiles default.
Pathname locksFile() const
Path where zypp can find or create lock file (configPath()/locks)
bool solver_allowVendorChange() const
Whether vendor check is by default enabled.
long download_max_download_speed() const
Maximum download speed (bytes per second)
target::rpm::RpmInstFlags rpmInstallFlags
Types and functions for filesystem operations.
Pathname repoCachePath() const
Path where the caches are kept (/var/cache/zypp)
Pathname _parsedZyppConf
Remember any parsed zypp.conf.
value_type & ref()
Non-const reference to set a new value.
std::set< std::string > MultiversionSpec
void scanDirAt(const Pathname root_r, MultiversionSpec &spec_r, const Impl &zConfImpl_r)
Pathname vendorPath() const
Directory for equivalent vendor definitions (configPath()/vendors.d)
bool strToBool(const C_Str &str, bool default_r)
Parse str into a bool depending on the default value.
int simpleParseFile(std::istream &str_r, ParseFlags flags_r, function< bool(int, std::string)> consume_r)
Simple lineparser optionally trimming and skipping comments.
static PoolImpl & myPool()
bool solverUpgradeRemoveDroppedPackages() const
Whether dist upgrade should remove a products dropped packages (true).
MultiversionSpec & getSpec(Pathname root_r, const Impl &zConfImpl_r)
Pathname update_dataPath() const
Path where the update items are kept (/var/adm)
long download_min_download_speed() const
Minimum download speed (bytes per second) until the connection is dropped.
long download_max_concurrent_connections() const
Maximum number of concurrent connections for a single transfer.
void clearMultiversionSpec()
DefaultOption< bool > download_media_prefer_download
DefaultOption< Pathname > download_mediaMountdir
Option< bool > solver_allowVendorChange
void setTextLocale(const Locale &locale_r)
Set the prefered locale for translated texts.
Pathname credentials_global_dir_path
LocaleSet requestedLocales() const
Languages to be supported by the system.
Pathname knownServicesPath() const
Path where the known services .service files are kept (configPath()/services.d).
Pathname update_data_path
unsigned solver_upgradeTestcasesToKeep() const
When committing a dist upgrade (e.g.
Pathname update_messagesPath() const
Path where the repo solv files are created and kept (update_dataPath()/solv).
Pathname repoManagerRoot() const
The RepoManager root directory.
Pathname credentials_global_file_path
std::string updateMessagesNotify() const
Command definition for sending update messages.
bool setUserData(const std::string &str_r)
Set a new userData string.
void setRepoSolvfilesPath(const Pathname &path_r)
Set a new path as the default repo cache path.
Locale textLocale() const
The locale for translated texts zypp uses.
Parses a INI file and offers its structure as a dictionary.
void setPkgGpgCheck(TriBool val_r)
Change the value.
void resetRepoGpgCheck()
Reset to the zconfig default.
bool solver_cleandepsOnRemove() const
Whether removing a package should also remove no longer needed requirements.
MultiversionMap _multiversionMap
bool solver_dupAllowDowngrade() const
DUP tune: Whether to allow version downgrades upon DUP.
entry_const_iterator entriesEnd(const std::string §ion) const
Wrapper class for ::stat/::lstat.
EntrySet::const_iterator entry_const_iterator
DefaultOption< bool > gpgCheck
TriBool pkgGpgCheck() const
Check rpm package signatures (indeterminate - according to gpgcheck)
LocaleSet repoRefreshLocales() const
List of locales for which translated package descriptions should be downloaded.
Pathname repoSolvfilesPath() const
Path where the repo solv files are created and kept (repoCachePath()/solv).
Pathname historyLogFile() const
Path where ZYpp install history is logged.
bool solver_dupAllowVendorChange() const
DUP tune: Whether to allow package vendor changes upon DUP.
std::ostream & about(std::ostream &str) const
Print some detail about the current libzypp version.
DownloadMode
Supported commit download policies.
void set(const value_type &newval_r)
Set a new value.
void setSystemArchitecture(const Arch &arch_r)
Override the zypp system architecture.
RW_pointer< Impl, rw_pointer::Scoped< Impl > > _pimpl
Pointer to implementation.
void removeMultiversionSpec(const std::string &name_r)
void setRepoGpgCheck(TriBool val_r)
Change the value.
void addMultiversionSpec(const std::string &name_r)
void setTextLocale(const Locale &locale_r)
Set the default language for retrieving translated texts.
unsigned splitEscaped(const C_Str &line_r, TOutputIterator result_r, const C_Str &sepchars_r=" \t", bool withEmpty=false)
Split line_r into words with respect to escape delimeters.
Pathname knownReposPath() const
Path where the known repositories .repo files are kept (configPath()/repos.d).
static Locale defaultTextLocale()
The autodetected prefered locale for translated texts.
Pathname cfg_packages_path
void set_download_mediaMountdir(Pathname newval_r)
Set alternate value.
Easy-to use interface to the ZYPP dependency resolver.
unsigned split(const C_Str &line_r, TOutputIterator result_r, const C_Str &sepchars_r=" \t")
Split line_r into words.
int compareCI(const C_Str &lhs, const C_Str &rhs)
bool download_use_deltarpm_always
Option< Pathname > pluginsPath
bool download_media_prefer_download() const
Hint which media to prefer when installing packages (download vs.
void set_default_download_mediaMountdir()
Reset to zypp.cong default.
int download_max_silent_tries
Regular expression match result.
bool repoLabelIsAlias() const
Whether to use repository alias or name in user messages (progress, exceptions, .....
Option< bool > solver_onlyRequires
static Arch defaultSystemArchitecture()
The autodetected system architecture.
Option< bool > solver_dupAllowNameChange
long download_max_silent_tries() const
Maximum silent tries.
Pathname varsPath() const
Path containing custom repo variable definitions (configPath()/vars.d).
Pathname update_scriptsPath() const
Path where the repo metadata is downloaded and kept (update_dataPath()/).
void setRepoPackagesPath(const Pathname &path_r)
Set a new path as the default repo cache path.
std::map< Pathname, MultiversionSpec > SpecMap
void setRepoMetadataPath(const Pathname &path_r)
Set a new path as the default repo cache path.
section_const_iterator sectionsEnd() const
Pathname history_log_path
Pathname pubkeyCachePath() const
Path where the pubkey caches.
Impl(const Pathname &override_r=Pathname())
int download_max_download_speed
MultiversionSpec & getMultiversion() const
Pathname cfg_repo_mgr_root_path
bool gpgCheck() const
Turn signature checking on/off (on)
#define for_(IT, BEG, END)
Convenient for-loops using iterator.
bool hasUserData() const
Whether a (non empty) user data sting is defined.
Pathname solver_checkSystemFile
DefaultOption< std::string > updateMessagesNotify
bool empty() const
Test for an empty path.
void setUpdateMessagesNotify(const std::string &val_r)
Set a new command definition (see update.messages.notify in zypp.conf).
std::unordered_set< Locale > LocaleSet
int download_min_download_speed
void setGpgCheck(bool val_r)
Change the value.
Pathname repoMetadataPath() const
Path where the repo metadata is downloaded and kept (repoCachePath()/raw).
bool download_use_deltarpm_always() const
Whether to consider using a deltarpm even when rpm is local.
@ DownloadDefault
libzypp will decide what to do.
void restoreToDefault(const value_type &newval_r)
Reset value to a new default.
Pathname solver_checkSystemFileDir
void resetGpgCheck()
Reset to the zconfig default.
MapKVIteratorTraits< SectionSet >::Key_const_iterator section_const_iterator
Pathname download_mediaMountdir() const
Path where media are preferably mounted or downloaded.
Pathname credentialsGlobalDir() const
Defaults to /etc/zypp/credentials.d.
Pathname systemRoot() const
The target root directory.
std::string userData() const
User defined string value to be passed to log, history, plugins...
bool regex_match(const std::string &s, smatch &matches, const regex ®ex)
\relates regex \ingroup ZYPP_STR_REGEX \relates regex \ingroup ZYPP_STR_REGEX
String related utilities and Regular expression matching.
boost::logic::tribool TriBool
3-state boolean logic (true, false and indeterminate).
target::rpm::RpmInstFlags rpmInstallFlags() const
The default target::rpm::RpmInstFlags for ZYppCommitPolicy.
std::string distroverpkg() const
Package telling the "product version" on systems not using /etc/product.d/baseproduct.
bool hasPrefix(const C_Str &str_r, const C_Str &prefix_r)
Return whether str_r has prefix prefix_r.
const MultiversionSpec & multiversion() const
void set_download_media_prefer_download(bool yesno_r)
Set download_media_prefer_download to a specific value.
unsigned repo_refresh_delay
Option< DownloadMode > commit_downloadMode
DefaultOption< TriBool > pkgGpgCheck
int dirForEach(const Pathname &dir_r, function< bool(const Pathname &, const char *const)> fnc_r)
Invoke callback function fnc_r for each entry in directory dir_r.
bool download_use_deltarpm() const
Whether to consider using a deltarpm when downloading a package.
'Language[_Country]' codes.
DefaultOption< bool > solverUpgradeRemoveDroppedPackages
unsigned repo_refresh_delay() const
Amount of time in minutes that must pass before another refresh.
Pathname cfg_multiversion_path
void resetPkgGpgCheck()
Reset to the zconfig default.
const value_type & getDefault() const
Get the current default value.
entry_const_iterator entriesBegin(const std::string §ion) const
Mutable option with initial value also remembering a config value.
Pathname credentialsGlobalFile() const
Defaults to /etc/zypp/credentials.cat.
TInt strtonum(const C_Str &str)
Parsing numbers from string.
Pathname pluginsPath() const
Defaults to /usr/lib/zypp/plugins.
Option< bool > solver_dupAllowArchChange
void setDefault(const value_type &newval_r)
Set a new default value.
Pathname solver_checkSystemFile() const
File in which dependencies described which has to be fulfilled for a running system.
Arch systemArchitecture() const
The system architecture zypp uses.
MultiversionSpec & getDefaultSpec()
Pathname cfg_known_repos_path
Option< unsigned > solver_upgradeTestcasesToKeep
DefaultOption< TriBool > repoGpgCheck