~thopiekar/zypper/libzypp-manual-import

« back to all changes in this revision

Viewing changes to zypp/ZConfig.cc

  • Committer: Thomas-Karl Pietrowski
  • Date: 2015-08-15 15:59:50 UTC
  • Revision ID: thopiekar@googlemail.com-20150815155950-j66qn38efmvn289t
syncing with "changes 15.13.0 (11)"  #9a0aca7e3a21d768491b141a8ae86ef0c3fbc227
* https://github.com/openSUSE/libzypp/commit/9a0aca7e3a21d768491b141a8ae86ef0c3fbc227

Show diffs side-by-side

added added

removed removed

Lines of Context:
184
184
     */
185
185
    Locale _autodetectTextLocale()
186
186
    {
187
 
      Locale ret( "en" );
 
187
      Locale ret( Locale::enCode );
188
188
      const char * envlist[] = { "LC_ALL", "LC_MESSAGES", "LANG", NULL };
189
189
      for ( const char ** envvar = envlist; *envvar; ++envvar )
190
190
      {
195
195
          if ( envstr != "POSIX" && envstr != "C" )
196
196
          {
197
197
            Locale lang( envstr );
198
 
            if ( ! lang.code().empty() )
 
198
            if ( lang )
199
199
            {
200
200
              MIL << "Found " << *envvar << "=" << envstr << endl;
201
201
              ret = lang;
305
305
        , download_max_silent_tries     ( 5 )
306
306
        , download_transfer_timeout     ( 180 )
307
307
        , commit_downloadMode           ( DownloadDefault )
 
308
        , gpgCheck                      ( true )
 
309
        , repoGpgCheck                  ( indeterminate )
 
310
        , pkgGpgCheck                   ( indeterminate )
308
311
        , solver_onlyRequires           ( false )
309
312
        , solver_allowVendorChange      ( false )
310
313
        , solver_cleandepsOnRemove      ( false )
440
443
                {
441
444
                  commit_downloadMode.set( deserializeDownloadMode( value ) );
442
445
                }
 
446
                else if ( entry == "gpgcheck" )
 
447
                {
 
448
                  gpgCheck.set( str::strToBool( value, gpgCheck ) );
 
449
                }
 
450
                else if ( entry == "repo_gpgcheck" )
 
451
                {
 
452
                  repoGpgCheck.set( str::strToTriBool( value ) );
 
453
                }
 
454
                else if ( entry == "pkg_gpgcheck" )
 
455
                {
 
456
                  pkgGpgCheck.set( str::strToTriBool( value ) );
 
457
                }
443
458
                else if ( entry == "vendordir" )
444
459
                {
445
460
                  cfg_vendor_path = Pathname(value);
472
487
                {
473
488
                  solver_checkSystemFile = Pathname(value);
474
489
                }
 
490
                else if ( entry == "solver.checkSystemFileDir" )
 
491
                {
 
492
                  solver_checkSystemFileDir = Pathname(value);
 
493
                }
475
494
                else if ( entry == "multiversion" )
476
495
                {
477
 
                  str::split( value, inserter( _multiversion, _multiversion.end() ), ", \t" );
 
496
                  str::splitEscaped( value, inserter( _multiversion, _multiversion.end() ), ", \t" );
478
497
                }
479
498
                else if ( entry == "locksfile.path" )
480
499
                {
585
604
 
586
605
    Option<DownloadMode> commit_downloadMode;
587
606
 
 
607
    Option<bool>        gpgCheck;
 
608
    Option<TriBool>     repoGpgCheck;
 
609
    Option<TriBool>     pkgGpgCheck;
 
610
 
588
611
    Option<bool>        solver_onlyRequires;
589
612
    Option<bool>        solver_allowVendorChange;
590
613
    Option<bool>        solver_cleandepsOnRemove;
592
615
    DefaultOption<bool> solverUpgradeRemoveDroppedPackages;
593
616
 
594
617
    Pathname solver_checkSystemFile;
 
618
    Pathname solver_checkSystemFileDir;
595
619
 
596
620
    std::set<std::string> &             multiversion()          { return getMultiversion(); }
597
621
    const std::set<std::string> &       multiversion() const    { return getMultiversion(); }
866
890
  DownloadMode ZConfig::commit_downloadMode() const
867
891
  { return _pimpl->commit_downloadMode; }
868
892
 
 
893
  bool ZConfig::gpgCheck() const
 
894
  { return _pimpl->gpgCheck; }
 
895
 
 
896
  TriBool ZConfig::repoGpgCheck() const
 
897
  { return _pimpl->repoGpgCheck; }
 
898
 
 
899
  TriBool ZConfig::pkgGpgCheck() const
 
900
  { return _pimpl->pkgGpgCheck; }
 
901
 
869
902
  bool ZConfig::solver_onlyRequires() const
870
903
  { return _pimpl->solver_onlyRequires; }
871
904
 
879
912
  { return ( _pimpl->solver_checkSystemFile.empty()
880
913
      ? (configPath()/"systemCheck") : _pimpl->solver_checkSystemFile ); }
881
914
 
 
915
  Pathname ZConfig::solver_checkSystemFileDir() const
 
916
  { return ( _pimpl->solver_checkSystemFileDir.empty()
 
917
      ? (configPath()/"systemCheck.d") : _pimpl->solver_checkSystemFileDir ); }
 
918
 
882
919
  unsigned ZConfig::solver_upgradeTestcasesToKeep() const
883
920
  { return _pimpl->solver_upgradeTestcasesToKeep; }
884
921