libzypp: zypp/ZConfig.cc Source File

libzypp 17.38.6

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