-------------------------------------------------------------------
+Mon May 22 19:03:20 CEST 2006 - mvidner@suse.cz
+
+- Added SourceManager::findSourceByUrl to overcome alias mismatches
+ (#177543).
+- rev 3420
+
+-------------------------------------------------------------------
Mon May 22 17:19:25 CEST 2006 - ma@suse.de
- Order all objects according to prerequirements, not just packages.
{
if (it->second.alias() == alias_r) {
return it->second;
- break;
}
-
}
ZYPP_THROW(Exception("Unknown source name '"+alias_r+"'"));
/*NOTREACHED*/
return it->second; // just to keep gcc happy
}
+ Source_Ref SourceManager::findSourceByUrl(const Url & url_r)
+ {
+ SourceMap::iterator it;
+ for (it = _sources.begin(); it != _sources.end(); ++it)
+ {
+ if (it->second.url().asCompleteString() == url_r.asCompleteString()) {
+ return it->second;
+ }
+ }
+ ZYPP_THROW(Exception("Unknown source URL '"+url_r.asString()+"'"));
+ /*NOTREACHED*/
+ return it->second; // just to keep gcc happy
+ }
+
/////////////////////////////////////////////////////////////////
// FailedSourcesRestoreException
///////////////////////////////////////////////////////////////////
Source_Ref findSource(const std::string & alias_r);
/**
+ * Find a source with a specified URL.
+ * URLs are unique in zenworks but NOT in zypp.
+ * A bug in SL 10.1 causes alias mismatches so we have to resort to URLs.
+ * #177543
+ *
+ * \throws Exception
+ */
+ Source_Ref findSourceByUrl(const Url & url_r);
+
+ /**
* Return the list of the currently enabled sources
*
*/