Imported Upstream version 16.3.2
[platform/upstream/libzypp.git] / zypp / repo / SUSEMediaVerifier.cc
index 3d920e3..5145e2c 100644 (file)
@@ -8,7 +8,6 @@
 \---------------------------------------------------------------------*/
 
 #include <fstream>
-#include "zypp/base/Logger.h"
 #include "zypp/repo/SUSEMediaVerifier.h"
 
 using namespace std;
@@ -32,7 +31,7 @@ SUSEMediaVerifier::SUSEMediaVerifier( int media_nr, const Pathname &path_r )
   std::ifstream str(path_r.asString().c_str());
   std::string vendor;
   std::string id;
-
+  
   if ( str )
   {
     getline(str, _media_vendor);
@@ -51,22 +50,16 @@ bool SUSEMediaVerifier::isDesiredMedia(const media::MediaAccessRef &ref)
     return true;
 
   Pathname media_file = "/media." + str::numstring(_media_nr) + "/media";
-  ref->provideFile (media_file, 0);
+  ref->provideFile (media_file);
   media_file = ref->localPath(media_file);
   std::ifstream str(media_file.asString().c_str());
   std::string vendor;
   std::string id;
+#warning check the stream status
   getline(str, vendor);
   getline(str, id);
 
-  bool ret = ( vendor == _media_vendor && id == _media_id  );
-  if ( !ret ) {
-    DBG << "cached vendor: " << _media_vendor << endl;
-    DBG << "repo vendor: " << vendor << endl;
-    DBG << "cached id: " << _media_id << endl;
-    DBG << "repo id: " << id << endl;
-  }
-  return ret;
+  return (vendor == _media_vendor && id == _media_id );
 }
 
 }