Author: mlandres Date: Sat Aug 4 00:59:07 2007 New Revision: 6470 URL: http://svn.opensuse.org/viewcvs/zypp?rev=6470&view=rev Log: - Don't download unwanted translation files (#293740). Modified: trunk/libzypp/devel/devel.ma/Parse.cc trunk/libzypp/zypp/repo/susetags/Downloader.cc Modified: trunk/libzypp/devel/devel.ma/Parse.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/devel/devel.ma/Parse.cc?rev=6470&r1=6469&r2=6470&view=diff ============================================================================== --- trunk/libzypp/devel/devel.ma/Parse.cc (original) +++ trunk/libzypp/devel/devel.ma/Parse.cc Sat Aug 4 00:59:07 2007 @@ -318,15 +318,15 @@ if ( ! nrepo.enabled() ) continue; - if ( ! repoManager.isCached( nrepo ) || 0 ) + if ( ! repoManager.isCached( nrepo ) || 1 ) { if ( repoManager.isCached( nrepo ) ) { SEC << "cleanCache" << endl; repoManager.cleanCache( nrepo ); } - //SEC << "refreshMetadat" << endl; - //repoManager.refreshMetadata( nrepo ); + SEC << "refreshMetadata" << endl; + repoManager.refreshMetadata( nrepo ); SEC << "buildCache" << endl; repoManager.buildCache( nrepo ); } Modified: trunk/libzypp/zypp/repo/susetags/Downloader.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/repo/susetags/Downloader.cc?rev=6470&r1=6469&r2=6470&view=diff ============================================================================== --- trunk/libzypp/zypp/repo/susetags/Downloader.cc (original) +++ trunk/libzypp/zypp/repo/susetags/Downloader.cc Sat Aug 4 00:59:07 2007 @@ -1,9 +1,14 @@ +#include <iostream> #include <fstream> + +#include "zypp/base/Logger.h" #include "zypp/base/String.h" #include "zypp/OnMediaLocation.h" #include "zypp/MediaSetAccess.h" #include "zypp/Fetcher.h" +#include "zypp/Locale.h" +#include "zypp/ZConfig.h" #include "zypp/repo/MediaInfoDownloader.h" #include "zypp/repo/susetags/Downloader.h" @@ -89,6 +94,29 @@ // error ZYPP_THROW(Exception("bad META line")); } + // omit unwanted translations + if ( str::hasPrefix( words[3], "packages" ) ) + { + std::string rest( str::stripPrefix( words[3], "packages" ) ); + if ( ! ( rest.empty() + || rest == ".DU" + || rest == ".en" ) ) + { + // Not 100% correct as we take each fallback of textLocale + Locale toParse( ZConfig::instance().textLocale() ); + while ( toParse != Locale::noCode ) + { + if ( rest == ("."+toParse.code()) ) + break; + toParse = toParse.fallback(); + } + if ( toParse == Locale::noCode ) + { + // discard + continue; + } + } + } OnMediaLocation location( _path + descr_dir + words[3], 1 ); location.setChecksum( CheckSum( words[1], words[2] ) ); this->enqueueDigested(location); -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org