libzypp: zypp/ZConfig.cc Source File

libzypp 17.25.10

ZConfig.cc
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | ____ _ __ __ ___ |
3 | |__ / \ / / . \ . \ |
4 | / / \ V /| _/ _/ |
5 | / /__ | | | | | | |
6 | /_____||_| |_| |_| |
7 | |
8 \---------------------------------------------------------------------*/
12 extern "C"
13 {
14 #include <features.h>
15 #include <sys/utsname.h>
16 #if __GLIBC_PREREQ (2,16)
17 #include <sys/auxv.h> // getauxval for PPC64P7 detection
18 #endif
19 #include <unistd.h>
20 #include <solv/solvversion.h>
21 }
22 #include <iostream>
23 #include <fstream>
24 #include <zypp/base/LogTools.h>
25 #include <zypp/base/IOStream.h>
26 #include <zypp/base/InputStream.h>
27 #include <zypp/base/String.h>
28 #include <zypp/base/Regex.h>
29
30 #include <zypp/ZConfig.h>
31 #include <zypp/ZYppFactory.h>
32 #include <zypp/PathInfo.h>
33 #include <zypp/parser/IniDict.h>
34
35 #include <zypp/sat/Pool.h>
36 #include <zypp/sat/detail/PoolImpl.h>
37
38 using std::endl;
39 using namespace zypp::filesystem;
40 using namespace zypp::parser;
41
42 #undef ZYPP_BASE_LOGGER_LOGGROUP
43 #define ZYPP_BASE_LOGGER_LOGGROUP "zconfig"
44
46 namespace zypp
47 {
58 namespace
59 {
60
63 Arch _autodetectSystemArchitecture()
64 {
65 struct ::utsname buf;
66 if ( ::uname( &buf ) < 0 )
67 {
68 ERR << "Can't determine system architecture" << endl;
69 return Arch_noarch;
70 }
71
72 Arch architecture( buf.machine );
73 MIL << "Uname architecture is '" << buf.machine << "'" << endl;
74
75 if ( architecture == Arch_i686 )
76 {
77 // some CPUs report i686 but dont implement cx8 and cmov
78 // check for both flags in /proc/cpuinfo and downgrade
79 // to i586 if either is missing (cf bug #18885)
80 std::ifstream cpuinfo( "/proc/cpuinfo" );
81 if ( cpuinfo )
82 {
83 for( iostr::EachLine in( cpuinfo ); in; in.next() )
84 {
85 if ( str::hasPrefix( *in, "flags" ) )
86 {
87 if ( in->find( "cx8" ) == std::string::npos
88 || in->find( "cmov" ) == std::string::npos )
89 {
90 architecture = Arch_i586;
91 WAR << "CPU lacks 'cx8' or 'cmov': architecture downgraded to '" << architecture << "'" << endl;
92 }
93 break;
94 }
95 }
96 }
97 else
98 {
99 ERR << "Cant open " << PathInfo("/proc/cpuinfo") << endl;
100 }
101 }
102 else if ( architecture == Arch_sparc || architecture == Arch_sparc64 )
103 {
104 // Check for sun4[vum] to get the real arch. (bug #566291)
105 std::ifstream cpuinfo( "/proc/cpuinfo" );
106 if ( cpuinfo )
107 {
108 for( iostr::EachLine in( cpuinfo ); in; in.next() )
109 {
110 if ( str::hasPrefix( *in, "type" ) )
111 {
112 if ( in->find( "sun4v" ) != std::string::npos )
113 {
114 architecture = ( architecture == Arch_sparc64 ? Arch_sparc64v : Arch_sparcv9v );
115 WAR << "CPU has 'sun4v': architecture upgraded to '" << architecture << "'" << endl;
116 }
117 else if ( in->find( "sun4u" ) != std::string::npos )
118 {
119 architecture = ( architecture == Arch_sparc64 ? Arch_sparc64 : Arch_sparcv9 );
120 WAR << "CPU has 'sun4u': architecture upgraded to '" << architecture << "'" << endl;
121 }
122 else if ( in->find( "sun4m" ) != std::string::npos )
123 {
124 architecture = Arch_sparcv8;
125 WAR << "CPU has 'sun4m': architecture upgraded to '" << architecture << "'" << endl;
126 }
127 break;
128 }
129 }
130 }
131 else
132 {
133 ERR << "Cant open " << PathInfo("/proc/cpuinfo") << endl;
134 }
135 }
136 else if ( architecture == Arch_armv7l || architecture == Arch_armv6l )
137 {
138 std::ifstream platform( "/etc/rpm/platform" );
139 if (platform)
140 {
141 for( iostr::EachLine in( platform ); in; in.next() )
142 {
143 if ( str::hasPrefix( *in, "armv7hl-" ) )
144 {
145 architecture = Arch_armv7hl;
146 WAR << "/etc/rpm/platform contains armv7hl-: architecture upgraded to '" << architecture << "'" << endl;
147 break;
148 }
149 if ( str::hasPrefix( *in, "armv6hl-" ) )
150 {
151 architecture = Arch_armv6hl;
152 WAR << "/etc/rpm/platform contains armv6hl-: architecture upgraded to '" << architecture << "'" << endl;
153 break;
154 }
155 }
156 }
157 }
158 #if __GLIBC_PREREQ (2,16)
159 else if ( architecture == Arch_ppc64 )
160 {
161 const char * platform = (const char *)getauxval( AT_PLATFORM );
162 int powerlvl;
163 if ( platform && sscanf( platform, "power%d", &powerlvl ) == 1 && powerlvl > 6 )
164 architecture = Arch_ppc64p7;
165 }
166 #endif
167 return architecture;
168 }
169
187 Locale _autodetectTextLocale()
188 {
189 Locale ret( Locale::enCode );
190 const char * envlist[] = { "LC_ALL", "LC_MESSAGES", "LANG", NULL };
191 for ( const char ** envvar = envlist; *envvar; ++envvar )
192 {
193 const char * envlang = getenv( *envvar );
194 if ( envlang )
195 {
196 std::string envstr( envlang );
197 if ( envstr != "POSIX" && envstr != "C" )
198 {
199 Locale lang( envstr );
200 if ( lang )
201 {
202 MIL << "Found " << *envvar << "=" << envstr << endl;
203 ret = lang;
204 break;
205 }
206 }
207 }
208 }
209 MIL << "Default text locale is '" << ret << "'" << endl;
210 #warning HACK AROUND BOOST_TEST_CATCH_SYSTEM_ERRORS
211 setenv( "BOOST_TEST_CATCH_SYSTEM_ERRORS", "no", 1 );
212 return ret;
213 }
214
215
216 inline Pathname _autodetectSystemRoot()
217 {
218 Target_Ptr target( getZYpp()->getTarget() );
219 return target ? target->root() : Pathname();
220 }
221
222 inline Pathname _autodetectZyppConfPath()
223 {
224 const char *env_confpath = getenv( "ZYPP_CONF" );
225 return env_confpath ? env_confpath : "/etc/zypp/zypp.conf";
226 }
227
229 } // namespace zypp
231
233 template<class Tp>
234 struct Option
235 {
236 typedef Tp value_type;
237
239 Option( value_type initial_r )
240 : _val( std::move(initial_r) )
241 {}
242
243 Option & operator=( value_type newval_r )
244 { set( std::move(newval_r) ); return *this; }
245
247 const value_type & get() const
248 { return _val; }
249
251 operator const value_type &() const
252 { return _val; }
253
255 void set( value_type newval_r )
256 { _val = std::move(newval_r); }
257
258 private:
259 value_type _val;
260 };
261
263 template<class Tp>
264 struct DefaultOption : public Option<Tp>
265 {
266 typedef Tp value_type;
267 typedef Option<Tp> option_type;
268
269 explicit DefaultOption( value_type initial_r )
270 : Option<Tp>( initial_r )
271 , _default( std::move(initial_r) )
272 {}
273
274 DefaultOption & operator=( value_type newval_r )
275 { this->set( std::move(newval_r) ); return *this; }
276
278 void restoreToDefault()
279 { this->set( _default.get() ); }
280
282 void restoreToDefault( value_type newval_r )
283 { setDefault( std::move(newval_r) ); restoreToDefault(); }
284
286 const value_type & getDefault() const
287 { return _default.get(); }
288
290 void setDefault( value_type newval_r )
291 { _default.set( std::move(newval_r) ); }
292
293 private:
294 option_type _default;
295 };
296
298 //
299 // CLASS NAME : ZConfig::Impl
300 //
306 class ZConfig::Impl
307 {
308 typedef std::set<std::string> MultiversionSpec;
309
310 public:
311 Impl( const Pathname & override_r = Pathname() )
312 : _parsedZyppConf ( override_r )
313 , cfg_arch ( defaultSystemArchitecture() )
314 , cfg_textLocale ( defaultTextLocale() )
315 , cfg_cache_path { "/var/cache/zypp" }
316 , cfg_metadata_path { "" } // empty - follows cfg_cache_path
317 , cfg_solvfiles_path { "" } // empty - follows cfg_cache_path
318 , cfg_packages_path { "" } // empty - follows cfg_cache_path
319 , updateMessagesNotify ( "" )
320 , repo_add_probe ( false )
321 , repo_refresh_delay ( 10 )
322 , repoLabelIsAlias ( false )
323 , download_use_deltarpm ( true )
324 , download_use_deltarpm_always ( false )
325 , download_media_prefer_download( true )
326 , download_mediaMountdir ( "/var/adm/mount" )
327 , download_max_concurrent_connections( 5 )
328 , download_min_download_speed ( 0 )
329 , download_max_download_speed ( 0 )
330 , download_max_silent_tries ( 5 )
331 , download_transfer_timeout ( 180 )
332 , commit_downloadMode ( DownloadDefault )
333 , gpgCheck ( true )
334 , repoGpgCheck ( indeterminate )
335 , pkgGpgCheck ( indeterminate )
336 , solver_focus ( ResolverFocus::Default )
337 , solver_onlyRequires ( false )
338 , solver_allowVendorChange ( false )
339 , solver_dupAllowDowngrade ( true )
340 , solver_dupAllowNameChange ( true )
341 , solver_dupAllowArchChange ( true )
342 , solver_dupAllowVendorChange ( true )
343 , solver_cleandepsOnRemove ( false )
344 , solver_upgradeTestcasesToKeep ( 2 )
345 , solverUpgradeRemoveDroppedPackages( true )
346 , apply_locks_file ( true )
347 , pluginsPath ( "/usr/lib/zypp/plugins" )
348 {
349 MIL << "libzypp: " LIBZYPP_VERSION_STRING << endl;
350 // override_r has higest prio
351 // ZYPP_CONF might override /etc/zypp/zypp.conf
352 if ( _parsedZyppConf.empty() )
353 {
354 _parsedZyppConf = _autodetectZyppConfPath();
355 }
356 else
357 {
358 // Inject this into ZConfig. Be shure this is
359 // allocated via new.
360 // ma: override_r might not be needed anymore since the
361 // Vendor_test is now able to initialize VendorAttr directly.
362 INT << "Reconfigure to " << _parsedZyppConf << endl;
363 ZConfig::instance()._pimpl.reset( this );
364 }
365 if ( PathInfo(_parsedZyppConf).isExist() )
366 {
367 parser::IniDict dict( _parsedZyppConf );
368 for ( IniDict::section_const_iterator sit = dict.sectionsBegin();
369 sit != dict.sectionsEnd();
370 ++sit )
371 {
372 std::string section(*sit);
373 //MIL << section << endl;
374 for ( IniDict::entry_const_iterator it = dict.entriesBegin(*sit);
375 it != dict.entriesEnd(*sit);
376 ++it )
377 {
378 std::string entry(it->first);
379 std::string value(it->second);
380 //DBG << (*it).first << "=" << (*it).second << endl;
381 if ( section == "main" )
382 {
383 if ( entry == "arch" )
384 {
385 Arch carch( value );
386 if ( carch != cfg_arch )
387 {
388 WAR << "Overriding system architecture (" << cfg_arch << "): " << carch << endl;
389 cfg_arch = carch;
390 }
391 }
392 else if ( entry == "cachedir" )
393 {
394 cfg_cache_path.restoreToDefault( value );
395 }
396 else if ( entry == "metadatadir" )
397 {
398 cfg_metadata_path.restoreToDefault( value );
399 }
400 else if ( entry == "solvfilesdir" )
401 {
402 cfg_solvfiles_path.restoreToDefault( value );
403 }
404 else if ( entry == "packagesdir" )
405 {
406 cfg_packages_path.restoreToDefault( value );
407 }
408 else if ( entry == "configdir" )
409 {
410 cfg_config_path = Pathname(value);
411 }
412 else if ( entry == "reposdir" )
413 {
414 cfg_known_repos_path = Pathname(value);
415 }
416 else if ( entry == "servicesdir" )
417 {
418 cfg_known_services_path = Pathname(value);
419 }
420 else if ( entry == "varsdir" )
421 {
422 cfg_vars_path = Pathname(value);
423 }
424 else if ( entry == "repo.add.probe" )
425 {
426 repo_add_probe = str::strToBool( value, repo_add_probe );
427 }
428 else if ( entry == "repo.refresh.delay" )
429 {
430 str::strtonum(value, repo_refresh_delay);
431 }
432 else if ( entry == "repo.refresh.locales" )
433 {
434 std::vector<std::string> tmp;
435 str::split( value, back_inserter( tmp ), ", \t" );
436
437 boost::function<Locale(const std::string &)> transform(
438 [](const std::string & str_r)->Locale{ return Locale(str_r); }
439 );
440 repoRefreshLocales.insert( make_transform_iterator( tmp.begin(), transform ),
441 make_transform_iterator( tmp.end(), transform ) );
442 }
443 else if ( entry == "download.use_deltarpm" )
444 {
445 download_use_deltarpm = str::strToBool( value, download_use_deltarpm );
446 }
447 else if ( entry == "download.use_deltarpm.always" )
448 {
449 download_use_deltarpm_always = str::strToBool( value, download_use_deltarpm_always );
450 }
451 else if ( entry == "download.media_preference" )
452 {
453 download_media_prefer_download.restoreToDefault( str::compareCI( value, "volatile" ) != 0 );
454 }
455
456 else if ( entry == "download.media_mountdir" )
457 {
458 download_mediaMountdir.restoreToDefault( Pathname(value) );
459 }
460
461 else if ( entry == "download.max_concurrent_connections" )
462 {
463 str::strtonum(value, download_max_concurrent_connections);
464 }
465 else if ( entry == "download.min_download_speed" )
466 {
467 str::strtonum(value, download_min_download_speed);
468 }
469 else if ( entry == "download.max_download_speed" )
470 {
471 str::strtonum(value, download_max_download_speed);
472 }
473 else if ( entry == "download.max_silent_tries" )
474 {
475 str::strtonum(value, download_max_silent_tries);
476 }
477 else if ( entry == "download.transfer_timeout" )
478 {
479 str::strtonum(value, download_transfer_timeout);
480 if ( download_transfer_timeout < 0 ) download_transfer_timeout = 0;
481 else if ( download_transfer_timeout > 3600 ) download_transfer_timeout = 3600;
482 }
483 else if ( entry == "commit.downloadMode" )
484 {
485 commit_downloadMode.set( deserializeDownloadMode( value ) );
486 }
487 else if ( entry == "gpgcheck" )
488 {
489 gpgCheck.restoreToDefault( str::strToBool( value, gpgCheck ) );
490 }
491 else if ( entry == "repo_gpgcheck" )
492 {
493 repoGpgCheck.restoreToDefault( str::strToTriBool( value ) );
494 }
495 else if ( entry == "pkg_gpgcheck" )
496 {
497 pkgGpgCheck.restoreToDefault( str::strToTriBool( value ) );
498 }
499 else if ( entry == "vendordir" )
500 {
501 cfg_vendor_path = Pathname(value);
502 }
503 else if ( entry == "multiversiondir" )
504 {
505 cfg_multiversion_path = Pathname(value);
506 }
507 else if ( entry == "multiversion.kernels" )
508 {
509 cfg_kernel_keep_spec = value;
510 }
511 else if ( entry == "solver.focus" )
512 {
513 fromString( value, solver_focus );
514 }
515 else if ( entry == "solver.onlyRequires" )
516 {
517 solver_onlyRequires.set( str::strToBool( value, solver_onlyRequires ) );
518 }
519 else if ( entry == "solver.allowVendorChange" )
520 {
521 solver_allowVendorChange.set( str::strToBool( value, solver_allowVendorChange ) );
522 }
523 else if ( entry == "solver.dupAllowDowngrade" )
524 {
525 solver_dupAllowDowngrade.set( str::strToBool( value, solver_dupAllowDowngrade ) );
526 }
527 else if ( entry == "solver.dupAllowNameChange" )
528 {
529 solver_dupAllowNameChange.set( str::strToBool( value, solver_dupAllowNameChange ) );
530 }
531 else if ( entry == "solver.dupAllowArchChange" )
532 {
533 solver_dupAllowArchChange.set( str::strToBool( value, solver_dupAllowArchChange ) );
534 }
535 else if ( entry == "solver.dupAllowVendorChange" )
536 {
537 solver_dupAllowVendorChange.set( str::strToBool( value, solver_dupAllowVendorChange ) );
538 }
539 else if ( entry == "solver.cleandepsOnRemove" )
540 {
541 solver_cleandepsOnRemove.set( str::strToBool( value, solver_cleandepsOnRemove ) );
542 }
543 else if ( entry == "solver.upgradeTestcasesToKeep" )
544 {
545 solver_upgradeTestcasesToKeep.set( str::strtonum<unsigned>( value ) );
546 }
547 else if ( entry == "solver.upgradeRemoveDroppedPackages" )
548 {
549 solverUpgradeRemoveDroppedPackages.restoreToDefault( str::strToBool( value, solverUpgradeRemoveDroppedPackages.getDefault() ) );
550 }
551 else if ( entry == "solver.checkSystemFile" )
552 {
553 solver_checkSystemFile = Pathname(value);
554 }
555 else if ( entry == "solver.checkSystemFileDir" )
556 {
557 solver_checkSystemFileDir = Pathname(value);
558 }
559 else if ( entry == "multiversion" )
560 {
561 MultiversionSpec & defSpec( _multiversionMap.getDefaultSpec() );
562 str::splitEscaped( value, std::inserter( defSpec, defSpec.end() ), ", \t" );
563 }
564 else if ( entry == "locksfile.path" )
565 {
566 locks_file = Pathname(value);
567 }
568 else if ( entry == "locksfile.apply" )
569 {
570 apply_locks_file = str::strToBool( value, apply_locks_file );
571 }
572 else if ( entry == "update.datadir" )
573 {
574 update_data_path = Pathname(value);
575 }
576 else if ( entry == "update.scriptsdir" )
577 {
578 update_scripts_path = Pathname(value);
579 }
580 else if ( entry == "update.messagessdir" )
581 {
582 update_messages_path = Pathname(value);
583 }
584 else if ( entry == "update.messages.notify" )
585 {
586 updateMessagesNotify.set( value );
587 }
588 else if ( entry == "rpm.install.excludedocs" )
589 {
590 rpmInstallFlags.setFlag( target::rpm::RPMINST_EXCLUDEDOCS,
591 str::strToBool( value, false ) );
592 }
593 else if ( entry == "history.logfile" )
594 {
595 history_log_path = Pathname(value);
596 }
597 else if ( entry == "credentials.global.dir" )
598 {
599 credentials_global_dir_path = Pathname(value);
600 }
601 else if ( entry == "credentials.global.file" )
602 {
603 credentials_global_file_path = Pathname(value);
604 }
605 }
606 }
607 }
608 //
609
610 }
611 else
612 {
613 MIL << _parsedZyppConf << " not found, using defaults instead." << endl;
614 _parsedZyppConf = _parsedZyppConf.extend( " (NOT FOUND)" );
615 }
616
617 // legacy:
618 if ( getenv( "ZYPP_TESTSUITE_FAKE_ARCH" ) )
619 {
620 Arch carch( getenv( "ZYPP_TESTSUITE_FAKE_ARCH" ) );
621 if ( carch != cfg_arch )
622 {
623 WAR << "ZYPP_TESTSUITE_FAKE_ARCH: Overriding system architecture (" << cfg_arch << "): " << carch << endl;
624 cfg_arch = carch;
625 }
626 }
627 MIL << "ZConfig singleton created." << endl;
628 }
629
630 ~Impl()
631 {}
632
633 public:
635 Pathname _parsedZyppConf;
636
637 Arch cfg_arch;
638 Locale cfg_textLocale;
639
640 DefaultOption<Pathname> cfg_cache_path; // Settings from the config file are also remembered
641 DefaultOption<Pathname> cfg_metadata_path; // 'default'. Cleanup in RepoManager e.g needs to tell
642 DefaultOption<Pathname> cfg_solvfiles_path; // whether settings in effect are config values or
643 DefaultOption<Pathname> cfg_packages_path; // custom settings applied vie set...Path().
644
645 Pathname cfg_config_path;
646 Pathname cfg_known_repos_path;
647 Pathname cfg_known_services_path;
648 Pathname cfg_vars_path;
649 Pathname cfg_repo_mgr_root_path;
650
651 Pathname cfg_vendor_path;
652 Pathname cfg_multiversion_path;
653 std::string cfg_kernel_keep_spec;
654 Pathname locks_file;
655
656 Pathname update_data_path;
657 Pathname update_scripts_path;
658 Pathname update_messages_path;
659 DefaultOption<std::string> updateMessagesNotify;
660
661 bool repo_add_probe;
662 unsigned repo_refresh_delay;
663 LocaleSet repoRefreshLocales;
664 bool repoLabelIsAlias;
665
666 bool download_use_deltarpm;
667 bool download_use_deltarpm_always;
668 DefaultOption<bool> download_media_prefer_download;
669 DefaultOption<Pathname> download_mediaMountdir;
670
671 int download_max_concurrent_connections;
672 int download_min_download_speed;
673 int download_max_download_speed;
674 int download_max_silent_tries;
675 int download_transfer_timeout;
676
677 Option<DownloadMode> commit_downloadMode;
678
679 DefaultOption<bool> gpgCheck;
680 DefaultOption<TriBool> repoGpgCheck;
681 DefaultOption<TriBool> pkgGpgCheck;
682
683 ResolverFocus solver_focus;
684 Option<bool> solver_onlyRequires;
685 Option<bool> solver_allowVendorChange;
686 Option<bool> solver_dupAllowDowngrade;
687 Option<bool> solver_dupAllowNameChange;
688 Option<bool> solver_dupAllowArchChange;
689 Option<bool> solver_dupAllowVendorChange;
690 Option<bool> solver_cleandepsOnRemove;
691 Option<unsigned> solver_upgradeTestcasesToKeep;
692 DefaultOption<bool> solverUpgradeRemoveDroppedPackages;
693
694 Pathname solver_checkSystemFile;
695 Pathname solver_checkSystemFileDir;
696
697 MultiversionSpec & multiversion() { return getMultiversion(); }
698 const MultiversionSpec & multiversion() const { return getMultiversion(); }
699
700 bool apply_locks_file;
701
702 target::rpm::RpmInstFlags rpmInstallFlags;
703
704 Pathname history_log_path;
705 Pathname credentials_global_dir_path;
706 Pathname credentials_global_file_path;
707
708 std::string userData;
709
710 Option<Pathname> pluginsPath;
711
712 private:
713 // HACK for bnc#906096: let pool re-evaluate multiversion spec
714 // if target root changes. ZConfig returns data sensitive to
715 // current target root.
716 // TODO Actually we'd need to scan the target systems zypp.conf and
717 // overlay all system specific values.
718 struct MultiversionMap
719 {
720 typedef std::map<Pathname,MultiversionSpec> SpecMap;
721
722 MultiversionSpec & getSpec( Pathname root_r, const Impl & zConfImpl_r ) // from system at root
723 {
724 // _specMap[] - the plain zypp.conf value
725 // _specMap[/] - combine [] and multiversion.d scan
726 // _specMap[root] - scan root/zypp.conf and root/multiversion.d
727
728 if ( root_r.empty() )
729 root_r = "/";
730 bool cacheHit = _specMap.count( root_r );
731 MultiversionSpec & ret( _specMap[root_r] ); // creates new entry on the fly
732
733 if ( ! cacheHit )
734 {
735 if ( root_r == "/" )
736 ret.swap( _specMap[Pathname()] ); // original zypp.conf
737 else
738 scanConfAt( root_r, ret, zConfImpl_r ); // scan zypp.conf at root_r
739 scanDirAt( root_r, ret, zConfImpl_r ); // add multiversion.d at root_r
740 using zypp::operator<<;
741 MIL << "MultiversionSpec '" << root_r << "' = " << ret << endl;
742 }
743 return ret;
744 }
745
746 MultiversionSpec & getDefaultSpec() // Spec from zypp.conf parsing; called before any getSpec
747 { return _specMap[Pathname()]; }
748
749 private:
750 void scanConfAt( const Pathname root_r, MultiversionSpec & spec_r, const Impl & zConfImpl_r )
751 {
752 static const str::regex rx( "^multiversion *= *(.*)" );
753 str::smatch what;
754 iostr::simpleParseFile( InputStream( Pathname::assertprefix( root_r, _autodetectZyppConfPath() ) ),
755 [&]( int num_r, std::string line_r )->bool
756 {
757 if ( line_r[0] == 'm' && str::regex_match( line_r, what, rx ) )
758 {
759 str::splitEscaped( what[1], std::inserter( spec_r, spec_r.end() ), ", \t" );
760 return false; // stop after match
761 }
762 return true;
763 } );
764 }
765
766 void scanDirAt( const Pathname root_r, MultiversionSpec & spec_r, const Impl & zConfImpl_r )
767 {
768 // NOTE: Actually we'd need to scan and use the root_r! zypp.conf values.
769 Pathname multiversionDir( zConfImpl_r.cfg_multiversion_path );
770 if ( multiversionDir.empty() )
771 multiversionDir = ( zConfImpl_r.cfg_config_path.empty()
772 ? Pathname("/etc/zypp")
773 : zConfImpl_r.cfg_config_path ) / "multiversion.d";
774
775 filesystem::dirForEach( Pathname::assertprefix( root_r, multiversionDir ),
776 [&spec_r]( const Pathname & dir_r, const char *const & name_r )->bool
777 {
778 MIL << "Parsing " << dir_r/name_r << endl;
779 iostr::simpleParseFile( InputStream( dir_r/name_r ),
780 [&spec_r]( int num_r, std::string line_r )->bool
781 {
782 DBG << " found " << line_r << endl;
783 spec_r.insert( std::move(line_r) );
784 return true;
785 } );
786 return true;
787 } );
788 }
789
790 private:
791 SpecMap _specMap;
792 };
793
794 MultiversionSpec & getMultiversion() const
795 { return _multiversionMap.getSpec( _autodetectSystemRoot(), *this ); }
796
797 mutable MultiversionMap _multiversionMap;
798 };
800
802 //
803 // METHOD NAME : ZConfig::instance
804 // METHOD TYPE : ZConfig &
805 //
806 ZConfig & ZConfig::instance()
807 {
808 static ZConfig _instance; // The singleton
809 return _instance;
810 }
811
813 //
814 // METHOD NAME : ZConfig::ZConfig
815 // METHOD TYPE : Ctor
816 //
817 ZConfig::ZConfig()
818 : _pimpl( new Impl )
819 {
820 about( MIL );
821 }
822
824 //
825 // METHOD NAME : ZConfig::~ZConfig
826 // METHOD TYPE : Dtor
827 //
828 ZConfig::~ZConfig( )
829 {}
830
831 Pathname ZConfig::systemRoot() const
832 { return _autodetectSystemRoot(); }
833
834
835 Pathname ZConfig::repoManagerRoot() const
836 {
837 return ( _pimpl->cfg_repo_mgr_root_path.empty()
838 ? systemRoot() : _pimpl->cfg_repo_mgr_root_path );
839 }
840
841 void ZConfig::setRepoManagerRoot(const zypp::filesystem::Pathname &root)
842 { _pimpl->cfg_repo_mgr_root_path = root; }
843
845 //
846 // system architecture
847 //
849
850 Arch ZConfig::defaultSystemArchitecture()
851 {
852 static Arch _val( _autodetectSystemArchitecture() );
853 return _val;
854 }
855
856 Arch ZConfig::systemArchitecture() const
857 { return _pimpl->cfg_arch; }
858
859 void ZConfig::setSystemArchitecture( const Arch & arch_r )
860 {
861 if ( arch_r != _pimpl->cfg_arch )
862 {
863 WAR << "Overriding system architecture (" << _pimpl->cfg_arch << "): " << arch_r << endl;
864 _pimpl->cfg_arch = arch_r;
865 }
866 }
867
869 //
870 // text locale
871 //
873
874 Locale ZConfig::defaultTextLocale()
875 {
876 static Locale _val( _autodetectTextLocale() );
877 return _val;
878 }
879
880 Locale ZConfig::textLocale() const
881 { return _pimpl->cfg_textLocale; }
882
883 void ZConfig::setTextLocale( const Locale & locale_r )
884 {
885 if ( locale_r != _pimpl->cfg_textLocale )
886 {
887 WAR << "Overriding text locale (" << _pimpl->cfg_textLocale << "): " << locale_r << endl;
888 _pimpl->cfg_textLocale = locale_r;
889 // Propagate changes
890 sat::Pool::instance().setTextLocale( locale_r );
891 }
892 }
893
895 // user data
897
898 bool ZConfig::hasUserData() const
899 { return !_pimpl->userData.empty(); }
900
901 std::string ZConfig::userData() const
902 { return _pimpl->userData; }
903
904 bool ZConfig::setUserData( const std::string & str_r )
905 {
906 for_( ch, str_r.begin(), str_r.end() )
907 {
908 if ( *ch < ' ' && *ch != '\t' )
909 {
910 ERR << "New user data string rejectded: char " << (int)*ch << " at position " << (ch - str_r.begin()) << endl;
911 return false;
912 }
913 }
914 MIL << "Set user data string to '" << str_r << "'" << endl;
915 _pimpl->userData = str_r;
916 return true;
917 }
918
920
921 Pathname ZConfig::repoCachePath() const
922 {
923 return ( _pimpl->cfg_cache_path.get().empty()
924 ? Pathname("/var/cache/zypp") : _pimpl->cfg_cache_path.get() );
925 }
926
927 Pathname ZConfig::pubkeyCachePath() const
928 {
929 return repoCachePath()/"pubkeys";
930 }
931
932 void ZConfig::setRepoCachePath(const zypp::filesystem::Pathname &path_r)
933 {
934 _pimpl->cfg_cache_path = path_r;
935 }
936
937 Pathname ZConfig::repoMetadataPath() const
938 {
939 return ( _pimpl->cfg_metadata_path.get().empty()
940 ? (repoCachePath()/"raw") : _pimpl->cfg_metadata_path.get() );
941 }
942
943 void ZConfig::setRepoMetadataPath(const zypp::filesystem::Pathname &path_r)
944 {
945 _pimpl->cfg_metadata_path = path_r;
946 }
947
948 Pathname ZConfig::repoSolvfilesPath() const
949 {
950 return ( _pimpl->cfg_solvfiles_path.get().empty()
951 ? (repoCachePath()/"solv") : _pimpl->cfg_solvfiles_path.get() );
952 }
953
954 void ZConfig::setRepoSolvfilesPath(const zypp::filesystem::Pathname &path_r)
955 {
956 _pimpl->cfg_solvfiles_path = path_r;
957 }
958
959 Pathname ZConfig::repoPackagesPath() const
960 {
961 return ( _pimpl->cfg_packages_path.get().empty()
962 ? (repoCachePath()/"packages") : _pimpl->cfg_packages_path.get() );
963 }
964
965 void ZConfig::setRepoPackagesPath(const zypp::filesystem::Pathname &path_r)
966 {
967 _pimpl->cfg_packages_path = path_r;
968 }
969
970 Pathname ZConfig::builtinRepoCachePath() const
971 { return _pimpl->cfg_cache_path.getDefault().empty() ? Pathname("/var/cache/zypp") : _pimpl->cfg_cache_path.getDefault(); }
972
973 Pathname ZConfig::builtinRepoMetadataPath() const
974 { return _pimpl->cfg_metadata_path.getDefault().empty() ? (builtinRepoCachePath()/"raw") : _pimpl->cfg_metadata_path.getDefault(); }
975
976 Pathname ZConfig::builtinRepoSolvfilesPath() const
977 { return _pimpl->cfg_solvfiles_path.getDefault().empty() ? (builtinRepoCachePath()/"solv") : _pimpl->cfg_solvfiles_path.getDefault(); }
978
979 Pathname ZConfig::builtinRepoPackagesPath() const
980 { return _pimpl->cfg_packages_path.getDefault().empty() ? (builtinRepoCachePath()/"packages") : _pimpl->cfg_packages_path.getDefault(); }
981
983
984 Pathname ZConfig::configPath() const
985 {
986 return ( _pimpl->cfg_config_path.empty()
987 ? Pathname("/etc/zypp") : _pimpl->cfg_config_path );
988 }
989
990 Pathname ZConfig::knownReposPath() const
991 {
992 return ( _pimpl->cfg_known_repos_path.empty()
993 ? (configPath()/"repos.d") : _pimpl->cfg_known_repos_path );
994 }
995
996 Pathname ZConfig::knownServicesPath() const
997 {
998 return ( _pimpl->cfg_known_services_path.empty()
999 ? (configPath()/"services.d") : _pimpl->cfg_known_services_path );
1000 }
1001
1002 Pathname ZConfig::needrebootFile() const
1003 { return configPath()/"needreboot"; }
1004
1005 Pathname ZConfig::needrebootPath() const
1006 { return configPath()/"needreboot.d"; }
1007
1008 Pathname ZConfig::varsPath() const
1009 {
1010 return ( _pimpl->cfg_vars_path.empty()
1011 ? (configPath()/"vars.d") : _pimpl->cfg_vars_path );
1012 }
1013
1014 Pathname ZConfig::vendorPath() const
1015 {
1016 return ( _pimpl->cfg_vendor_path.empty()
1017 ? (configPath()/"vendors.d") : _pimpl->cfg_vendor_path );
1018 }
1019
1020 Pathname ZConfig::locksFile() const
1021 {
1022 return ( _pimpl->locks_file.empty()
1023 ? (configPath()/"locks") : _pimpl->locks_file );
1024 }
1025
1027
1028 bool ZConfig::repo_add_probe() const
1029 { return _pimpl->repo_add_probe; }
1030
1031 unsigned ZConfig::repo_refresh_delay() const
1032 { return _pimpl->repo_refresh_delay; }
1033
1034 LocaleSet ZConfig::repoRefreshLocales() const
1035 { return _pimpl->repoRefreshLocales.empty() ? Target::requestedLocales("") :_pimpl->repoRefreshLocales; }
1036
1037 bool ZConfig::repoLabelIsAlias() const
1038 { return _pimpl->repoLabelIsAlias; }
1039
1040 void ZConfig::repoLabelIsAlias( bool yesno_r )
1041 { _pimpl->repoLabelIsAlias = yesno_r; }
1042
1043 bool ZConfig::download_use_deltarpm() const
1044 { return _pimpl->download_use_deltarpm; }
1045
1046 bool ZConfig::download_use_deltarpm_always() const
1047 { return download_use_deltarpm() && _pimpl->download_use_deltarpm_always; }
1048
1049 bool ZConfig::download_media_prefer_download() const
1050 { return _pimpl->download_media_prefer_download; }
1051
1052 void ZConfig::set_download_media_prefer_download( bool yesno_r )
1053 { _pimpl->download_media_prefer_download.set( yesno_r ); }
1054
1055 void ZConfig::set_default_download_media_prefer_download()
1056 { _pimpl->download_media_prefer_download.restoreToDefault(); }
1057
1058 long ZConfig::download_max_concurrent_connections() const
1059 { return _pimpl->download_max_concurrent_connections; }
1060
1061 long ZConfig::download_min_download_speed() const
1062 { return _pimpl->download_min_download_speed; }
1063
1064 long ZConfig::download_max_download_speed() const
1065 { return _pimpl->download_max_download_speed; }
1066
1067 long ZConfig::download_max_silent_tries() const
1068 { return _pimpl->download_max_silent_tries; }
1069
1070 long ZConfig::download_transfer_timeout() const
1071 { return _pimpl->download_transfer_timeout; }
1072
1073 Pathname ZConfig::download_mediaMountdir() const { return _pimpl->download_mediaMountdir; }
1074 void ZConfig::set_download_mediaMountdir( Pathname newval_r ) { _pimpl->download_mediaMountdir.set( std::move(newval_r) ); }
1075 void ZConfig::set_default_download_mediaMountdir() { _pimpl->download_mediaMountdir.restoreToDefault(); }
1076
1077 DownloadMode ZConfig::commit_downloadMode() const
1078 { return _pimpl->commit_downloadMode; }
1079
1080
1081 bool ZConfig::gpgCheck() const { return _pimpl->gpgCheck; }
1082 TriBool ZConfig::repoGpgCheck() const { return _pimpl->repoGpgCheck; }
1083 TriBool ZConfig::pkgGpgCheck() const { return _pimpl->pkgGpgCheck; }
1084
1085 void ZConfig::setGpgCheck( bool val_r ) { _pimpl->gpgCheck.set( val_r ); }
1086 void ZConfig::setRepoGpgCheck( TriBool val_r ) { _pimpl->repoGpgCheck.set( val_r ); }
1087 void ZConfig::setPkgGpgCheck( TriBool val_r ) { _pimpl->pkgGpgCheck.set( val_r ); }
1088
1089 void ZConfig::resetGpgCheck() { _pimpl->gpgCheck.restoreToDefault(); }
1090 void ZConfig::resetRepoGpgCheck() { _pimpl->repoGpgCheck.restoreToDefault(); }
1091 void ZConfig::resetPkgGpgCheck() { _pimpl->pkgGpgCheck.restoreToDefault(); }
1092
1093 ResolverFocus ZConfig::solver_focus() const { return _pimpl->solver_focus; }
1094
1095 bool ZConfig::solver_onlyRequires() const
1096 { return _pimpl->solver_onlyRequires; }
1097
1098 bool ZConfig::solver_allowVendorChange() const
1099 { return _pimpl->solver_allowVendorChange; }
1100
1101 bool ZConfig::solver_dupAllowDowngrade() const { return _pimpl->solver_dupAllowDowngrade; }
1102 bool ZConfig::solver_dupAllowNameChange() const { return _pimpl->solver_dupAllowNameChange; }
1103 bool ZConfig::solver_dupAllowArchChange() const { return _pimpl->solver_dupAllowArchChange; }
1104 bool ZConfig::solver_dupAllowVendorChange() const { return _pimpl->solver_dupAllowVendorChange; }
1105
1106 bool ZConfig::solver_cleandepsOnRemove() const
1107 { return _pimpl->solver_cleandepsOnRemove; }
1108
1109 Pathname ZConfig::solver_checkSystemFile() const
1110 { return ( _pimpl->solver_checkSystemFile.empty()
1111 ? (configPath()/"systemCheck") : _pimpl->solver_checkSystemFile ); }
1112
1113 Pathname ZConfig::solver_checkSystemFileDir() const
1114 { return ( _pimpl->solver_checkSystemFileDir.empty()
1115 ? (configPath()/"systemCheck.d") : _pimpl->solver_checkSystemFileDir ); }
1116
1117 unsigned ZConfig::solver_upgradeTestcasesToKeep() const
1118 { return _pimpl->solver_upgradeTestcasesToKeep; }
1119
1120 bool ZConfig::solverUpgradeRemoveDroppedPackages() const { return _pimpl->solverUpgradeRemoveDroppedPackages; }
1121 void ZConfig::setSolverUpgradeRemoveDroppedPackages( bool val_r ) { _pimpl->solverUpgradeRemoveDroppedPackages.set( val_r ); }
1122 void ZConfig::resetSolverUpgradeRemoveDroppedPackages() { _pimpl->solverUpgradeRemoveDroppedPackages.restoreToDefault(); }
1123
1124 namespace
1125 {
1126 inline void sigMultiversionSpecChanged()
1127 {
1128 sat::detail::PoolMember::myPool().multiversionSpecChanged();
1129 }
1130 }
1131
1132 const std::set<std::string> & ZConfig::multiversionSpec() const { return _pimpl->multiversion(); }
1133 void ZConfig::multiversionSpec( std::set<std::string> new_r ) { _pimpl->multiversion().swap( new_r ); sigMultiversionSpecChanged(); }
1134 void ZConfig::clearMultiversionSpec() { _pimpl->multiversion().clear(); sigMultiversionSpecChanged(); }
1135 void ZConfig::addMultiversionSpec( const std::string & name_r ) { _pimpl->multiversion().insert( name_r ); sigMultiversionSpecChanged(); }
1136 void ZConfig::removeMultiversionSpec( const std::string & name_r ) { _pimpl->multiversion().erase( name_r ); sigMultiversionSpecChanged(); }
1137
1138 bool ZConfig::apply_locks_file() const
1139 { return _pimpl->apply_locks_file; }
1140
1141 Pathname ZConfig::update_dataPath() const
1142 {
1143 return ( _pimpl->update_data_path.empty()
1144 ? Pathname("/var/adm") : _pimpl->update_data_path );
1145 }
1146
1147 Pathname ZConfig::update_messagesPath() const
1148 {
1149 return ( _pimpl->update_messages_path.empty()
1150 ? Pathname(update_dataPath()/"update-messages") : _pimpl->update_messages_path );
1151 }
1152
1153 Pathname ZConfig::update_scriptsPath() const
1154 {
1155 return ( _pimpl->update_scripts_path.empty()
1156 ? Pathname(update_dataPath()/"update-scripts") : _pimpl->update_scripts_path );
1157 }
1158
1159 std::string ZConfig::updateMessagesNotify() const
1160 { return _pimpl->updateMessagesNotify; }
1161
1162 void ZConfig::setUpdateMessagesNotify( const std::string & val_r )
1163 { _pimpl->updateMessagesNotify.set( val_r ); }
1164
1165 void ZConfig::resetUpdateMessagesNotify()
1166 { _pimpl->updateMessagesNotify.restoreToDefault(); }
1167
1169
1170 target::rpm::RpmInstFlags ZConfig::rpmInstallFlags() const
1171 { return _pimpl->rpmInstallFlags; }
1172
1173
1174 Pathname ZConfig::historyLogFile() const
1175 {
1176 return ( _pimpl->history_log_path.empty() ?
1177 Pathname("/var/log/zypp/history") : _pimpl->history_log_path );
1178 }
1179
1180 Pathname ZConfig::credentialsGlobalDir() const
1181 {
1182 return ( _pimpl->credentials_global_dir_path.empty() ?
1183 Pathname("/etc/zypp/credentials.d") : _pimpl->credentials_global_dir_path );
1184 }
1185
1186 Pathname ZConfig::credentialsGlobalFile() const
1187 {
1188 return ( _pimpl->credentials_global_file_path.empty() ?
1189 Pathname("/etc/zypp/credentials.cat") : _pimpl->credentials_global_file_path );
1190 }
1191
1193
1194 std::string ZConfig::distroverpkg() const
1195 { return "system-release"; }
1196
1198
1199 Pathname ZConfig::pluginsPath() const
1200 { return _pimpl->pluginsPath.get(); }
1201
1202 std::string ZConfig::multiversionKernels() const
1203 {
1204 return _pimpl->cfg_kernel_keep_spec;
1205 }
1206
1208
1209 std::ostream & ZConfig::about( std::ostream & str ) const
1210 {
1211 str << "libzypp: " LIBZYPP_VERSION_STRING << endl;
1212
1213 str << "libsolv: " << solv_version;
1214 if ( ::strcmp( solv_version, LIBSOLV_VERSION_STRING ) )
1215 str << " (built against " << LIBSOLV_VERSION_STRING << ")";
1216 str << endl;
1217
1218 str << "zypp.conf: '" << _pimpl->_parsedZyppConf << "'" << endl;
1219 str << "TextLocale: '" << textLocale() << "' (" << defaultTextLocale() << ")" << endl;
1220 str << "SystemArchitecture: '" << systemArchitecture() << "' (" << defaultSystemArchitecture() << ")" << endl;
1221 return str;
1222 }
1223
1225 } // namespace zypp
for_
#define for_(IT, BEG, END)
Convenient for-loops using iterator.
Definition: Easy.h:28
IOStream.h
IniDict.h
InputStream.h
LogTools.h
DBG
#define DBG
Definition: Logger.h:90
MIL
#define MIL
Definition: Logger.h:91
ERR
#define ERR
Definition: Logger.h:93
WAR
#define WAR
Definition: Logger.h:92
INT
#define INT
Definition: Logger.h:95
PathInfo.h
Pool.h
Regex.h
String.h
ZConfig.h
ZYppFactory.h
zypp::Arch
Architecture.
Definition: Arch.h:37
zypp::InputStream
Helper to create and pass std::istream.
Definition: InputStream.h:57
zypp::Locale
'Language[_Country]' codes.
Definition: Locale.h:50
zypp::Locale::enCode
static const Locale enCode
Last resort "en".
Definition: Locale.h:77
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:307
zypp::ZConfig::Impl::cfg_multiversion_path
Pathname cfg_multiversion_path
Definition: ZConfig.cc:652
zypp::ZConfig::Impl::download_mediaMountdir
DefaultOption< Pathname > download_mediaMountdir
Definition: ZConfig.cc:669
zypp::ZConfig::Impl::download_max_silent_tries
int download_max_silent_tries
Definition: ZConfig.cc:674
zypp::ZConfig::Impl::MultiversionSpec
std::set< std::string > MultiversionSpec
Definition: ZConfig.cc:308
zypp::ZConfig::Impl::cfg_metadata_path
DefaultOption< Pathname > cfg_metadata_path
Definition: ZConfig.cc:641
zypp::ZConfig::Impl::cfg_known_repos_path
Pathname cfg_known_repos_path
Definition: ZConfig.cc:646
zypp::ZConfig::Impl::cfg_known_services_path
Pathname cfg_known_services_path
Definition: ZConfig.cc:647
zypp::ZConfig::Impl::cfg_vars_path
Pathname cfg_vars_path
Definition: ZConfig.cc:648
zypp::ZConfig::Impl::credentials_global_file_path
Pathname credentials_global_file_path
Definition: ZConfig.cc:706
zypp::ZConfig::Impl::solver_allowVendorChange
Option< bool > solver_allowVendorChange
Definition: ZConfig.cc:685
zypp::ZConfig::Impl::download_min_download_speed
int download_min_download_speed
Definition: ZConfig.cc:672
zypp::ZConfig::Impl::download_max_download_speed
int download_max_download_speed
Definition: ZConfig.cc:673
zypp::ZConfig::Impl::cfg_packages_path
DefaultOption< Pathname > cfg_packages_path
Definition: ZConfig.cc:643
zypp::ZConfig::Impl::download_use_deltarpm_always
bool download_use_deltarpm_always
Definition: ZConfig.cc:667
zypp::ZConfig::Impl::_parsedZyppConf
Pathname _parsedZyppConf
Remember any parsed zypp.conf.
Definition: ZConfig.cc:635
zypp::ZConfig::Impl::solver_checkSystemFile
Pathname solver_checkSystemFile
Definition: ZConfig.cc:694
zypp::ZConfig::Impl::_multiversionMap
MultiversionMap _multiversionMap
Definition: ZConfig.cc:797
zypp::ZConfig::Impl::solver_dupAllowNameChange
Option< bool > solver_dupAllowNameChange
Definition: ZConfig.cc:687
zypp::ZConfig::Impl::apply_locks_file
bool apply_locks_file
Definition: ZConfig.cc:700
zypp::ZConfig::Impl::update_data_path
Pathname update_data_path
Definition: ZConfig.cc:656
zypp::ZConfig::Impl::history_log_path
Pathname history_log_path
Definition: ZConfig.cc:704
zypp::ZConfig::Impl::locks_file
Pathname locks_file
Definition: ZConfig.cc:654
zypp::ZConfig::Impl::solver_upgradeTestcasesToKeep
Option< unsigned > solver_upgradeTestcasesToKeep
Definition: ZConfig.cc:691
zypp::ZConfig::Impl::repoRefreshLocales
LocaleSet repoRefreshLocales
Definition: ZConfig.cc:663
zypp::ZConfig::Impl::cfg_cache_path
DefaultOption< Pathname > cfg_cache_path
Definition: ZConfig.cc:640
zypp::ZConfig::Impl::Impl
Impl(const Pathname &override_r=Pathname())
Definition: ZConfig.cc:311
zypp::ZConfig::Impl::solver_dupAllowArchChange
Option< bool > solver_dupAllowArchChange
Definition: ZConfig.cc:688
zypp::ZConfig::Impl::solver_focus
ResolverFocus solver_focus
Definition: ZConfig.cc:683
zypp::ZConfig::Impl::~Impl
~Impl()
Definition: ZConfig.cc:630
zypp::ZConfig::Impl::update_scripts_path
Pathname update_scripts_path
Definition: ZConfig.cc:657
zypp::ZConfig::Impl::pluginsPath
Option< Pathname > pluginsPath
Definition: ZConfig.cc:710
zypp::ZConfig::Impl::userData
std::string userData
Definition: ZConfig.cc:708
zypp::ZConfig::Impl::credentials_global_dir_path
Pathname credentials_global_dir_path
Definition: ZConfig.cc:705
zypp::ZConfig::Impl::cfg_kernel_keep_spec
std::string cfg_kernel_keep_spec
Definition: ZConfig.cc:653
zypp::ZConfig::Impl::repoGpgCheck
DefaultOption< TriBool > repoGpgCheck
Definition: ZConfig.cc:680
zypp::ZConfig::Impl::solver_dupAllowVendorChange
Option< bool > solver_dupAllowVendorChange
Definition: ZConfig.cc:689
zypp::ZConfig::Impl::repo_refresh_delay
unsigned repo_refresh_delay
Definition: ZConfig.cc:662
zypp::ZConfig::Impl::commit_downloadMode
Option< DownloadMode > commit_downloadMode
Definition: ZConfig.cc:677
zypp::ZConfig::Impl::repo_add_probe
bool repo_add_probe
Definition: ZConfig.cc:661
zypp::ZConfig::Impl::solver_dupAllowDowngrade
Option< bool > solver_dupAllowDowngrade
Definition: ZConfig.cc:686
zypp::ZConfig::Impl::cfg_textLocale
Locale cfg_textLocale
Definition: ZConfig.cc:638
zypp::ZConfig::Impl::cfg_arch
Arch cfg_arch
Definition: ZConfig.cc:637
zypp::ZConfig::Impl::getMultiversion
MultiversionSpec & getMultiversion() const
Definition: ZConfig.cc:794
zypp::ZConfig::Impl::download_media_prefer_download
DefaultOption< bool > download_media_prefer_download
Definition: ZConfig.cc:668
zypp::ZConfig::Impl::download_use_deltarpm
bool download_use_deltarpm
Definition: ZConfig.cc:666
zypp::ZConfig::Impl::repoLabelIsAlias
bool repoLabelIsAlias
Definition: ZConfig.cc:664
zypp::ZConfig::Impl::solver_checkSystemFileDir
Pathname solver_checkSystemFileDir
Definition: ZConfig.cc:695
zypp::ZConfig::Impl::cfg_config_path
Pathname cfg_config_path
Definition: ZConfig.cc:645
zypp::ZConfig::Impl::rpmInstallFlags
target::rpm::RpmInstFlags rpmInstallFlags
Definition: ZConfig.cc:702
zypp::ZConfig::Impl::update_messages_path
Pathname update_messages_path
Definition: ZConfig.cc:658
zypp::ZConfig::Impl::solverUpgradeRemoveDroppedPackages
DefaultOption< bool > solverUpgradeRemoveDroppedPackages
Definition: ZConfig.cc:692
zypp::ZConfig::Impl::download_transfer_timeout
int download_transfer_timeout
Definition: ZConfig.cc:675
zypp::ZConfig::Impl::cfg_repo_mgr_root_path
Pathname cfg_repo_mgr_root_path
Definition: ZConfig.cc:649
zypp::ZConfig::Impl::multiversion
const MultiversionSpec & multiversion() const
Definition: ZConfig.cc:698
zypp::ZConfig::Impl::pkgGpgCheck
DefaultOption< TriBool > pkgGpgCheck
Definition: ZConfig.cc:681
zypp::ZConfig::Impl::multiversion
MultiversionSpec & multiversion()
Definition: ZConfig.cc:697
zypp::ZConfig::Impl::updateMessagesNotify
DefaultOption< std::string > updateMessagesNotify
Definition: ZConfig.cc:659
zypp::ZConfig::Impl::cfg_vendor_path
Pathname cfg_vendor_path
Definition: ZConfig.cc:651
zypp::ZConfig::Impl::solver_cleandepsOnRemove
Option< bool > solver_cleandepsOnRemove
Definition: ZConfig.cc:690
zypp::ZConfig::Impl::download_max_concurrent_connections
int download_max_concurrent_connections
Definition: ZConfig.cc:671
zypp::ZConfig::Impl::cfg_solvfiles_path
DefaultOption< Pathname > cfg_solvfiles_path
Definition: ZConfig.cc:642
zypp::ZConfig::Impl::solver_onlyRequires
Option< bool > solver_onlyRequires
Definition: ZConfig.cc:684
zypp::ZConfig::Impl::gpgCheck
DefaultOption< bool > gpgCheck
Definition: ZConfig.cc:679
zypp::ZConfig
Interim helper class to collect global options and settings.
Definition: ZConfig.h:62
zypp::ZConfig::hasUserData
bool hasUserData() const
Whether a (non empty) user data sting is defined.
Definition: ZConfig.cc:898
zypp::ZConfig::solver_cleandepsOnRemove
bool solver_cleandepsOnRemove() const
Whether removing a package should also remove no longer needed requirements.
Definition: ZConfig.cc:1106
zypp::ZConfig::userData
std::string userData() const
User defined string value to be passed to log, history, plugins...
Definition: ZConfig.cc:901
zypp::ZConfig::knownServicesPath
Pathname knownServicesPath() const
Path where the known services .service files are kept (configPath()/services.d).
Definition: ZConfig.cc:996
zypp::ZConfig::removeMultiversionSpec
void removeMultiversionSpec(const std::string &name_r)
Definition: ZConfig.cc:1136
zypp::ZConfig::repoPackagesPath
Pathname repoPackagesPath() const
Path where the repo packages are downloaded and kept (repoCachePath()/packages).
Definition: ZConfig.cc:959
zypp::ZConfig::repo_refresh_delay
unsigned repo_refresh_delay() const
Amount of time in minutes that must pass before another refresh.
Definition: ZConfig.cc:1031
zypp::ZConfig::systemArchitecture
Arch systemArchitecture() const
The system architecture zypp uses.
Definition: ZConfig.cc:856
zypp::ZConfig::textLocale
Locale textLocale() const
The locale for translated texts zypp uses.
Definition: ZConfig.cc:880
zypp::ZConfig::update_dataPath
Pathname update_dataPath() const
Path where the update items are kept (/var/adm)
Definition: ZConfig.cc:1141
zypp::ZConfig::solver_focus
ResolverFocus solver_focus() const
The resolvers general attitude when resolving jobs.
Definition: ZConfig.cc:1093
zypp::ZConfig::update_messagesPath
Pathname update_messagesPath() const
Path where the repo solv files are created and kept (update_dataPath()/solv).
Definition: ZConfig.cc:1147
zypp::ZConfig::builtinRepoSolvfilesPath
Pathname builtinRepoSolvfilesPath() const
The builtin config file value.
Definition: ZConfig.cc:976
zypp::ZConfig::pluginsPath
Pathname pluginsPath() const
Defaults to /usr/lib/zypp/plugins.
Definition: ZConfig.cc:1199
zypp::ZConfig::repoManagerRoot
Pathname repoManagerRoot() const
The RepoManager root directory.
Definition: ZConfig.cc:835
zypp::ZConfig::resetRepoGpgCheck
void resetRepoGpgCheck()
Reset to the zconfig default.
Definition: ZConfig.cc:1090
zypp::ZConfig::gpgCheck
bool gpgCheck() const
Turn signature checking on/off (on)
Definition: ZConfig.cc:1081
zypp::ZConfig::knownReposPath
Pathname knownReposPath() const
Path where the known repositories .repo files are kept (configPath()/repos.d).
Definition: ZConfig.cc:990
zypp::ZConfig::update_scriptsPath
Pathname update_scriptsPath() const
Path where the repo metadata is downloaded and kept (update_dataPath()/).
Definition: ZConfig.cc:1153
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:1070
zypp::ZConfig::setRepoManagerRoot
void setRepoManagerRoot(const Pathname &root)
Sets the RepoManager root directory.
Definition: ZConfig.cc:841
zypp::ZConfig::solver_dupAllowArchChange
bool solver_dupAllowArchChange() const
DUP tune: Whether to allow package arch changes upon DUP.
Definition: ZConfig.cc:1103
zypp::ZConfig::setTextLocale
void setTextLocale(const Locale &locale_r)
Set the preferred locale for translated texts.
Definition: ZConfig.cc:883
zypp::ZConfig::solverUpgradeRemoveDroppedPackages
bool solverUpgradeRemoveDroppedPackages() const
Whether dist upgrade should remove a products dropped packages (true).
Definition: ZConfig.cc:1120
zypp::ZConfig::defaultTextLocale
static Locale defaultTextLocale()
The autodetected preferred locale for translated texts.
Definition: ZConfig.cc:874
zypp::ZConfig::download_mediaMountdir
Pathname download_mediaMountdir() const
Path where media are preferably mounted or downloaded.
Definition: ZConfig.cc:1073
zypp::ZConfig::resetSolverUpgradeRemoveDroppedPackages
void resetSolverUpgradeRemoveDroppedPackages()
Reset solverUpgradeRemoveDroppedPackages to the zypp.conf default.
Definition: ZConfig.cc:1122
zypp::ZConfig::apply_locks_file
bool apply_locks_file() const
Whether locks file should be read and applied after start (true)
Definition: ZConfig.cc:1138
zypp::ZConfig::solver_allowVendorChange
bool solver_allowVendorChange() const
Whether vendor check is by default enabled.
Definition: ZConfig.cc:1098
zypp::ZConfig::set_default_download_mediaMountdir
void set_default_download_mediaMountdir()
Reset to zypp.cong default.
Definition: ZConfig.cc:1075
zypp::ZConfig::repoCachePath
Pathname repoCachePath() const
Path where the caches are kept (/var/cache/zypp)
Definition: ZConfig.cc:921
zypp::ZConfig::setPkgGpgCheck
void setPkgGpgCheck(TriBool val_r)
Change the value.
Definition: ZConfig.cc:1087
zypp::ZConfig::needrebootPath
Pathname needrebootPath() const
Path where the custom needreboot config files are kept (configPath()/needreboot.d).
Definition: ZConfig.cc:1005
zypp::ZConfig::setUserData
bool setUserData(const std::string &str_r)
Set a new userData string.
Definition: ZConfig.cc:904
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:1067
zypp::ZConfig::repo_add_probe
bool repo_add_probe() const
Whether repository urls should be probed.
Definition: ZConfig.cc:1028
zypp::ZConfig::rpmInstallFlags
target::rpm::RpmInstFlags rpmInstallFlags() const
The default target::rpm::RpmInstFlags for ZYppCommitPolicy.
Definition: ZConfig.cc:1170
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:1162
zypp::ZConfig::solver_upgradeTestcasesToKeep
unsigned solver_upgradeTestcasesToKeep() const
When committing a dist upgrade (e.g.
Definition: ZConfig.cc:1117
zypp::ZConfig::repoMetadataPath
Pathname repoMetadataPath() const
Path where the repo metadata is downloaded and kept (repoCachePath()/raw).
Definition: ZConfig.cc:937
zypp::ZConfig::vendorPath
Pathname vendorPath() const
Directory for equivalent vendor definitions (configPath()/vendors.d)
Definition: ZConfig.cc:1014
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:1061
zypp::ZConfig::commit_downloadMode
DownloadMode commit_downloadMode() const
Commit download policy to use as default.
Definition: ZConfig.cc:1077
zypp::ZConfig::needrebootFile
Pathname needrebootFile() const
Path of the default needreboot config file (configPath()/needreboot).
Definition: ZConfig.cc:1002
zypp::ZConfig::setGpgCheck
void setGpgCheck(bool val_r)
Change the value.
Definition: ZConfig.cc:1085
zypp::ZConfig::solver_dupAllowVendorChange
bool solver_dupAllowVendorChange() const
DUP tune: Whether to allow package vendor changes upon DUP.
Definition: ZConfig.cc:1104
zypp::ZConfig::~ZConfig
~ZConfig()
Dtor.
Definition: ZConfig.cc:828
zypp::ZConfig::locksFile
Pathname locksFile() const
Path where zypp can find or create lock file (configPath()/locks)
Definition: ZConfig.cc:1020
zypp::ZConfig::_pimpl
RW_pointer< Impl, rw_pointer::Scoped< Impl > > _pimpl
Pointer to implementation.
Definition: ZConfig.h:567
zypp::ZConfig::repoSolvfilesPath
Pathname repoSolvfilesPath() const
Path where the repo solv files are created and kept (repoCachePath()/solv).
Definition: ZConfig.cc:948
zypp::ZConfig::historyLogFile
Pathname historyLogFile() const
Path where ZYpp install history is logged.
Definition: ZConfig.cc:1174
zypp::ZConfig::setSystemArchitecture
void setSystemArchitecture(const Arch &arch_r)
Override the zypp system architecture.
Definition: ZConfig.cc:859
zypp::ZConfig::pkgGpgCheck
TriBool pkgGpgCheck() const
Check rpm package signatures (indeterminate - according to gpgcheck)
Definition: ZConfig.cc:1083
zypp::ZConfig::instance
static ZConfig & instance()
Singleton ctor.
Definition: Resolver.cc:126
zypp::ZConfig::setRepoPackagesPath
void setRepoPackagesPath(const Pathname &path_r)
Set a new path as the default repo cache path.
Definition: ZConfig.cc:965
zypp::ZConfig::setRepoSolvfilesPath
void setRepoSolvfilesPath(const Pathname &path_r)
Set a new path as the default repo cache path.
Definition: ZConfig.cc:954
zypp::ZConfig::resetUpdateMessagesNotify
void resetUpdateMessagesNotify()
Reset to the zypp.conf default.
Definition: ZConfig.cc:1165
zypp::ZConfig::about
std::ostream & about(std::ostream &str) const
Print some detail about the current libzypp version.
Definition: ZConfig.cc:1209
zypp::ZConfig::multiversionSpec
const std::set< std::string > & multiversionSpec() const
Definition: ZConfig.cc:1132
zypp::ZConfig::set_download_mediaMountdir
void set_download_mediaMountdir(Pathname newval_r)
Set alternate value.
Definition: ZConfig.cc:1074
zypp::ZConfig::download_use_deltarpm
bool download_use_deltarpm() const
Whether to consider using a deltarpm when downloading a package.
Definition: ZConfig.cc:1043
zypp::ZConfig::repoGpgCheck
TriBool repoGpgCheck() const
Check repo matadata signatures (indeterminate - according to gpgcheck)
Definition: ZConfig.cc:1082
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:1052
zypp::ZConfig::updateMessagesNotify
std::string updateMessagesNotify() const
Command definition for sending update messages.
Definition: ZConfig.cc:1159
zypp::ZConfig::addMultiversionSpec
void addMultiversionSpec(const std::string &name_r)
Definition: ZConfig.cc:1135
zypp::ZConfig::builtinRepoCachePath
Pathname builtinRepoCachePath() const
The builtin config file value.
Definition: ZConfig.cc:970
zypp::ZConfig::builtinRepoPackagesPath
Pathname builtinRepoPackagesPath() const
The builtin config file value.
Definition: ZConfig.cc:979
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:1109
zypp::ZConfig::builtinRepoMetadataPath
Pathname builtinRepoMetadataPath() const
The builtin config file value.
Definition: ZConfig.cc:973
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:1055
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:1113
zypp::ZConfig::resetGpgCheck
void resetGpgCheck()
Reset to the zconfig default.
Definition: ZConfig.cc:1089
zypp::ZConfig::setSolverUpgradeRemoveDroppedPackages
void setSolverUpgradeRemoveDroppedPackages(bool val_r)
Set solverUpgradeRemoveDroppedPackages to val_r.
Definition: ZConfig.cc:1121
zypp::ZConfig::configPath
Pathname configPath() const
Path where the configfiles are kept (/etc/zypp).
Definition: ZConfig.cc:984
zypp::ZConfig::defaultSystemArchitecture
static Arch defaultSystemArchitecture()
The autodetected system architecture.
Definition: ZConfig.cc:850
zypp::ZConfig::ZConfig
ZConfig()
Default ctor.
Definition: ZConfig.cc:817
zypp::ZConfig::pubkeyCachePath
Pathname pubkeyCachePath() const
Path where the pubkey caches.
Definition: ZConfig.cc:927
zypp::ZConfig::download_max_concurrent_connections
long download_max_concurrent_connections() const
Maximum number of concurrent connections for a single transfer.
Definition: ZConfig.cc:1058
zypp::ZConfig::resetPkgGpgCheck
void resetPkgGpgCheck()
Reset to the zconfig default.
Definition: ZConfig.cc:1091
zypp::ZConfig::solver_onlyRequires
bool solver_onlyRequires() const
Solver regards required packages,patterns,...
Definition: ZConfig.cc:1095
zypp::ZConfig::varsPath
Pathname varsPath() const
Path containing custom repo variable definitions (configPath()/vars.d).
Definition: ZConfig.cc:1008
zypp::ZConfig::solver_dupAllowNameChange
bool solver_dupAllowNameChange() const
DUP tune: Whether to follow package renames upon DUP.
Definition: ZConfig.cc:1102
zypp::ZConfig::repoLabelIsAlias
bool repoLabelIsAlias() const
Whether to use repository alias or name in user messages (progress, exceptions, .....
Definition: ZConfig.cc:1037
zypp::ZConfig::clearMultiversionSpec
void clearMultiversionSpec()
Definition: ZConfig.cc:1134
zypp::ZConfig::repoRefreshLocales
LocaleSet repoRefreshLocales() const
List of locales for which translated package descriptions should be downloaded.
Definition: ZConfig.cc:1034
zypp::ZConfig::download_max_download_speed
long download_max_download_speed() const
Maximum download speed (bytes per second)
Definition: ZConfig.cc:1064
zypp::ZConfig::setRepoMetadataPath
void setRepoMetadataPath(const Pathname &path_r)
Set a new path as the default repo cache path.
Definition: ZConfig.cc:943
zypp::ZConfig::solver_dupAllowDowngrade
bool solver_dupAllowDowngrade() const
DUP tune: Whether to allow version downgrades upon DUP.
Definition: ZConfig.cc:1101
zypp::ZConfig::multiversionKernels
std::string multiversionKernels() const
Definition: ZConfig.cc:1202
zypp::ZConfig::distroverpkg
std::string distroverpkg() const
Package telling the "product version" on systems not using /etc/product.d/baseproduct.
Definition: ZConfig.cc:1194
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:1046
zypp::ZConfig::setRepoCachePath
void setRepoCachePath(const Pathname &path_r)
Set a new path as the default repo cache path.
Definition: ZConfig.cc:932
zypp::ZConfig::setRepoGpgCheck
void setRepoGpgCheck(TriBool val_r)
Change the value.
Definition: ZConfig.cc:1086
zypp::ZConfig::credentialsGlobalDir
Pathname credentialsGlobalDir() const
Defaults to /etc/zypp/credentials.d.
Definition: ZConfig.cc:1180
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:1049
zypp::ZConfig::credentialsGlobalFile
Pathname credentialsGlobalFile() const
Defaults to /etc/zypp/credentials.cat.
Definition: ZConfig.cc:1186
zypp::filesystem::PathInfo
Wrapper class for ::stat/::lstat.
Definition: PathInfo.h:221
zypp::filesystem::Pathname
Pathname.
Definition: Pathname.h:45
zypp::filesystem::Pathname::extend
Pathname extend(const std::string &r) const
Append string r to the last component of the path.
Definition: Pathname.h:170
zypp::filesystem::Pathname::empty
bool empty() const
Test for an empty path.
Definition: Pathname.h:114
zypp::filesystem::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:235
zypp::parser::IniDict
Parses a INI file and offers its structure as a dictionary.
Definition: IniDict.h:42
zypp::parser::IniDict::sectionsEnd
section_const_iterator sectionsEnd() const
Definition: IniDict.cc:110
zypp::parser::IniDict::entry_const_iterator
EntrySet::const_iterator entry_const_iterator
Definition: IniDict.h:48
zypp::parser::IniDict::section_const_iterator
MapKVIteratorTraits< SectionSet >::Key_const_iterator section_const_iterator
Definition: IniDict.h:47
zypp::parser::IniDict::entriesBegin
entry_const_iterator entriesBegin(const std::string &section) const
Definition: IniDict.cc:72
zypp::parser::IniDict::sectionsBegin
section_const_iterator sectionsBegin() const
Definition: IniDict.cc:105
zypp::parser::IniDict::entriesEnd
entry_const_iterator entriesEnd(const std::string &section) const
Definition: IniDict.cc:83
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:618
zypp::str::regex
Regular expression.
Definition: Regex.h:95
zypp::str::smatch
Regular expression match result.
Definition: Regex.h:163
zypp::TriBool
boost::logic::tribool TriBool
3-state boolean logic (true, false and indeterminate).
Definition: String.h:30
std
Definition: Arch.h:348
str
String related utilities and Regular expression matching.
zypp::filesystem
Types and functions for filesystem operations.
Definition: Glob.cc:24
zypp::filesystem::dirForEach
int dirForEach(const Pathname &dir_r, function< bool(const Pathname &, const char *const)> fnc_r)
Invoke callback function fnc_r for each entry in directory dir_r.
Definition: PathInfo.cc:551
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:29
zypp::str::hasPrefix
bool hasPrefix(const C_Str &str_r, const C_Str &prefix_r)
Return whether str_r has prefix prefix_r.
Definition: String.h:1023
zypp::str::strToTriBool
TriBool strToTriBool(const C_Str &str)
Parse str into a bool if it's a legal true or false string; else indterminate.
Definition: String.cc:93
zypp::str::regex_match
bool regex_match(const std::string &s, smatch &matches, const regex &regex)
\relates regex \ingroup ZYPP_STR_REGEX \relates regex \ingroup ZYPP_STR_REGEX
Definition: Regex.h:70
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:426
zypp::str::split
unsigned split(const C_Str &line_r, TOutputIterator result_r, const C_Str &sepchars_r=" \t", const Trim trim_r=NO_TRIM)
Split line_r into words.
Definition: String.h:527
zypp::str::strtonum
TInt strtonum(const C_Str &str)
Parsing numbers from string.
Definition: String.h:385
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:591
zypp::str::compareCI
int compareCI(const C_Str &lhs, const C_Str &rhs)
Definition: String.h:980
zypp::target::rpm::RPMINST_EXCLUDEDOCS
@ RPMINST_EXCLUDEDOCS
Definition: RpmFlags.h:40
zypp
Easy-to use interface to the ZYPP dependency resolver.
Definition: CodePitfalls.doc:2
zypp::fromString
bool fromString(const std::string &val_r, ResolverFocus &ret_r)
Definition: ResolverFocus.cc:39
zypp::ResolverFocus
ResolverFocus
The resolvers general attitude.
Definition: ResolverFocus.h:22
zypp::ResolverFocus::Default
@ Default
Request the standard behavior (as defined in zypp.conf or 'Job')
zypp::LocaleSet
std::unordered_set< Locale > LocaleSet
Definition: Locale.h:27
zypp::DownloadMode
DownloadMode
Supported commit download policies.
Definition: DownloadMode.h:23
zypp::DownloadDefault
@ DownloadDefault
libzypp will decide what to do.
Definition: DownloadMode.h:24
PoolImpl.h
zypp::DefaultOption
Mutable option with initial value also remembering a config value.
Definition: ZConfig.cc:265
zypp::DefaultOption::DefaultOption
DefaultOption(value_type initial_r)
Definition: ZConfig.cc:269
zypp::DefaultOption::operator=
DefaultOption & operator=(value_type newval_r)
Definition: ZConfig.cc:274
zypp::DefaultOption::_default
option_type _default
Definition: ZConfig.cc:294
zypp::DefaultOption::setDefault
void setDefault(value_type newval_r)
Set a new default value.
Definition: ZConfig.cc:290
zypp::DefaultOption::restoreToDefault
void restoreToDefault(value_type newval_r)
Reset value to a new default.
Definition: ZConfig.cc:282
zypp::DefaultOption::getDefault
const value_type & getDefault() const
Get the current default value.
Definition: ZConfig.cc:286
zypp::DefaultOption::value_type
Tp value_type
Definition: ZConfig.cc:266
zypp::DefaultOption::option_type
Option< Tp > option_type
Definition: ZConfig.cc:267
zypp::DefaultOption::restoreToDefault
void restoreToDefault()
Reset value to the current default.
Definition: ZConfig.cc:278
zypp::Option
Mutable option.
Definition: ZConfig.cc:235
zypp::Option::set
void set(value_type newval_r)
Set a new value.
Definition: ZConfig.cc:255
zypp::Option::Option
Option(value_type initial_r)
No default ctor, explicit initialisation!
Definition: ZConfig.cc:239
zypp::Option::_val
value_type _val
Definition: ZConfig.cc:259
zypp::Option::operator=
Option & operator=(value_type newval_r)
Definition: ZConfig.cc:243
zypp::Option::value_type
Tp value_type
Definition: ZConfig.cc:236
zypp::Option::get
const value_type & get() const
Get the value.
Definition: ZConfig.cc:247
zypp::ZConfig::Impl::MultiversionMap
Definition: ZConfig.cc:719
zypp::ZConfig::Impl::MultiversionMap::getDefaultSpec
MultiversionSpec & getDefaultSpec()
Definition: ZConfig.cc:746
zypp::ZConfig::Impl::MultiversionMap::scanDirAt
void scanDirAt(const Pathname root_r, MultiversionSpec &spec_r, const Impl &zConfImpl_r)
Definition: ZConfig.cc:766
zypp::ZConfig::Impl::MultiversionMap::_specMap
SpecMap _specMap
Definition: ZConfig.cc:791
zypp::ZConfig::Impl::MultiversionMap::SpecMap
std::map< Pathname, MultiversionSpec > SpecMap
Definition: ZConfig.cc:720
zypp::ZConfig::Impl::MultiversionMap::getSpec
MultiversionSpec & getSpec(Pathname root_r, const Impl &zConfImpl_r)
Definition: ZConfig.cc:722
zypp::ZConfig::Impl::MultiversionMap::scanConfAt
void scanConfAt(const Pathname root_r, MultiversionSpec &spec_r, const Impl &zConfImpl_r)
Definition: ZConfig.cc:750
zypp::sat::detail::PoolMember::myPool
static PoolImpl & myPool()
Definition: PoolImpl.cc:178