#include "zypp/base/String.h"
#include "zypp/base/Logger.h"
+#include "zypp/base/LogControl.h"
#include "zypp/base/Exception.h"
#include "zypp/base/Algorithm.h"
static bool show_mediaid = false;
static string globalPath;
static string architecture; // run with this architecture
+static list<string> locales;
static ZYpp::Ptr God;
static SourceManager_Ptr manager;
try {
Url url("file:/");
+ if (type == "url") {
+ url = Url( filename );
+ pathname = "";
+ }
+
media::MediaManager mmgr;
media::MediaId mediaid = mmgr.open(url);
HelixSourceImpl *impl = new HelixSourceImpl ();
string type = node->getProp ("type");
load_source (name, file, type, false);
+ } else if (node->equals ("source")) {
+
+ string url = node->getProp ("url");
+ string alias = node->getProp ("name");
+ load_source( alias, url, "url", false );
+
} else if (node->equals ("undump")) {
string file = node->getProp ("file");
show_mediaid = true;
} else if (node->equals ("arch")) {
architecture = node->getProp ("name");
+ } else if (node->equals ("locale")) {
+ locales.push_back( node->getProp ("name") );
} else {
cerr << "Unrecognized tag '" << node->name() << "' in setup" << endl;
}
resolver->setForceResolve (forceResolve);
if (!architecture.empty()) {
- resolver->setArchitecture( Arch( architecture ) );
+ God->setArchitecture( Arch( architecture ) );
+ }
+
+ if (!locales.empty()) {
+ ZYpp::LocaleSet lset;
+ for (list<string>::iterator it = locales.begin(); it != locales.end(); ++it)
+ lset.insert( Locale( *it ) );
+ God->setRequestedLocales( lset );
}
node = node->children();
cerr << "Usage: deptestomatic testfile.xml" << endl;
exit (0);
}
+ zypp::base::LogControl::instance().logfile( "-" );
+
forceResolve = false;
manager = SourceManager::sourceManager();
God = zypp::getZYpp();