LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File libzypp-skip-appdata-crap.patch of Package libzypp (Project home:seife:testing)

Index: b/zypp/repo/susetags/Downloader.cc
===================================================================
--- a/zypp/repo/susetags/Downloader.cc
+++ b/zypp/repo/susetags/Downloader.cc
@@ -156,6 +156,13 @@ void Downloader::download( MediaSetAcces
         }
       }
     }
+    else if ( getenv("ZYPP_FETCH_APPDATA") == NULL &&
+              ( str::contains( it->first, "appdata" ) || str::contains( it->first, "app-icons" ) || str::contains( it->first, "appdata-icons" ) ) )
+    {
+      MIL << "skipping " << it->first << endl;
+      continue;
+    }
+
     MIL << "adding job " << it->first << endl;
     OnMediaLocation location( repoInfo().path() + descr_dir + it->first, 1 );
     location.setChecksum( it->second );
Index: b/zypp/repo/yum/Downloader.cc
===================================================================
--- a/zypp/repo/yum/Downloader.cc
+++ b/zypp/repo/yum/Downloader.cc
@@ -117,6 +117,12 @@ namespace
       if ( dtype_r == ResourceType::OTHER || dtype_r == ResourceType::FILELISTS )
 	return true;	// skip it
 
+      if ( getenv("ZYPP_FETCH_APPDATA") == NULL && ( typestr_r == "appdata" || typestr_r == "app-icons" || typestr_r == "appdata-icons" ))
+      {
+	MIL << "skipping " << loc_r.filename() << endl;
+	return true;
+      }
+
       // filter custom resource types (by string)
       if ( dtype_r == ResourceType::NONE )
       {