Imported Upstream version 16.3.2
[platform/upstream/libzypp.git] / zypp / repo / Downloader.cc
index 332b72b..51ccd37 100644 (file)
@@ -52,8 +52,8 @@ void Downloader::defaultDownloadMasterIndex( MediaSetAccess & media_r, const Pat
   Pathname keypath = masterIndex_r.extend( ".key" );
 
   // always download them, even if repoGpgCheck is disabled
-  enqueue( OnMediaLocation( sigpath, 1 ).setOptional( true ).setDownloadSize( ByteCount( 20, ByteCount::MB ) ) );
-  enqueue( OnMediaLocation( keypath, 1 ).setOptional( true ).setDownloadSize( ByteCount( 20, ByteCount::MB ) ) );
+  enqueue( OnMediaLocation( sigpath, 1 ).setOptional( true ) );
+  enqueue( OnMediaLocation( keypath, 1 ).setOptional( true ) );
   start( destdir_r, media_r );
   reset();
 
@@ -63,7 +63,7 @@ void Downloader::defaultDownloadMasterIndex( MediaSetAccess & media_r, const Pat
 
   if ( repoInfo().repoGpgCheck() )
   {
-    if ( isSigned || repoInfo().repoGpgCheckIsMandatory() )
+    if ( isSigned || !repoInfo().pkgGpgCheck() )
     {
       // only add the signature if it exists
       if ( isSigned )
@@ -83,7 +83,7 @@ void Downloader::defaultDownloadMasterIndex( MediaSetAccess & media_r, const Pat
     }
     else
     {
-      WAR << "Accept unsigned repository because repoGpgCheck is not mandatory for " << repoInfo().alias() << endl;
+      WAR << "Accept unsigned repository because pkgGpgCheck is on for " << repoInfo().alias() << endl;
     }
   }
   else
@@ -91,7 +91,7 @@ void Downloader::defaultDownloadMasterIndex( MediaSetAccess & media_r, const Pat
     WAR << "Signature checking disabled in config of repository " << repoInfo().alias() << endl;
   }
 
-  enqueue( OnMediaLocation( masterIndex_r, 1 ).setDownloadSize( ByteCount( 20, ByteCount::MB ) ), checker ? checker : FileChecker(NullFileChecker()) );
+  enqueue( OnMediaLocation( masterIndex_r, 1 ), checker ? checker : FileChecker(NullFileChecker()) );
   start( destdir_r, media_r );
   reset();