libzypp: zypp/ZConfig.cc Source File

libzypp 17.38.15

ZConfig.cc
Go to the documentation of this file.
1/*---------------------------------------------------------------------\
2| ____ _ __ __ ___ |
3| |__ / \ / / . \ . \ |
4| / / \ V /| _/ _/ |
5| / /__ | | | | | | |
6| /_____||_| |_| |_| |
7| |
8\---------------------------------------------------------------------*/
12#include <cstdlib>
13#include <iostream>
14#include <optional>
15#include <map>
16#include <zypp-core/APIConfig.h>
17#include <zypp-core/base/LogTools.h>
18#include <zypp-core/base/IOStream.h>
19#include <zypp-core/base/InputStream>
20#include <zypp-core/base/Errno.h>
21#include <zypp-core/base/String.h>
22#include <zypp-core/base/Regex.h>
23
24#include <zypp/ZConfig.h>
25#include <zypp/ZYppFactory.h>
26#include <zypp/PathInfo.h>
27#include <zypp-core/parser/EconfDict>
28
29#include <zypp/sat/Pool.h>
30#include <zypp/sat/detail/PoolImpl.h>
31
32#include <zypp-media/MediaConfig>
33
34using std::endl;
35using namespace zypp::filesystem;
36using namespace zypp::parser;
37
38#undef ZYPP_BASE_LOGGER_LOGGROUP
39#define ZYPP_BASE_LOGGER_LOGGROUP "zconfig"
40
42namespace zypp
43{
44
45 namespace env {
46 inline std::optional<Pathname> ZYPP_CONF()
47 {
48 const char *env_confpath = getenv( "ZYPP_CONF" );
49 if ( env_confpath )
50 return env_confpath;
51 return std::nullopt;
52 }
53 } // namespace env
54
55
56
67 namespace
68 {
69
87 Locale _autodetectTextLocale()
88 {
89 Locale ret( Locale::enCode );
90 const char * envlist[] = { "LC_ALL", "LC_MESSAGES", "LANG", NULL };
91 for ( const char ** envvar = envlist; *envvar; ++envvar )
92 {
93 const char * envlang = getenv( *envvar );
94 if ( envlang )
95 {
96 std::string envstr( envlang );
97 if ( envstr != "POSIX" && envstr != "C" )
98 {
99 Locale lang( envstr );
100 if ( lang )
101 {
102 MIL << "Found " << *envvar << "=" << envstr << endl;
103 ret = lang;
104 break;
105 }
106 }
107 }
108 }
109 MIL << "Default text locale is '" << ret << "'" << endl;
110#warning HACK AROUND BOOST_TEST_CATCH_SYSTEM_ERRORS
111 setenv( "BOOST_TEST_CATCH_SYSTEM_ERRORS", "no", 1 );
112 return ret;
113 }
114
125 struct ZyppConfIniMap : public IniDict {
126 ZyppConfIniMap( Pathname root_r = "/" )
127 : IniDict { iniMapReadFrom(root_r) }
128 {
129 pMIL( str::sconcat("zypp.conf(", root_r, "):"), *this );
130 pDBG( dump(*this) );
131 }
132
133 private:
135 IniDict iniMapReadFrom( const Pathname & root_r )
136 {
137 pMIL( "Reading zypp.conf for root", root_r );
138 std::optional<Pathname> ZYPP_CONF { env::ZYPP_CONF() };
139 if ( ZYPP_CONF ) {
140 // Read the plain file requested by $ZYPP_CONF
141 pMIL( "$ZYPP_CONF is set to", str::sconcat("'",*ZYPP_CONF,"'") );
142 PathInfo conf { root_r / *ZYPP_CONF };
143 if ( conf.isFile() ) {
144 pMIL( "$ZYPP_CONF requests reading file", conf );
145 return parser::IniDict( conf.path() );
146 } else {
147 pMIL( "$ZYPP_CONF denotes no file below root. Using builtin defaults." );
148 return parser::IniDict();
149 }
150 } else {
151 // Econf mode reading the systems settings
152 return parser::EconfDict( "/zypp/zypp.conf", root_r );
153 }
154 }
155 };
156
158 } // namespace zypp
160
162 template<class Tp>
163 struct Option
164 {
165 using value_type = Tp;
166
168 Option( value_type initial_r )
169 : _val( std::move(initial_r) )
170 {}
171
172 Option & operator=( value_type newval_r )
173 { set( std::move(newval_r) ); return *this; }
174
176 const value_type & get() const
177 { return _val; }
178
180 operator const value_type &() const
181 { return _val; }
182
184 void set( value_type newval_r )
185 { _val = std::move(newval_r); }
186
187 private:
188 value_type _val;
189 };
190
192 template<class Tp>
193 struct DefaultOption : public Option<Tp>
194 {
195 using value_type = Tp;
196 using option_type = Option<Tp>;
197
198 explicit DefaultOption( value_type initial_r )
199 : Option<Tp>( initial_r )
200 , _default( std::move(initial_r) )
201 {}
202
203 DefaultOption & operator=( value_type newval_r )
204 { this->set( std::move(newval_r) ); return *this; }
205
207 void restoreToDefault()
208 { this->set( _default.get() ); }
209
211 void restoreToDefault( value_type newval_r )
212 { setDefault( std::move(newval_r) ); restoreToDefault(); }
213
215 const value_type & getDefault() const
216 { return _default.get(); }
217
219 void setDefault( value_type newval_r )
220 { _default.set( std::move(newval_r) ); }
221
222 private:
223 option_type _default;
224 };
225
227 //
228 // CLASS NAME : ZConfig::Impl
229 //
235 class ZConfig::Impl
236 {
237 using MultiversionSpec = std::set<std::string>;
238
240 struct TargetDefaults
241 {
242 TargetDefaults()
243 : solver_focus ( ResolverFocus::Default )
244 , solver_onlyRequires ( false )
245 , solver_allowVendorChange ( false )
246 , solver_dupAllowDowngrade ( true )
247 , solver_dupAllowNameChange ( true )
248 , solver_dupAllowArchChange ( true )
249 , solver_dupAllowVendorChange ( false )
250 , solver_cleandepsOnRemove ( false )
251 , solver_noUpdateProvide ( false )
252 , solver_upgradeTestcasesToKeep ( 2 )
253 , solverUpgradeRemoveDroppedPackages ( true )
254 {}
255
256 bool consume( const std::string & section, const std::string & entry, const std::string & value )
257 {
258 if ( section != "main" )
259 return false;
260
261 if ( entry == "solver.focus" )
262 {
263 fromString( value, solver_focus );
264 }
265 else if ( entry == "solver.onlyRequires" )
266 {
267 solver_onlyRequires.set( str::strToBool( value, solver_onlyRequires ) );
268 }
269 else if ( entry == "solver.allowVendorChange" )
270 {
271 solver_allowVendorChange.set( str::strToBool( value, solver_allowVendorChange ) );
272 }
273 else if ( entry == "solver.dupAllowDowngrade" )
274 {
275 solver_dupAllowDowngrade.set( str::strToBool( value, solver_dupAllowDowngrade ) );
276 }
277 else if ( entry == "solver.dupAllowNameChange" )
278 {
279 solver_dupAllowNameChange.set( str::strToBool( value, solver_dupAllowNameChange ) );
280 }
281 else if ( entry == "solver.dupAllowArchChange" )
282 {
283 solver_dupAllowArchChange.set( str::strToBool( value, solver_dupAllowArchChange ) );
284 }
285 else if ( entry == "solver.dupAllowVendorChange" )
286 {
287 solver_dupAllowVendorChange.set( str::strToBool( value, solver_dupAllowVendorChange ) );
288 }
289 else if ( entry == "solver.cleandepsOnRemove" )
290 {
291 solver_cleandepsOnRemove.set( str::strToBool( value, solver_cleandepsOnRemove ) );
292 }
293 else if ( entry == "solver.noUpdateProvide" )
294 {
295 solver_noUpdateProvide.set( str::strToBool( value, solver_noUpdateProvide ) );
296 }
297 else if ( entry == "solver.upgradeTestcasesToKeep" )
298 {
299 solver_upgradeTestcasesToKeep.set( str::strtonum<unsigned>( value ) );
300 }
301 else if ( entry == "solver.upgradeRemoveDroppedPackages" )
302 {
303 solverUpgradeRemoveDroppedPackages.restoreToDefault( str::strToBool( value, solverUpgradeRemoveDroppedPackages.getDefault() ) );
304 }
305 else
306 return false;
307
308 return true;
309 }
310
311 ResolverFocus solver_focus;
312 Option<bool> solver_onlyRequires;
313 Option<bool> solver_allowVendorChange;
314 Option<bool> solver_dupAllowDowngrade;
315 Option<bool> solver_dupAllowNameChange;
316 Option<bool> solver_dupAllowArchChange;
317 Option<bool> solver_dupAllowVendorChange;
318 Option<bool> solver_cleandepsOnRemove;
319 Option<bool> solver_noUpdateProvide;
320 Option<unsigned> solver_upgradeTestcasesToKeep;
321 DefaultOption<bool> solverUpgradeRemoveDroppedPackages;
322 };
323
324 public:
325 Impl()
326 : cfg_arch ( defaultSystemArchitecture() )
327 , cfg_textLocale ( defaultTextLocale() )
328 , cfg_cache_path { "/var/cache/zypp" }
329 , cfg_metadata_path { "" } // empty - follows cfg_cache_path
330 , cfg_solvfiles_path { "" } // empty - follows cfg_cache_path
331 , cfg_packages_path { "" } // empty - follows cfg_cache_path
332 , updateMessagesNotify ( "" )
333 , repo_add_probe ( false )
334 , repo_refresh_delay ( 10 )
335 , repoLabelIsAlias ( false )
336 , download_use_deltarpm ( APIConfig(LIBZYPP_CONFIG_USE_DELTARPM_BY_DEFAULT) )
337 , download_use_deltarpm_always ( false )
338 , download_media_prefer_download( true )
339 , download_mediaMountdir ( "/var/adm/mount" )
340 , commit_downloadMode ( DownloadDefault )
341 , gpgCheck ( true )
342 , repoGpgCheck ( indeterminate )
343 , pkgGpgCheck ( indeterminate )
344 , apply_locks_file ( true )
345 , pluginsPath ( "/usr/lib/zypp/plugins" )
346 , geoipEnabled ( true )
347 , geoipHosts { "download.opensuse.org" }
348 {
349 MIL << "libzypp: " LIBZYPP_VERSION_STRING << " (" << LIBZYPP_CODESTREAM << ")" << endl;
350
351 ZyppConfIniMap iniMap; // Scan the default zypp.conf settings
352
353 using EnvMap = std::map<std::string,std::string>;
354 std::optional<EnvMap> envMap;
355 for ( const auto & section : iniMap.sections() ) {
356 for ( const auto & [entry,value] : iniMap.entries( section ) ) {
357
358 if ( _initialTargetDefaults.consume( section, entry, value ) )
359 continue;
360
361 if ( _mediaConf.setConfigValue( section, entry, value ) )
362 continue;
363
364 if ( section == "main" )
365 {
366 if ( entry == "lock_timeout" )
367 {
368 str::strtonum( value, cfg_lockTimeout );
369 }
370 else if ( entry == "arch" )
371 {
372 Arch carch( value );
373 if ( carch != cfg_arch ) {
374 WAR << "Overriding system architecture (" << cfg_arch << "): " << carch << endl;
375 cfg_arch = carch;
376 }
377 }
378 else if ( entry == "cachedir" )
379 {
380 cfg_cache_path.restoreToDefault( value );
381 }
382 else if ( entry == "metadatadir" )
383 {
384 cfg_metadata_path.restoreToDefault( value );
385 }
386 else if ( entry == "solvfilesdir" )
387 {
388 cfg_solvfiles_path.restoreToDefault( value );
389 }
390 else if ( entry == "packagesdir" )
391 {
392 cfg_packages_path.restoreToDefault( value );
393 }
394 else if ( entry == "configdir" )
395 {
396 cfg_config_path = Pathname(value);
397 }
398 else if ( entry == "reposdir" )
399 {
400 cfg_known_repos_path = Pathname(value);
401 }
402 else if ( entry == "servicesdir" )
403 {
404 cfg_known_services_path = Pathname(value);
405 }
406 else if ( entry == "varsdir" )
407 {
408 cfg_vars_path = Pathname(value);
409 }
410 else if ( entry == "repo.add.probe" )
411 {
412 repo_add_probe = str::strToBool( value, repo_add_probe );
413 }
414 else if ( entry == "repo.refresh.delay" )
415 {
416 str::strtonum(value, repo_refresh_delay);
417 }
418 else if ( entry == "repo.refresh.locales" )
419 {
420 std::vector<std::string> tmp;
421 str::split( value, back_inserter( tmp ), ", \t" );
422
423 boost::function<Locale(const std::string &)> transform(
424 [](const std::string & str_r)->Locale{ return Locale(str_r); }
425 );
426 repoRefreshLocales.insert( make_transform_iterator( tmp.begin(), transform ),
427 make_transform_iterator( tmp.end(), transform ) );
428 }
429 else if ( entry == "download.use_deltarpm" )
430 {
431 download_use_deltarpm = str::strToBool( value, download_use_deltarpm );
432 }
433 else if ( entry == "download.use_deltarpm.always" )
434 {
435 download_use_deltarpm_always = str::strToBool( value, download_use_deltarpm_always );
436 }
437 else if ( entry == "download.media_preference" )
438 {
439 download_media_prefer_download.restoreToDefault( str::compareCI( value, "volatile" ) != 0 );
440 }
441 else if ( entry == "download.media_mountdir" )
442 {
443 download_mediaMountdir.restoreToDefault( Pathname(value) );
444 }
445 else if ( entry == "download.use_geoip_mirror") {
446 geoipEnabled = str::strToBool( value, geoipEnabled );
447 }
448 else if ( entry == "commit.downloadMode" )
449 {
450 commit_downloadMode.set( deserializeDownloadMode( value ) );
451 }
452 else if ( entry == "gpgcheck" )
453 {
454 gpgCheck.restoreToDefault( str::strToBool( value, gpgCheck ) );
455 }
456 else if ( entry == "repo_gpgcheck" )
457 {
458 repoGpgCheck.restoreToDefault( str::strToTriBool( value ) );
459 }
460 else if ( entry == "pkg_gpgcheck" )
461 {
462 pkgGpgCheck.restoreToDefault( str::strToTriBool( value ) );
463 }
464 else if ( entry == "vendordir" )
465 {
466 cfg_vendor_path = Pathname(value);
467 }
468 else if ( entry == "multiversiondir" )
469 {
470 cfg_multiversion_path = Pathname(value);
471 }
472 else if ( entry == "multiversion.kernels" )
473 {
474 cfg_kernel_keep_spec = value;
475 }
476 else if ( entry == "solver.checkSystemFile" )
477 {
478 solver_checkSystemFile = Pathname(value);
479 }
480 else if ( entry == "solver.checkSystemFileDir" )
481 {
482 solver_checkSystemFileDir = Pathname(value);
483 }
484 else if ( entry == "multiversion" )
485 {
486 MultiversionSpec & defSpec( _multiversionMap.getDefaultSpec() );
487 str::splitEscaped( value, std::inserter( defSpec, defSpec.end() ), ", \t" );
488 }
489 else if ( entry == "locksfile.path" )
490 {
491 locks_file = Pathname(value);
492 }
493 else if ( entry == "locksfile.apply" )
494 {
495 apply_locks_file = str::strToBool( value, apply_locks_file );
496 }
497 else if ( entry == "update.datadir" )
498 {
499 // ignore, this is a constant anyway and should not be user configurabe
500 // update_data_path = Pathname(value);
501 }
502 else if ( entry == "update.scriptsdir" )
503 {
504 // ignore, this is a constant anyway and should not be user configurabe
505 // update_scripts_path = Pathname(value);
506 }
507 else if ( entry == "update.messagessdir" )
508 {
509 // ignore, this is a constant anyway and should not be user configurabe
510 // update_messages_path = Pathname(value);
511 }
512 else if ( entry == "update.messages.notify" )
513 {
514 updateMessagesNotify.set( value );
515 }
516 else if ( entry == "rpm.install.excludedocs" )
517 {
518 rpmInstallFlags.setFlag( target::rpm::RPMINST_EXCLUDEDOCS,
519 str::strToBool( value, false ) );
520 }
521 else if ( entry == "history.logfile" )
522 {
523 history_log_path = Pathname(value);
524 }
525 else if ( entry == "ZYPP_SINGLE_RPMTRANS" || entry == "techpreview.ZYPP_SINGLE_RPMTRANS" )
526 {
527 DBG << "ZYPP_SINGLE_RPMTRANS=" << value << endl;
528 ::setenv( "ZYPP_SINGLE_RPMTRANS", value.c_str(), 0 );
529 }
530 else if ( entry == "techpreview.ZYPP_MEDIANETWORK" )
531 {
532 DBG << "techpreview.ZYPP_MEDIANETWORK=" << value << endl;
533 ::setenv( "ZYPP_MEDIANETWORK", value.c_str(), 1 );
534 }
535 else { // unknown entry
536 pWAR( "zypp.conf: Unknown entry in [main]:", entry, "=", value );
537 }
538 }
539 else if ( section == "env" )
540 {
541 if ( !envMap )
542 envMap = EnvMap();
543 auto [it, inserted] = envMap->emplace( entry, value );
544 if ( !inserted ) {
545 WAR << "zypp.conf [env]: duplicate key '" << entry << "', shadowing previous value '" << it->second << "' with '" << value << "'" << endl;
546 it->second = value;
547 }
548 }
549 else { // unknown section {
550 pWAR( "zypp.conf: Unknown section:", str::sconcat("[",section,"]"), entry, "=", value );
551 }
552 }
553 }
554
555 if ( envMap ) {
556 for ( const auto & [entry, value] : *envMap ) {
557 const char* exists = ::getenv( entry.c_str() );
558 if ( exists == nullptr ) {
559 if ( ::setenv( entry.c_str(), value.c_str(), 0 ) != 0 ) {
560 pWAR( "zypp.conf [env]: set", str::sconcat("'",entry,"=",value,"'"), ": failed", Errno() );
561 }
562 else {
563 pMIL( "zypp.conf [env]: set", str::sconcat("'",entry,"=",value,"'") );
564 }
565 }
566 else {
567 pWAR( "zypp.conf [env]: skip", str::sconcat("'",entry,"=",value,"'"), ": is already set to", str::sconcat("'",exists,"'") );
568 }
569 }
570 }
571
572 // legacy:
573 if ( getenv( "ZYPP_TESTSUITE_FAKE_ARCH" ) )
574 {
575 Arch carch( getenv( "ZYPP_TESTSUITE_FAKE_ARCH" ) );
576 if ( carch != cfg_arch )
577 {
578 WAR << "ZYPP_TESTSUITE_FAKE_ARCH: Overriding system architecture (" << cfg_arch << "): " << carch << endl;
579 cfg_arch = carch;
580 }
581 }
582 MIL << "ZConfig singleton created." << endl;
583 }
584
585 Impl(const Impl &) = delete;
586 Impl(Impl &&) = delete;
587 Impl &operator=(const Impl &) = delete;
588 Impl &operator=(Impl &&) = delete;
589 ~Impl() {}
590
598 Pathname _autodetectSystemRoot() const
599 {
600 Target_Ptr target( getZYpp()->getTarget() );
601 return target ? target->root() : _announced_root_path;
602 }
603
604 void notifyTargetChanged()
605 {
606 _announced_root_path = Pathname(); // first of all reset any previously _announced_root_path
607
608 Pathname newRoot { _autodetectSystemRoot() };
609 MIL << "notifyTargetChanged (" << newRoot << ")" << endl;
610
611 if ( newRoot.emptyOrRoot() ) {
612 _currentTargetDefaults.reset(); // to initial settigns from /
613 }
614 else {
615 _currentTargetDefaults = TargetDefaults();
616 ZyppConfIniMap iniMap { newRoot }; // Scan the zypp.conf settings for newRoot
617 for ( const auto & section : iniMap.sections() ) {
618 for ( const auto & [entry,value] : iniMap.entries( section ) ) {
619 (*_currentTargetDefaults).consume( section, entry, value );
620 }
621 }
622 }
623 }
624
625 public:
626 Pathname _announced_root_path;
627
628 long cfg_lockTimeout = 0; // signed!
629
630 Arch cfg_arch;
631 Locale cfg_textLocale;
632
633 DefaultOption<Pathname> cfg_cache_path; // Settings from the config file are also remembered
634 DefaultOption<Pathname> cfg_metadata_path; // 'default'. Cleanup in RepoManager e.g needs to tell
635 DefaultOption<Pathname> cfg_solvfiles_path; // whether settings in effect are config values or
636 DefaultOption<Pathname> cfg_packages_path; // custom settings applied vie set...Path().
637
638 Pathname cfg_config_path;
639 Pathname cfg_known_repos_path;
640 Pathname cfg_known_services_path;
641 Pathname cfg_vars_path;
642 Pathname cfg_repo_mgr_root_path;
643
644 Pathname cfg_vendor_path;
645 Pathname cfg_multiversion_path;
646 std::string cfg_kernel_keep_spec;
647 Pathname locks_file;
648
649 DefaultOption<std::string> updateMessagesNotify;
650
651 bool repo_add_probe;
652 unsigned repo_refresh_delay;
653 LocaleSet repoRefreshLocales;
654 bool repoLabelIsAlias;
655
656 bool download_use_deltarpm;
657 bool download_use_deltarpm_always;
658 DefaultOption<bool> download_media_prefer_download;
659 DefaultOption<Pathname> download_mediaMountdir;
660
661 Option<DownloadMode> commit_downloadMode;
662
663 DefaultOption<bool> gpgCheck;
664 DefaultOption<TriBool> repoGpgCheck;
665 DefaultOption<TriBool> pkgGpgCheck;
666
667 Pathname solver_checkSystemFile;
668 Pathname solver_checkSystemFileDir;
669
670 MultiversionSpec & multiversion() { return getMultiversion(); }
671 const MultiversionSpec & multiversion() const { return getMultiversion(); }
672
673 bool apply_locks_file;
674
675 target::rpm::RpmInstFlags rpmInstallFlags;
676
677 Pathname history_log_path;
678
679 std::string userData;
680
681 Option<Pathname> pluginsPath;
682
683 bool geoipEnabled;
684
685 std::vector<std::string> geoipHosts;
686
687 /* Other config singleton instances */
688 MediaConfig &_mediaConf = MediaConfig::instance();
689
690
691 public:
692 const TargetDefaults & targetDefaults() const { return _currentTargetDefaults ? *_currentTargetDefaults : _initialTargetDefaults; }
693 TargetDefaults & targetDefaults() { return _currentTargetDefaults ? *_currentTargetDefaults : _initialTargetDefaults; }
694 private:
695 TargetDefaults _initialTargetDefaults;
696 std::optional<TargetDefaults> _currentTargetDefaults;
697
698 private:
699 // HACK for bnc#906096: let pool re-evaluate multiversion spec
700 // if target root changes. ZConfig returns data sensitive to
701 // current target root.
702 // TODO Actually we'd need to scan the target systems zypp.conf and
703 // overlay all system specific values.
704 struct MultiversionMap
705 {
706 using SpecMap = std::map<Pathname, MultiversionSpec>;
707
708 MultiversionSpec & getSpec( Pathname root_r, const Impl & zConfImpl_r ) // from system at root
709 {
710 // _specMap[] - the plain zypp.conf value
711 // _specMap[/] - combine [] and multiversion.d scan
712 // _specMap[root] - scan root/zypp.conf and root/multiversion.d
713
714 if ( root_r.empty() )
715 root_r = "/";
716 bool cacheHit = _specMap.count( root_r );
717 MultiversionSpec & ret( _specMap[root_r] ); // creates new entry on the fly
718
719 if ( ! cacheHit )
720 {
721 // bsc#1193488: If no (/root)/.../zypp.conf exists use the default zypp.conf
722 // multiversion settings. It is a legacy that the packaged multiversion setting
723 // in zypp.conf (the kernel) may differ from the builtin default (empty).
724 // But we want a missing config to behave similar to the default one, otherwise
725 // a bare metal install easily runs into trouble.
726 if ( root_r == "/" || not scanConfAt( root_r, ret, zConfImpl_r ) )
727 ret = _specMap[Pathname()];
728 scanDirAt( root_r, ret, zConfImpl_r ); // add multiversion.d at root_r
729 using zypp::operator<<;
730 MIL << "MultiversionSpec '" << root_r << "' = " << ret << endl;
731 }
732 return ret;
733 }
734
735 MultiversionSpec & getDefaultSpec() // Spec from zypp.conf parsing; called before any getSpec
736 { return _specMap[Pathname()]; }
737
738 private:
739 bool scanConfAt( const Pathname& root_r, MultiversionSpec & spec_r, const Impl & zConfImpl_r )
740 {
741 ZyppConfIniMap iniMap { root_r }; // Scan the zypp.conf settings for root
742 // TODO: iniDict lacks direct value access :(
743 for ( const auto & section : iniMap.sections() ) {
744 for ( const auto & [entry,value] : iniMap.entries( section ) ) {
745 if ( entry == "multiversion" ) {
746 str::splitEscaped( value, std::inserter( spec_r, spec_r.end() ), ", \t" );
747 return true;
748 }
749 }
750 }
751 return false;
752 }
753
754 void scanDirAt( const Pathname& root_r, MultiversionSpec & spec_r, const Impl & zConfImpl_r )
755 {
756 // NOTE: Actually we'd need to scan and use the root_r! zypp.conf values.
757 Pathname multiversionDir( zConfImpl_r.cfg_multiversion_path );
758 if ( multiversionDir.empty() )
759 multiversionDir = ( zConfImpl_r.cfg_config_path.empty()
760 ? Pathname("/etc/zypp")
761 : zConfImpl_r.cfg_config_path ) / "multiversion.d";
762
763 filesystem::dirForEach( Pathname::assertprefix( root_r, multiversionDir ),
764 [&spec_r]( const Pathname & dir_r, const char *const & name_r )->bool
765 {
766 MIL << "Parsing " << dir_r/name_r << endl;
767 iostr::simpleParseFile( InputStream( dir_r/name_r ),
768 [&spec_r]( int num_r, std::string line_r )->bool
769 {
770 DBG << " found " << line_r << endl;
771 spec_r.insert( std::move(line_r) );
772 return true;
773 } );
774 return true;
775 } );
776 }
777
778 private:
779 SpecMap _specMap;
780 };
781
782 MultiversionSpec & getMultiversion() const
783 { return _multiversionMap.getSpec( _autodetectSystemRoot(), *this ); }
784
785 mutable MultiversionMap _multiversionMap;
786 };
787
788
790 //
791 // METHOD NAME : ZConfig::instance
792 // METHOD TYPE : ZConfig &
793 //
794 ZConfig & ZConfig::instance()
795 {
796 static ZConfig _instance; // The singleton
797 return _instance;
798 }
799
801 //
802 // METHOD NAME : ZConfig::ZConfig
803 // METHOD TYPE : Ctor
804 //
805 ZConfig::ZConfig()
806 : _pimpl( new Impl )
807 {
808 about( MIL );
809 }
810
812 //
813 // METHOD NAME : ZConfig::~ZConfig
814 // METHOD TYPE : Dtor
815 //
816 ZConfig::~ZConfig( )
817 {}
818
819 long ZConfig::lockTimeout() const
820 {
821 const char * env = getenv("ZYPP_LOCK_TIMEOUT");
822 if ( env ) {
823 return str::strtonum<long>( env );
824 }
825 return _pimpl->cfg_lockTimeout;
826 }
827
828 void ZConfig::notifyTargetChanged()
829 { return _pimpl->notifyTargetChanged(); }
830
831 Pathname ZConfig::systemRoot() const
832 { return _pimpl->_autodetectSystemRoot(); }
833
834 Pathname ZConfig::repoManagerRoot() const
835 {
836 return ( _pimpl->cfg_repo_mgr_root_path.empty()
837 ? systemRoot() : _pimpl->cfg_repo_mgr_root_path );
838 }
839
840 void ZConfig::setRepoManagerRoot(const zypp::filesystem::Pathname &root)
841 { _pimpl->cfg_repo_mgr_root_path = root; }
842
843 void ZConfig::announceSystemRoot( const Pathname & root_r )
844 { _pimpl->_announced_root_path = root_r; }
845
847 //
848 // system architecture
849 //
851
852 Arch ZConfig::defaultSystemArchitecture()
853 {
854 return Arch::detectSystemArchitecture();
855 }
856
857 Arch ZConfig::systemArchitecture() const
858 { return _pimpl->cfg_arch; }
859
860 void ZConfig::setSystemArchitecture( const Arch & arch_r )
861 {
862 if ( arch_r != _pimpl->cfg_arch )
863 {
864 WAR << "Overriding system architecture (" << _pimpl->cfg_arch << "): " << arch_r << endl;
865 _pimpl->cfg_arch = arch_r;
866 }
867 }
868
870 //
871 // text locale
872 //
874
875 Locale ZConfig::defaultTextLocale()
876 {
877 static Locale _val( _autodetectTextLocale() );
878 return _val;
879 }
880
881 Locale ZConfig::textLocale() const
882 { return _pimpl->cfg_textLocale; }
883
884 void ZConfig::setTextLocale( const Locale & locale_r )
885 {
886 if ( locale_r != _pimpl->cfg_textLocale )
887 {
888 WAR << "Overriding text locale (" << _pimpl->cfg_textLocale << "): " << locale_r << endl;
889 _pimpl->cfg_textLocale = locale_r;
890 // Propagate changes
891 sat::Pool::instance().setTextLocale( locale_r );
892 }
893 }
894
896 // user data
898
899 bool ZConfig::hasUserData() const
900 { return !_pimpl->userData.empty(); }
901
902 std::string ZConfig::userData() const
903 { return _pimpl->userData; }
904
905 bool ZConfig::setUserData( const std::string & str_r )
906 {
907 for_( ch, str_r.begin(), str_r.end() )
908 {
909 if ( *ch < ' ' && *ch != '\t' )
910 {
911 ERR << "New user data string rejectded: char " << (int)*ch << " at position " << (ch - str_r.begin()) << endl;
912 return false;
913 }
914 }
915 MIL << "Set user data string to '" << str_r << "'" << endl;
916 _pimpl->userData = str_r;
917 return true;
918 }
919
921
922 Pathname ZConfig::repoCachePath() const
923 {
924 return ( _pimpl->cfg_cache_path.get().empty()
925 ? Pathname("/var/cache/zypp") : _pimpl->cfg_cache_path.get() );
926 }
927
928 Pathname ZConfig::pubkeyCachePath() const
929 {
930 return repoCachePath()/"pubkeys";
931 }
932
933 void ZConfig::setRepoCachePath(const zypp::filesystem::Pathname &path_r)
934 {
935 _pimpl->cfg_cache_path = path_r;
936 }
937
938 Pathname ZConfig::repoMetadataPath() const
939 {
940 return ( _pimpl->cfg_metadata_path.get().empty()
941 ? (repoCachePath()/"raw") : _pimpl->cfg_metadata_path.get() );
942 }
943
944 void ZConfig::setRepoMetadataPath(const zypp::filesystem::Pathname &path_r)
945 {
946 _pimpl->cfg_metadata_path = path_r;
947 }
948
949 Pathname ZConfig::repoSolvfilesPath() const
950 {
951 return ( _pimpl->cfg_solvfiles_path.get().empty()
952 ? (repoCachePath()/"solv") : _pimpl->cfg_solvfiles_path.get() );
953 }
954
955 void ZConfig::setRepoSolvfilesPath(const zypp::filesystem::Pathname &path_r)
956 {
957 _pimpl->cfg_solvfiles_path = path_r;
958 }
959
960 Pathname ZConfig::repoPackagesPath() const
961 {
962 return ( _pimpl->cfg_packages_path.get().empty()
963 ? (repoCachePath()/"packages") : _pimpl->cfg_packages_path.get() );
964 }
965
966 void ZConfig::setRepoPackagesPath(const zypp::filesystem::Pathname &path_r)
967 {
968 _pimpl->cfg_packages_path = path_r;
969 }
970
971 Pathname ZConfig::builtinRepoCachePath() const
972 { return _pimpl->cfg_cache_path.getDefault().empty() ? Pathname("/var/cache/zypp") : _pimpl->cfg_cache_path.getDefault(); }
973
974 Pathname ZConfig::builtinRepoMetadataPath() const
975 { return _pimpl->cfg_metadata_path.getDefault().empty() ? (builtinRepoCachePath()/"raw") : _pimpl->cfg_metadata_path.getDefault(); }
976
977 Pathname ZConfig::builtinRepoSolvfilesPath() const
978 { return _pimpl->cfg_solvfiles_path.getDefault().empty() ? (builtinRepoCachePath()/"solv") : _pimpl->cfg_solvfiles_path.getDefault(); }
979
980 Pathname ZConfig::builtinRepoPackagesPath() const
981 { return _pimpl->cfg_packages_path.getDefault().empty() ? (builtinRepoCachePath()/"packages") : _pimpl->cfg_packages_path.getDefault(); }
982
984
985 Pathname ZConfig::configPath() const
986 {
987 return ( _pimpl->cfg_config_path.empty()
988 ? Pathname("/etc/zypp") : _pimpl->cfg_config_path );
989 }
990
991 Pathname ZConfig::knownReposPath() const
992 {
993 return ( _pimpl->cfg_known_repos_path.empty()
994 ? (configPath()/"repos.d") : _pimpl->cfg_known_repos_path );
995 }
996
997 Pathname ZConfig::knownServicesPath() const
998 {
999 return ( _pimpl->cfg_known_services_path.empty()
1000 ? (configPath()/"services.d") : _pimpl->cfg_known_services_path );
1001 }
1002
1003 Pathname ZConfig::needrebootFile() const
1004 { return configPath()/"needreboot"; }
1005
1006 Pathname ZConfig::needrebootPath() const
1007 { return configPath()/"needreboot.d"; }
1008
1009 void ZConfig::setGeoipEnabled( bool enable )
1010 { _pimpl->geoipEnabled = enable; }
1011
1012 bool ZConfig::geoipEnabled () const
1013 { return _pimpl->geoipEnabled; }
1014
1015 Pathname ZConfig::geoipCachePath() const
1016 { return builtinRepoCachePath()/"geoip.d"; }
1017
1018 const std::vector<std::string> ZConfig::geoipHostnames () const
1019 { return _pimpl->geoipHosts; }
1020
1021 Pathname ZConfig::varsPath() const
1022 {
1023 return ( _pimpl->cfg_vars_path.empty()
1024 ? (configPath()/"vars.d") : _pimpl->cfg_vars_path );
1025 }
1026
1027 Pathname ZConfig::vendorPath() const
1028 {
1029 return ( _pimpl->cfg_vendor_path.empty()
1030 ? (configPath()/"vendors.d") : _pimpl->cfg_vendor_path );
1031 }
1032
1033 Pathname ZConfig::locksFile() const
1034 {
1035 return ( _pimpl->locks_file.empty()
1036 ? (configPath()/"locks") : _pimpl->locks_file );
1037 }
1038
1040
1041 bool ZConfig::repo_add_probe() const
1042 { return _pimpl->repo_add_probe; }
1043
1044 unsigned ZConfig::repo_refresh_delay() const
1045 { return _pimpl->repo_refresh_delay; }
1046
1047 LocaleSet ZConfig::repoRefreshLocales() const
1048 { return _pimpl->repoRefreshLocales.empty() ? Target::requestedLocales("") :_pimpl->repoRefreshLocales; }
1049
1050 bool ZConfig::repoLabelIsAlias() const
1051 { return _pimpl->repoLabelIsAlias; }
1052
1053 void ZConfig::repoLabelIsAlias( bool yesno_r )
1054 { _pimpl->repoLabelIsAlias = yesno_r; }
1055
1056 bool ZConfig::download_use_deltarpm() const
1057 { return _pimpl->download_use_deltarpm; }
1058
1059 bool ZConfig::download_use_deltarpm_always() const
1060 { return download_use_deltarpm() && _pimpl->download_use_deltarpm_always; }
1061
1062 bool ZConfig::download_media_prefer_download() const
1063 { return _pimpl->download_media_prefer_download; }
1064
1065 void ZConfig::set_download_media_prefer_download( bool yesno_r )
1066 { _pimpl->download_media_prefer_download.set( yesno_r ); }
1067
1068 void ZConfig::set_default_download_media_prefer_download()
1069 { _pimpl->download_media_prefer_download.restoreToDefault(); }
1070
1071 long ZConfig::download_max_concurrent_connections() const
1072 { return _pimpl->_mediaConf.download_max_concurrent_connections(); }
1073
1074 long ZConfig::download_min_download_speed() const
1075 { return _pimpl->_mediaConf.download_min_download_speed(); }
1076
1077 long ZConfig::download_max_download_speed() const
1078 { return _pimpl->_mediaConf.download_max_download_speed(); }
1079
1080 long ZConfig::download_max_silent_tries() const
1081 { return _pimpl->_mediaConf.download_max_silent_tries(); }
1082
1083 long ZConfig::download_transfer_timeout() const
1084 { return _pimpl->_mediaConf.download_transfer_timeout(); }
1085
1086 Pathname ZConfig::download_mediaMountdir() const { return _pimpl->download_mediaMountdir; }
1087 void ZConfig::set_download_mediaMountdir( Pathname newval_r ) { _pimpl->download_mediaMountdir.set( std::move(newval_r) ); }
1088 void ZConfig::set_default_download_mediaMountdir() { _pimpl->download_mediaMountdir.restoreToDefault(); }
1089
1090 DownloadMode ZConfig::commit_downloadMode() const
1091 { return _pimpl->commit_downloadMode; }
1092
1093
1094 bool ZConfig::gpgCheck() const { return _pimpl->gpgCheck; }
1095 TriBool ZConfig::repoGpgCheck() const { return _pimpl->repoGpgCheck; }
1096 TriBool ZConfig::pkgGpgCheck() const { return _pimpl->pkgGpgCheck; }
1097
1098 void ZConfig::setGpgCheck( bool val_r ) { _pimpl->gpgCheck.set( val_r ); }
1099 void ZConfig::setRepoGpgCheck( TriBool val_r ) { _pimpl->repoGpgCheck.set( val_r ); }
1100 void ZConfig::setPkgGpgCheck( TriBool val_r ) { _pimpl->pkgGpgCheck.set( val_r ); }
1101
1102 void ZConfig::resetGpgCheck() { _pimpl->gpgCheck.restoreToDefault(); }
1103 void ZConfig::resetRepoGpgCheck() { _pimpl->repoGpgCheck.restoreToDefault(); }
1104 void ZConfig::resetPkgGpgCheck() { _pimpl->pkgGpgCheck.restoreToDefault(); }
1105
1106
1107 ResolverFocus ZConfig::solver_focus() const { return _pimpl->targetDefaults().solver_focus; }
1108 bool ZConfig::solver_onlyRequires() const { return _pimpl->targetDefaults().solver_onlyRequires; }
1109 bool ZConfig::solver_allowVendorChange() const { return _pimpl->targetDefaults().solver_allowVendorChange; }
1110 bool ZConfig::solver_noUpdateProvide() const { return _pimpl->targetDefaults().solver_noUpdateProvide; }
1111 bool ZConfig::solver_dupAllowDowngrade() const { return _pimpl->targetDefaults().solver_dupAllowDowngrade; }
1112 bool ZConfig::solver_dupAllowNameChange() const { return _pimpl->targetDefaults().solver_dupAllowNameChange; }
1113 bool ZConfig::solver_dupAllowArchChange() const { return _pimpl->targetDefaults().solver_dupAllowArchChange; }
1114 bool ZConfig::solver_dupAllowVendorChange() const { return _pimpl->targetDefaults().solver_dupAllowVendorChange; }
1115 bool ZConfig::solver_cleandepsOnRemove() const { return _pimpl->targetDefaults().solver_cleandepsOnRemove; }
1116 unsigned ZConfig::solver_upgradeTestcasesToKeep() const { return _pimpl->targetDefaults().solver_upgradeTestcasesToKeep; }
1117
1118 bool ZConfig::solverUpgradeRemoveDroppedPackages() const { return _pimpl->targetDefaults().solverUpgradeRemoveDroppedPackages; }
1119 void ZConfig::setSolverUpgradeRemoveDroppedPackages( bool val_r ) { _pimpl->targetDefaults().solverUpgradeRemoveDroppedPackages.set( val_r ); }
1120 void ZConfig::resetSolverUpgradeRemoveDroppedPackages() { _pimpl->targetDefaults().solverUpgradeRemoveDroppedPackages.restoreToDefault(); }
1121
1122
1123 Pathname ZConfig::solver_checkSystemFile() const
1124 { return ( _pimpl->solver_checkSystemFile.empty()
1125 ? (configPath()/"systemCheck") : _pimpl->solver_checkSystemFile ); }
1126
1127 Pathname ZConfig::solver_checkSystemFileDir() const
1128 { return ( _pimpl->solver_checkSystemFileDir.empty()
1129 ? (configPath()/"systemCheck.d") : _pimpl->solver_checkSystemFileDir ); }
1130
1131
1132 namespace
1133 {
1134 inline void sigMultiversionSpecChanged()
1135 {
1136 if ( sat::detail::PoolMember::poolValid () )
1137 sat::detail::PoolMember::myPool().multiversionSpecChanged();
1138 }
1139 }
1140
1141 const std::set<std::string> & ZConfig::multiversionSpec() const { return _pimpl->multiversion(); }
1142 void ZConfig::multiversionSpec( std::set<std::string> new_r ) { _pimpl->multiversion().swap( new_r ); sigMultiversionSpecChanged(); }
1143 void ZConfig::clearMultiversionSpec() { _pimpl->multiversion().clear(); sigMultiversionSpecChanged(); }
1144 void ZConfig::addMultiversionSpec( const std::string & name_r ) { _pimpl->multiversion().insert( name_r ); sigMultiversionSpecChanged(); }
1145 void ZConfig::removeMultiversionSpec( const std::string & name_r ) { _pimpl->multiversion().erase( name_r ); sigMultiversionSpecChanged(); }
1146
1147 bool ZConfig::apply_locks_file() const
1148 { return _pimpl->apply_locks_file; }
1149
1150 Pathname ZConfig::update_dataPath()
1151#if LEGACY(1735)
1152 const
1153#endif
1154 {
1155 return Pathname("/var/adm");
1156 }
1157
1158 Pathname ZConfig::update_messagesPath()
1159#if LEGACY(1735)
1160 const
1161#endif
1162 {
1163 return Pathname(update_dataPath()/"update-messages");
1164 }
1165
1166 Pathname ZConfig::update_scriptsPath()
1167#if LEGACY(1735)
1168 const
1169#endif
1170 {
1171 return Pathname(update_dataPath()/"update-scripts");
1172 }
1173
1174 std::string ZConfig::updateMessagesNotify() const
1175 { return _pimpl->updateMessagesNotify; }
1176
1177 void ZConfig::setUpdateMessagesNotify( const std::string & val_r )
1178 { _pimpl->updateMessagesNotify.set( val_r ); }
1179
1180 void ZConfig::resetUpdateMessagesNotify()
1181 { _pimpl->updateMessagesNotify.restoreToDefault(); }
1182
1184
1185 target::rpm::RpmInstFlags ZConfig::rpmInstallFlags() const
1186 { return _pimpl->rpmInstallFlags; }
1187
1188
1189 Pathname ZConfig::historyLogFile() const
1190 {
1191 return ( _pimpl->history_log_path.empty() ?
1192 Pathname("/var/log/zypp/history") : _pimpl->history_log_path );
1193 }
1194
1195 Pathname ZConfig::credentialsGlobalDir() const
1196 {
1197 return _pimpl->_mediaConf.credentialsGlobalDir();
1198 }
1199
1200 Pathname ZConfig::credentialsGlobalFile() const
1201 {
1202 return _pimpl->_mediaConf.credentialsGlobalFile();
1203 }
1204
1206
1207 std::string ZConfig::distroverpkg() const
1208 { return "system-release"; }
1209
1211
1212 Pathname ZConfig::pluginsPath() const
1213 { return _pimpl->pluginsPath.get(); }
1214
1215 std::string ZConfig::multiversionKernels() const
1216 {
1217 return _pimpl->cfg_kernel_keep_spec;
1218 }
1219
1221
1222 std::ostream & ZConfig::about( std::ostream & str ) const
1223 {
1224 str << "libzypp: " LIBZYPP_VERSION_STRING << " (" << LIBZYPP_CODESTREAM << ")" << endl;
1225
1226 str << "libsolv: " << solv_version;
1227 if ( ::strcmp( solv_version, LIBSOLV_VERSION_STRING ) )
1228 str << " (built against " << LIBSOLV_VERSION_STRING << ")";
1229 str << endl;
1230
1231 str << "TextLocale: '" << textLocale() << "' (" << defaultTextLocale() << ")" << endl;
1232 str << "SystemArchitecture: '" << systemArchitecture() << "' (" << defaultSystemArchitecture() << ")" << endl;
1233 return str;
1234 }
1235
1237} // namespace zypp
for_
#define for_(IT, BEG, END)
Convenient for-loops using iterator.
Definition Easy.h:27
Errno.h
IOStream.h
LogTools.h
pWAR
#define pWAR
Definition LogTools.h:316
pMIL
#define pMIL
Definition LogTools.h:315
pDBG
#define pDBG
Definition LogTools.h:314
DBG
#define DBG
Definition Logger.h:129
MIL
#define MIL
Definition Logger.h:130
ERR
#define ERR
Definition Logger.h:132
WAR
#define WAR
Definition Logger.h:131
Pool.h
Regex.h
String.h
ZConfig.h
ZYppFactory.h
Target_Ptr
zypp::Arch
Architecture.
Definition Arch.h:37
zypp::Arch::detectSystemArchitecture
static Arch detectSystemArchitecture()
Determine system architecture evaluating uname and /proc/cpuinfo.
Definition Arch.cc:701
zypp::Errno::Errno
Errno()
Default ctor: errno.
Definition Errno.h:29
zypp::InputStream
Helper to create and pass std::istream.
Definition inputstream.h:57
zypp::Locale
'Language[_Country]' codes.
Definition Locale.h:51
zypp::Locale::enCode
static const Locale enCode
Last resort "en".
Definition Locale.h:78
zypp::MediaConfig
Definition mediaconfig.h:43
zypp::MediaConfig::instance
static MediaConfig & instance()
Definition mediaconfig.cc:46
zypp::Pathname::Pathname
Pathname()
Default ctor: an empty path.
Definition Pathname.h:51
zypp::Pathname::assertprefix
static Pathname assertprefix(const Pathname &root_r, const Pathname &path_r)
Unless path_r does not already denote a path below root_r, combine them.
Definition Pathname.cc:272
zypp::Target::requestedLocales
LocaleSet requestedLocales() const
Languages to be supported by the system.
Definition Target.cc:94
zypp::ZConfig::Impl
ZConfig implementation.
Definition ZConfig.cc:236
zypp::ZConfig::Impl::cfg_multiversion_path
Pathname cfg_multiversion_path
Definition ZConfig.cc:645
zypp::ZConfig::Impl::download_mediaMountdir
DefaultOption< Pathname > download_mediaMountdir
Definition ZConfig.cc:659
zypp::ZConfig::Impl::_mediaConf
MediaConfig & _mediaConf
Definition ZConfig.cc:688
zypp::ZConfig::Impl::cfg_metadata_path
DefaultOption< Pathname > cfg_metadata_path
Definition ZConfig.cc:634
zypp::ZConfig::Impl::cfg_known_repos_path
Pathname cfg_known_repos_path
Definition ZConfig.cc:639
zypp::ZConfig::Impl::cfg_known_services_path
Pathname cfg_known_services_path
Definition ZConfig.cc:640
zypp::ZConfig::Impl::_autodetectSystemRoot
Pathname _autodetectSystemRoot() const
bsc#1237044: Provide announceSystemRoot to allow commands using –root without launching a Target.
Definition ZConfig.cc:598
zypp::ZConfig::Impl::cfg_vars_path
Pathname cfg_vars_path
Definition ZConfig.cc:641
zypp::ZConfig::Impl::operator=
Impl & operator=(const Impl &)=delete
zypp::ZConfig::Impl::operator=
Impl & operator=(Impl &&)=delete
zypp::ZConfig::Impl::cfg_packages_path
DefaultOption< Pathname > cfg_packages_path
Definition ZConfig.cc:636
zypp::ZConfig::Impl::download_use_deltarpm_always
bool download_use_deltarpm_always
Definition ZConfig.cc:657
zypp::ZConfig::Impl::notifyTargetChanged
void notifyTargetChanged()
Definition ZConfig.cc:604
zypp::ZConfig::Impl::solver_checkSystemFile
Pathname solver_checkSystemFile
Definition ZConfig.cc:667
zypp::ZConfig::Impl::Impl
Impl(const Impl &)=delete
zypp::ZConfig::Impl::_multiversionMap
MultiversionMap _multiversionMap
Definition ZConfig.cc:785
zypp::ZConfig::Impl::apply_locks_file
bool apply_locks_file
Definition ZConfig.cc:673
zypp::ZConfig::Impl::history_log_path
Pathname history_log_path
Definition ZConfig.cc:677
zypp::ZConfig::Impl::locks_file
Pathname locks_file
Definition ZConfig.cc:647
zypp::ZConfig::Impl::targetDefaults
const TargetDefaults & targetDefaults() const
Definition ZConfig.cc:692
zypp::ZConfig::Impl::getMultiversion
MultiversionSpec & getMultiversion() const
Definition ZConfig.cc:782
zypp::ZConfig::Impl::Impl
Impl(Impl &&)=delete
zypp::ZConfig::Impl::repoRefreshLocales
LocaleSet repoRefreshLocales
Definition ZConfig.cc:653
zypp::ZConfig::Impl::cfg_cache_path
DefaultOption< Pathname > cfg_cache_path
Definition ZConfig.cc:633
zypp::ZConfig::Impl::geoipHosts
std::vector< std::string > geoipHosts
Definition ZConfig.cc:685
zypp::ZConfig::Impl::targetDefaults
TargetDefaults & targetDefaults()
Definition ZConfig.cc:693
zypp::ZConfig::Impl::~Impl
~Impl()
Definition ZConfig.cc:589
zypp::ZConfig::Impl::_announced_root_path
Pathname _announced_root_path
Definition ZConfig.cc:626
zypp::ZConfig::Impl::pluginsPath
Option< Pathname > pluginsPath
Definition ZConfig.cc:681
zypp::ZConfig::Impl::userData
std::string userData
Definition ZConfig.cc:679
zypp::ZConfig::Impl::cfg_kernel_keep_spec
std::string cfg_kernel_keep_spec
Definition ZConfig.cc:646
zypp::ZConfig::Impl::cfg_lockTimeout
long cfg_lockTimeout
Definition ZConfig.cc:628
zypp::ZConfig::Impl::repoGpgCheck
DefaultOption< TriBool > repoGpgCheck
Definition ZConfig.cc:664
zypp::ZConfig::Impl::repo_refresh_delay
unsigned repo_refresh_delay
Definition ZConfig.cc:652
zypp::ZConfig::Impl::commit_downloadMode
Option< DownloadMode > commit_downloadMode
Definition ZConfig.cc:661
zypp::ZConfig::Impl::_currentTargetDefaults
std::optional< TargetDefaults > _currentTargetDefaults
TargetDefaults while –root.
Definition ZConfig.cc:696
zypp::ZConfig::Impl::repo_add_probe
bool repo_add_probe
Definition ZConfig.cc:651
zypp::ZConfig::Impl::multiversion
MultiversionSpec & multiversion()
Definition ZConfig.cc:670
zypp::ZConfig::Impl::cfg_textLocale
Locale cfg_textLocale
Definition ZConfig.cc:631
zypp::ZConfig::Impl::cfg_arch
Arch cfg_arch
Definition ZConfig.cc:630
zypp::ZConfig::Impl::geoipEnabled
bool geoipEnabled
Definition ZConfig.cc:683
zypp::ZConfig::Impl::download_media_prefer_download
DefaultOption< bool > download_media_prefer_download
Definition ZConfig.cc:658
zypp::ZConfig::Impl::download_use_deltarpm
bool download_use_deltarpm
Definition ZConfig.cc:656
zypp::ZConfig::Impl::MultiversionSpec
std::set< std::string > MultiversionSpec
Definition ZConfig.cc:237
zypp::ZConfig::Impl::repoLabelIsAlias
bool repoLabelIsAlias
Definition ZConfig.cc:654
zypp::ZConfig::Impl::solver_checkSystemFileDir
Pathname solver_checkSystemFileDir
Definition ZConfig.cc:668
zypp::ZConfig::Impl::cfg_config_path
Pathname cfg_config_path
Definition ZConfig.cc:638
zypp::ZConfig::Impl::_initialTargetDefaults
TargetDefaults _initialTargetDefaults
Initial TargetDefaults from /.
Definition ZConfig.cc:695
zypp::ZConfig::Impl::rpmInstallFlags
target::rpm::RpmInstFlags rpmInstallFlags
Definition ZConfig.cc:675
zypp::ZConfig::Impl::multiversion
const MultiversionSpec & multiversion() const
Definition ZConfig.cc:671
zypp::ZConfig::Impl::cfg_repo_mgr_root_path
Pathname cfg_repo_mgr_root_path
Definition ZConfig.cc:642
zypp::ZConfig::Impl::pkgGpgCheck
DefaultOption< TriBool > pkgGpgCheck
Definition ZConfig.cc:665
zypp::ZConfig::Impl::updateMessagesNotify
DefaultOption< std::string > updateMessagesNotify
Definition ZConfig.cc:649
zypp::ZConfig::Impl::cfg_vendor_path
Pathname cfg_vendor_path
Definition ZConfig.cc:644
zypp::ZConfig::Impl::cfg_solvfiles_path
DefaultOption< Pathname > cfg_solvfiles_path
Definition ZConfig.cc:635
zypp::ZConfig::Impl::Impl
Impl()
Definition ZConfig.cc:325
zypp::ZConfig::Impl::gpgCheck
DefaultOption< bool > gpgCheck
Definition ZConfig.cc:663
zypp::ZConfig::hasUserData
bool hasUserData() const
Whether a (non empty) user data sting is defined.
Definition ZConfig.cc:899
zypp::ZConfig::solver_cleandepsOnRemove
bool solver_cleandepsOnRemove() const
Whether removing a package should also remove no longer needed requirements.
Definition ZConfig.cc:1115
zypp::ZConfig::userData
std::string userData() const
User defined string value to be passed to log, history, plugins...
Definition ZConfig.cc:902
zypp::ZConfig::knownServicesPath
Pathname knownServicesPath() const
Path where the known services .service files are kept (configPath()/services.d).
Definition ZConfig.cc:997
zypp::ZConfig::removeMultiversionSpec
void removeMultiversionSpec(const std::string &name_r)
Definition ZConfig.cc:1145
zypp::ZConfig::repoPackagesPath
Pathname repoPackagesPath() const
Path where the repo packages are downloaded and kept (repoCachePath()/packages).
Definition ZConfig.cc:960
zypp::ZConfig::repo_refresh_delay
unsigned repo_refresh_delay() const
Amount of time in minutes that must pass before another refresh.
Definition ZConfig.cc:1044
zypp::ZConfig::systemArchitecture
Arch systemArchitecture() const
The system architecture zypp uses.
Definition ZConfig.cc:857
zypp::ZConfig::textLocale
Locale textLocale() const
The locale for translated texts zypp uses.
Definition ZConfig.cc:881
zypp::ZConfig::geoipHostnames
const std::vector< std::string > geoipHostnames() const
All hostnames we want to rewrite using the geoip feature.
Definition ZConfig.cc:1018
zypp::ZConfig::ZConfig
ZConfig(const ZConfig &)=delete
zypp::ZConfig::update_dataPath
static Pathname update_dataPath()
Path where the update items are kept (/var/adm).
Definition ZConfig.cc:1150
zypp::ZConfig::solver_focus
ResolverFocus solver_focus() const
The resolver's general attitude when resolving jobs.
Definition ZConfig.cc:1107
zypp::ZConfig::builtinRepoSolvfilesPath
Pathname builtinRepoSolvfilesPath() const
The builtin config file value.
Definition ZConfig.cc:977
zypp::ZConfig::pluginsPath
Pathname pluginsPath() const
Defaults to /usr/lib/zypp/plugins.
Definition ZConfig.cc:1212
zypp::ZConfig::repoManagerRoot
Pathname repoManagerRoot() const
The RepoManager root directory.
Definition ZConfig.cc:834
zypp::ZConfig::resetRepoGpgCheck
void resetRepoGpgCheck()
Reset to the zconfig default.
Definition ZConfig.cc:1103
zypp::ZConfig::gpgCheck
bool gpgCheck() const
Turn signature checking on/off (on).
Definition ZConfig.cc:1094
zypp::ZConfig::knownReposPath
Pathname knownReposPath() const
Path where the known repositories .repo files are kept (configPath()/repos.d).
Definition ZConfig.cc:991
zypp::ZConfig::download_transfer_timeout
long download_transfer_timeout() const
Maximum time in seconds that you allow a transfer operation to take.
Definition ZConfig.cc:1083
zypp::ZConfig::setRepoManagerRoot
void setRepoManagerRoot(const Pathname &root)
Sets the RepoManager root directory.
Definition ZConfig.cc:840
zypp::ZConfig::solver_dupAllowArchChange
bool solver_dupAllowArchChange() const
DUP tune: Whether to allow package arch changes upon DUP.
Definition ZConfig.cc:1113
zypp::ZConfig::setTextLocale
void setTextLocale(const Locale &locale_r)
Set the preferred locale for translated texts.
Definition ZConfig.cc:884
zypp::ZConfig::solverUpgradeRemoveDroppedPackages
bool solverUpgradeRemoveDroppedPackages() const
Whether dist upgrade should remove a products dropped packages (true).
Definition ZConfig.cc:1118
zypp::ZConfig::notifyTargetChanged
void notifyTargetChanged()
internal
Definition ZConfig.cc:828
zypp::ZConfig::defaultTextLocale
static Locale defaultTextLocale()
The autodetected preferred locale for translated texts.
Definition ZConfig.cc:875
zypp::ZConfig::download_mediaMountdir
Pathname download_mediaMountdir() const
Path where media are preferably mounted or downloaded.
Definition ZConfig.cc:1086
zypp::ZConfig::update_scriptsPath
static Pathname update_scriptsPath()
Path where the update scripts are stored ( /var/adm/update-scripts ).
Definition ZConfig.cc:1166
zypp::ZConfig::resetSolverUpgradeRemoveDroppedPackages
void resetSolverUpgradeRemoveDroppedPackages()
Reset solverUpgradeRemoveDroppedPackages to the zypp.conf default.
Definition ZConfig.cc:1120
zypp::ZConfig::apply_locks_file
bool apply_locks_file() const
Whether locks file should be read and applied after start (true).
Definition ZConfig.cc:1147
zypp::ZConfig::solver_allowVendorChange
bool solver_allowVendorChange() const
Whether vendor check is by default enabled.
Definition ZConfig.cc:1109
zypp::ZConfig::set_default_download_mediaMountdir
void set_default_download_mediaMountdir()
Reset to zypp.cong default.
Definition ZConfig.cc:1088
zypp::ZConfig::solver_noUpdateProvide
bool solver_noUpdateProvide() const
Do not prefer update candidates also providing the old package.
Definition ZConfig.cc:1110
zypp::ZConfig::repoCachePath
Pathname repoCachePath() const
Path where the caches are kept (/var/cache/zypp).
Definition ZConfig.cc:922
zypp::ZConfig::setPkgGpgCheck
void setPkgGpgCheck(TriBool val_r)
Change the value.
Definition ZConfig.cc:1100
zypp::ZConfig::needrebootPath
Pathname needrebootPath() const
Path where the custom needreboot config files are kept (configPath()/needreboot.d).
Definition ZConfig.cc:1006
zypp::ZConfig::setUserData
bool setUserData(const std::string &str_r)
Set a new userData string.
Definition ZConfig.cc:905
zypp::ZConfig::systemRoot
Pathname systemRoot() const
The target root directory.
Definition ZConfig.cc:831
zypp::ZConfig::download_max_silent_tries
long download_max_silent_tries() const
Maximum silent tries.
Definition ZConfig.cc:1080
zypp::ZConfig::repo_add_probe
bool repo_add_probe() const
Whether repository urls should be probed.
Definition ZConfig.cc:1041
zypp::ZConfig::rpmInstallFlags
target::rpm::RpmInstFlags rpmInstallFlags() const
The default target::rpm::RpmInstFlags for ZYppCommitPolicy.
Definition ZConfig.cc:1185
zypp::ZConfig::setUpdateMessagesNotify
void setUpdateMessagesNotify(const std::string &val_r)
Set a new command definition (see update.messages.notify in zypp.conf).
Definition ZConfig.cc:1177
zypp::ZConfig::solver_upgradeTestcasesToKeep
unsigned solver_upgradeTestcasesToKeep() const
When committing a dist upgrade (e.g.
Definition ZConfig.cc:1116
zypp::ZConfig::repoMetadataPath
Pathname repoMetadataPath() const
Path where the repo metadata is downloaded and kept (repoCachePath()/raw).
Definition ZConfig.cc:938
zypp::ZConfig::geoipCachePath
Pathname geoipCachePath() const
Path where the geoip caches are kept (/var/cache/zypp/geoip).
Definition ZConfig.cc:1015
zypp::ZConfig::vendorPath
Pathname vendorPath() const
Directory for equivalent vendor definitions (configPath()/vendors.d).
Definition ZConfig.cc:1027
zypp::ZConfig::download_min_download_speed
long download_min_download_speed() const
Minimum download speed (bytes per second) until the connection is dropped.
Definition ZConfig.cc:1074
zypp::ZConfig::commit_downloadMode
DownloadMode commit_downloadMode() const
Commit download policy to use as default.
Definition ZConfig.cc:1090
zypp::ZConfig::needrebootFile
Pathname needrebootFile() const
Path of the default needreboot config file (configPath()/needreboot).
Definition ZConfig.cc:1003
zypp::ZConfig::setGpgCheck
void setGpgCheck(bool val_r)
Change the value.
Definition ZConfig.cc:1098
zypp::ZConfig::solver_dupAllowVendorChange
bool solver_dupAllowVendorChange() const
DUP tune: Whether to allow package vendor changes upon DUP.
Definition ZConfig.cc:1114
zypp::ZConfig::~ZConfig
~ZConfig()
Dtor.
Definition ZConfig.cc:816
zypp::ZConfig::setGeoipEnabled
void setGeoipEnabled(bool enable=true)
Enables or disables the use of the geoip feature of download.opensuse.org.
Definition ZConfig.cc:1009
zypp::ZConfig::locksFile
Pathname locksFile() const
Path where zypp can find or create lock file (configPath()/locks).
Definition ZConfig.cc:1033
zypp::ZConfig::_pimpl
RW_pointer< Impl, rw_pointer::Scoped< Impl > > _pimpl
Pointer to implementation.
Definition ZConfig.h:654
zypp::ZConfig::repoSolvfilesPath
Pathname repoSolvfilesPath() const
Path where the repo solv files are created and kept (repoCachePath()/solv).
Definition ZConfig.cc:949
zypp::ZConfig::geoipEnabled
bool geoipEnabled() const
Returns true if zypp should use the geoip feature of download.opensuse.org.
Definition ZConfig.cc:1012
zypp::ZConfig::update_messagesPath
static Pathname update_messagesPath()
Path where the update messages are stored ( /var/adm/update-messages ).
Definition ZConfig.cc:1158
zypp::ZConfig::historyLogFile
Pathname historyLogFile() const
Path where ZYpp install history is logged.
Definition ZConfig.cc:1189
zypp::ZConfig::setSystemArchitecture
void setSystemArchitecture(const Arch &arch_r)
Override the zypp system architecture.
Definition ZConfig.cc:860
zypp::ZConfig::pkgGpgCheck
TriBool pkgGpgCheck() const
Check rpm package signatures (indeterminate - according to gpgcheck).
Definition ZConfig.cc:1096
zypp::ZConfig::instance
static ZConfig & instance()
Singleton ctor.
Definition ZConfig.cc:794
zypp::ZConfig::setRepoPackagesPath
void setRepoPackagesPath(const Pathname &path_r)
Set a new path as the default repo cache path.
Definition ZConfig.cc:966
zypp::ZConfig::setRepoSolvfilesPath
void setRepoSolvfilesPath(const Pathname &path_r)
Set a new path as the default repo cache path.
Definition ZConfig.cc:955
zypp::ZConfig::resetUpdateMessagesNotify
void resetUpdateMessagesNotify()
Reset to the zypp.conf default.
Definition ZConfig.cc:1180
zypp::ZConfig::about
std::ostream & about(std::ostream &str) const
Print some detail about the current libzypp version.
Definition ZConfig.cc:1222
zypp::ZConfig::multiversionSpec
const std::set< std::string > & multiversionSpec() const
Definition ZConfig.cc:1141
zypp::ZConfig::set_download_mediaMountdir
void set_download_mediaMountdir(Pathname newval_r)
Set alternate value.
Definition ZConfig.cc:1087
zypp::ZConfig::download_use_deltarpm
bool download_use_deltarpm() const
Whether to consider using a deltarpm when downloading a package.
Definition ZConfig.cc:1056
zypp::ZConfig::repoGpgCheck
TriBool repoGpgCheck() const
Check repo matadata signatures (indeterminate - according to gpgcheck).
Definition ZConfig.cc:1095
zypp::ZConfig::set_download_media_prefer_download
void set_download_media_prefer_download(bool yesno_r)
Set download_media_prefer_download to a specific value.
Definition ZConfig.cc:1065
zypp::ZConfig::updateMessagesNotify
std::string updateMessagesNotify() const
Command definition for sending update messages.
Definition ZConfig.cc:1174
zypp::ZConfig::addMultiversionSpec
void addMultiversionSpec(const std::string &name_r)
Definition ZConfig.cc:1144
zypp::ZConfig::builtinRepoCachePath
Pathname builtinRepoCachePath() const
The builtin config file value.
Definition ZConfig.cc:971
zypp::ZConfig::builtinRepoPackagesPath
Pathname builtinRepoPackagesPath() const
The builtin config file value.
Definition ZConfig.cc:980
zypp::ZConfig::solver_checkSystemFile
Pathname solver_checkSystemFile() const
File in which dependencies described which has to be fulfilled for a running system.
Definition ZConfig.cc:1123
zypp::ZConfig::builtinRepoMetadataPath
Pathname builtinRepoMetadataPath() const
The builtin config file value.
Definition ZConfig.cc:974
zypp::ZConfig::set_default_download_media_prefer_download
void set_default_download_media_prefer_download()
Set download_media_prefer_download to the configfiles default.
Definition ZConfig.cc:1068
zypp::ZConfig::lockTimeout
long lockTimeout() const
The number of seconds to wait for the zypp lock to become available.
Definition ZConfig.cc:819
zypp::ZConfig::solver_checkSystemFileDir
Pathname solver_checkSystemFileDir() const
Directory, which may or may not contain files in which dependencies described which has to be fulfill...
Definition ZConfig.cc:1127
zypp::ZConfig::resetGpgCheck
void resetGpgCheck()
Reset to the zconfig default.
Definition ZConfig.cc:1102
zypp::ZConfig::setSolverUpgradeRemoveDroppedPackages
void setSolverUpgradeRemoveDroppedPackages(bool val_r)
Set solverUpgradeRemoveDroppedPackages to val_r.
Definition ZConfig.cc:1119
zypp::ZConfig::configPath
Pathname configPath() const
Path where the configfiles are kept (/etc/zypp).
Definition ZConfig.cc:985
zypp::ZConfig::defaultSystemArchitecture
static Arch defaultSystemArchitecture()
The autodetected system architecture.
Definition ZConfig.cc:852
zypp::ZConfig::pubkeyCachePath
Pathname pubkeyCachePath() const
Path where the pubkey caches.
Definition ZConfig.cc:928
zypp::ZConfig::download_max_concurrent_connections
long download_max_concurrent_connections() const
Maximum number of concurrent connections for a single transfer.
Definition ZConfig.cc:1071
zypp::ZConfig::resetPkgGpgCheck
void resetPkgGpgCheck()
Reset to the zconfig default.
Definition ZConfig.cc:1104
zypp::ZConfig::announceSystemRoot
void announceSystemRoot(const Pathname &root_r)
Announce a target root directory without launching the Target.
Definition ZConfig.cc:843
zypp::ZConfig::solver_onlyRequires
bool solver_onlyRequires() const
Solver regards required packages,patterns,... only.
Definition ZConfig.cc:1108
zypp::ZConfig::varsPath
Pathname varsPath() const
Path containing custom repo variable definitions (configPath()/vars.d).
Definition ZConfig.cc:1021
zypp::ZConfig::solver_dupAllowNameChange
bool solver_dupAllowNameChange() const
DUP tune: Whether to follow package renames upon DUP.
Definition ZConfig.cc:1112
zypp::ZConfig::repoLabelIsAlias
bool repoLabelIsAlias() const
Whether to use repository alias or name in user messages (progress, exceptions, .....
Definition ZConfig.cc:1050
zypp::ZConfig::clearMultiversionSpec
void clearMultiversionSpec()
Definition ZConfig.cc:1143
zypp::ZConfig::repoRefreshLocales
LocaleSet repoRefreshLocales() const
List of locales for which translated package descriptions should be downloaded.
Definition ZConfig.cc:1047
zypp::ZConfig::download_max_download_speed
long download_max_download_speed() const
Maximum download speed (bytes per second).
Definition ZConfig.cc:1077
zypp::ZConfig::setRepoMetadataPath
void setRepoMetadataPath(const Pathname &path_r)
Set a new path as the default repo cache path.
Definition ZConfig.cc:944
zypp::ZConfig::solver_dupAllowDowngrade
bool solver_dupAllowDowngrade() const
DUP tune: Whether to allow version downgrades upon DUP.
Definition ZConfig.cc:1111
zypp::ZConfig::multiversionKernels
std::string multiversionKernels() const
Definition ZConfig.cc:1215
zypp::ZConfig::distroverpkg
std::string distroverpkg() const
Package telling the "product version" on systems not using /etc/product.d/baseproduct.
Definition ZConfig.cc:1207
zypp::ZConfig::download_use_deltarpm_always
bool download_use_deltarpm_always() const
Whether to consider using a deltarpm even when rpm is local.
Definition ZConfig.cc:1059
zypp::ZConfig::setRepoCachePath
void setRepoCachePath(const Pathname &path_r)
Set a new path as the default repo cache path.
Definition ZConfig.cc:933
zypp::ZConfig::setRepoGpgCheck
void setRepoGpgCheck(TriBool val_r)
Change the value.
Definition ZConfig.cc:1099
zypp::ZConfig::credentialsGlobalDir
Pathname credentialsGlobalDir() const
Defaults to /etc/zypp/credentials.d.
Definition ZConfig.cc:1195
zypp::ZConfig::download_media_prefer_download
bool download_media_prefer_download() const
Hint which media to prefer when installing packages (download vs.
Definition ZConfig.cc:1062
zypp::ZConfig::credentialsGlobalFile
Pathname credentialsGlobalFile() const
Defaults to /etc/zypp/credentials.cat.
Definition ZConfig.cc:1200
zypp::filesystem::PathInfo::path
const Pathname & path() const
Return current Pathname.
Definition PathInfo.h:251
zypp::filesystem::PathInfo::isFile
bool isFile() const
Definition PathInfo.h:295
zypp::filesystem::Pathname
Pathname.
Definition Pathname.h:48
zypp::filesystem::Pathname::emptyOrRoot
bool emptyOrRoot() const
Test for "" or "/".
Definition Pathname.h:127
zypp::filesystem::Pathname::empty
bool empty() const
Test for an empty path.
Definition Pathname.h:117
zypp::sat::Pool::setTextLocale
void setTextLocale(const Locale &locale_r)
Set the default language for retrieving translated texts.
Definition Pool.cc:233
zypp::sat::Pool::instance
static Pool instance()
Singleton ctor.
Definition Pool.h:55
zypp::sat::detail::PoolImpl::multiversionSpecChanged
void multiversionSpecChanged()
Definition PoolImpl.cc:626
zypp::TriBool
boost::logic::tribool TriBool
3-state boolean logic (true, false and indeterminate).
Definition String.h:31
std
Definition ansi.h:855
str
String related utilities and Regular expression matching.
zypp::env
Namespace intended to collect all environment variables we use.
Definition RepoVariables.cc:34
zypp::env::ZYPP_CONF
std::optional< Pathname > ZYPP_CONF()
Definition ZConfig.cc:46
zypp::filesystem
Types and functions for filesystem operations.
Definition Glob.cc:24
zypp::filesystem::dirForEach
int dirForEach(const Pathname &dir_r, const StrMatcher &matcher_r, function< bool(const Pathname &, const char *const)> fnc_r)
Definition PathInfo.cc:32
zypp::iostr::simpleParseFile
int simpleParseFile(std::istream &str_r, ParseFlags flags_r, function< bool(int, std::string)> consume_r)
Simple lineparser optionally trimming and skipping comments.
Definition IOStream.cc:124
zypp::parser
Definition HistoryLogReader.cc:30
zypp::str::strToBool
bool strToBool(const C_Str &str, bool default_r)
Parse str into a bool depending on the default value.
Definition String.h:500
zypp::str::strtonum
TInt strtonum(const C_Str &str)
Parsing numbers from string.
zypp::str::sconcat
std::string sconcat(Args &&... args)
Concat words as string.
Definition LogTools.h:276
zypp::str::splitEscaped
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.
Definition String.h:665
zypp::target
Definition KeyRing.h:325
zypp
Easy-to use interface to the ZYPP dependency resolver.
Definition CodePitfalls.doc:2
zypp::LocaleSet
std::unordered_set< Locale > LocaleSet
Definition Locale.h:29
zypp::ResolverFocus
ResolverFocus
The resolver's general attitude.
Definition ResolverFocus.h:24
zypp::ResolverFocus::Default
@ Default
Request the standard behavior (as defined in zypp.conf or 'Job').
Definition ResolverFocus.h:25
zypp::fromString
bool fromString(const std::string &val_r, ResolverFocus &ret_r)
relates: ResolverFocus Conversion from string (enumerator name, case insensitive, empty string is Def...
Definition ResolverFocus.cc:39
zypp::getZYpp
ZYpp::Ptr getZYpp()
relates: ZYppFactory Convenience to get the Pointer to the ZYpp instance.
Definition ZYppFactory.h:77
zypp::dump
detail::Dump< Tp > dump(const Tp &obj_r)
Definition LogTools.h:772
zypp::DownloadMode
DownloadMode
Supported commit download policies.
Definition DownloadMode.h:25
zypp::DownloadDefault
@ DownloadDefault
libzypp will decide what to do.
Definition DownloadMode.h:26
PoolImpl.h
zypp::DefaultOption
Mutable option with initial value also remembering a config value.
Definition ZConfig.cc:194
zypp::DefaultOption::DefaultOption
DefaultOption(value_type initial_r)
Definition ZConfig.cc:198
zypp::DefaultOption::_default
option_type _default
Definition ZConfig.cc:223
zypp::DefaultOption::setDefault
void setDefault(value_type newval_r)
Set a new default value.
Definition ZConfig.cc:219
zypp::DefaultOption::value_type
Tp value_type
Definition ZConfig.cc:195
zypp::DefaultOption::restoreToDefault
void restoreToDefault(value_type newval_r)
Reset value to a new default.
Definition ZConfig.cc:211
zypp::DefaultOption::operator=
DefaultOption & operator=(value_type newval_r)
Definition ZConfig.cc:203
zypp::DefaultOption::restoreToDefault
void restoreToDefault()
Reset value to the current default.
Definition ZConfig.cc:207
zypp::DefaultOption::option_type
Option< Tp > option_type
Definition ZConfig.cc:196
zypp::DefaultOption::getDefault
const value_type & getDefault() const
Get the current default value.
Definition ZConfig.cc:215
zypp::Option
Mutable option.
Definition ZConfig.cc:164
zypp::Option::get
const value_type & get() const
Get the value.
Definition ZConfig.cc:176
zypp::Option::operator=
Option & operator=(value_type newval_r)
Definition ZConfig.cc:172
zypp::Option::set
void set(value_type newval_r)
Set a new value.
Definition ZConfig.cc:184
zypp::Option::Option
Option(value_type initial_r)
No default ctor, explicit initialisation!
Definition ZConfig.cc:168
zypp::Option::value_type
Tp value_type
Definition ZConfig.cc:165
zypp::Option::_val
value_type _val
Definition ZConfig.cc:188
zypp::ZConfig::Impl::MultiversionMap
Definition ZConfig.cc:705
zypp::ZConfig::Impl::MultiversionMap::getSpec
MultiversionSpec & getSpec(Pathname root_r, const Impl &zConfImpl_r)
Definition ZConfig.cc:708
zypp::ZConfig::Impl::MultiversionMap::getDefaultSpec
MultiversionSpec & getDefaultSpec()
Definition ZConfig.cc:735
zypp::ZConfig::Impl::MultiversionMap::scanDirAt
void scanDirAt(const Pathname &root_r, MultiversionSpec &spec_r, const Impl &zConfImpl_r)
Definition ZConfig.cc:754
zypp::ZConfig::Impl::MultiversionMap::_specMap
SpecMap _specMap
Definition ZConfig.cc:779
zypp::ZConfig::Impl::MultiversionMap::scanConfAt
bool scanConfAt(const Pathname &root_r, MultiversionSpec &spec_r, const Impl &zConfImpl_r)
Definition ZConfig.cc:739
zypp::ZConfig::Impl::MultiversionMap::SpecMap
std::map< Pathname, MultiversionSpec > SpecMap
Definition ZConfig.cc:706
zypp::ZConfig::Impl::TargetDefaults
Settings that follow a changed Target.
Definition ZConfig.cc:241
zypp::ZConfig::Impl::TargetDefaults::solver_dupAllowVendorChange
Option< bool > solver_dupAllowVendorChange
Definition ZConfig.cc:317
zypp::ZConfig::Impl::TargetDefaults::solverUpgradeRemoveDroppedPackages
DefaultOption< bool > solverUpgradeRemoveDroppedPackages
Definition ZConfig.cc:321
zypp::ZConfig::Impl::TargetDefaults::TargetDefaults
TargetDefaults()
Definition ZConfig.cc:242
zypp::ZConfig::Impl::TargetDefaults::solver_upgradeTestcasesToKeep
Option< unsigned > solver_upgradeTestcasesToKeep
Definition ZConfig.cc:320
zypp::ZConfig::Impl::TargetDefaults::solver_dupAllowDowngrade
Option< bool > solver_dupAllowDowngrade
Definition ZConfig.cc:314
zypp::ZConfig::Impl::TargetDefaults::consume
bool consume(const std::string &section, const std::string &entry, const std::string &value)
Definition ZConfig.cc:256
zypp::ZConfig::Impl::TargetDefaults::solver_dupAllowArchChange
Option< bool > solver_dupAllowArchChange
Definition ZConfig.cc:316
zypp::ZConfig::Impl::TargetDefaults::solver_onlyRequires
Option< bool > solver_onlyRequires
Definition ZConfig.cc:312
zypp::ZConfig::Impl::TargetDefaults::solver_focus
ResolverFocus solver_focus
Definition ZConfig.cc:311
zypp::ZConfig::Impl::TargetDefaults::solver_cleandepsOnRemove
Option< bool > solver_cleandepsOnRemove
Definition ZConfig.cc:318
zypp::ZConfig::Impl::TargetDefaults::solver_allowVendorChange
Option< bool > solver_allowVendorChange
Definition ZConfig.cc:313
zypp::ZConfig::Impl::TargetDefaults::solver_dupAllowNameChange
Option< bool > solver_dupAllowNameChange
Definition ZConfig.cc:315
zypp::ZConfig::Impl::TargetDefaults::solver_noUpdateProvide
Option< bool > solver_noUpdateProvide
Definition ZConfig.cc:319
zypp::sat::detail::PoolMember::myPool
static PoolImpl & myPool()
Definition PoolMember.cc:41
zypp::sat::detail::PoolMember::poolValid
static bool poolValid()
Definition PoolMember.cc:48
PathInfo.h