-------------------------------------------------------------------
+Mon Apr 10 10:32:22 CEST 2006 - mvidner@suse.cz
+
+- Added Product::updateUrls, from content/UPDATEURLS (#163192).
+- rev 3024
+
+-------------------------------------------------------------------
Sat Apr 8 12:03:37 CEST 2006 - schubi@suse.de
- Bug 164440; Taking wrong architecture while updating obsoletes
Url Product::releaseNotesUrl() const
{ return pimpl().releaseNotesUrl(); }
+ std::list<Url> Product::updateUrls() const
+ { return pimpl().updateUrls(); }
+
std::list<std::string> Product::flags() const
{ return pimpl().flags(); }
/** The URL to download the release notes for this product */
Url releaseNotesUrl() const;
+ /** Online updates for the product.
+ They are complementary, not alternatives. #163192 */
+ std::list<Url> updateUrls() const;
+
/** The product flags */
std::list<std::string> flags() const;
Url ProductImplIf::releaseNotesUrl() const
{ return Url(); }
+ std::list<Url> ProductImplIf::updateUrls() const
+ { return std::list<Url>(); }
+
std::list<std::string> ProductImplIf::flags() const
{ return std::list<std::string>(); }
virtual Url releaseNotesUrl() const PURE_VIRTUAL;
+ virtual std::list<Url> updateUrls() const PURE_VIRTUAL;
/** The product flags */
virtual std::list<std::string> flags() const PURE_VIRTUAL;
prodImpl->_release_notes_url = Url();
}
}
+ else if(key == "UPDATEURL")
+ {
+ std::list<std::string> items;
+ boost::algorithm::split(items, value, is_space());
+ std::list<std::string>::const_iterator
+ b = items.begin(),
+ e = items.end(),
+ i;
+ for (i = b; i != e; ++i)
+ {
+ // Url class throws in case of invalid URL
+ try
+ {
+ Url url = *i;
+ prodImpl->_update_urls.push_back( url );
+ }
+ catch( ... )
+ {
+ // do not add
+ }
+ }
+ }
else if(key == "ARCH")
parseLine( key, modifier, value, prodImpl->_arch);
else if(key == "DEFAULTBASE")
Url SuseTagsProductImpl::releaseNotesUrl() const
{ return _release_notes_url; }
+ std::list<Url> SuseTagsProductImpl::updateUrls() const
+ { return _update_urls; }
+
std::list<std::string> SuseTagsProductImpl::flags() const
{ return _flags; }
virtual TranslatedText summary() const;
virtual Source_Ref source() const;
virtual Url releaseNotesUrl() const;
+ virtual std::list<Url> updateUrls() const;
virtual std::list<std::string> flags() const;
virtual TranslatedText shortName() const;
std::string _shortlabel;
std::string _vendor;
Url _release_notes_url;
+ std::list<Url> _update_urls;
std::map< std::string, std::list<std::string> > _arch; // map of 'arch : "arch1 arch2 arch3"', arch1 being 'best', arch3 being 'noarch' (ususally)
std::string _default_base;
Dependencies _deps;
out << " <vendor>" << xml_escape(obj->vendor()) << "</vendor>" << std::endl;
out << " <source>" << xml_escape(obj->source().alias()) << "</source>" << std::endl;
out << " <release-notes-url>" << xml_escape(obj->releaseNotesUrl().asString()) << "</release-notes-url>" << std::endl;
+ out << " <update-urls>" << std::endl;
+ std::list<Url> updateUrls = obj->updateUrls();
+ for ( std::list<Url>::const_iterator it = updateUrls.begin(); it != updateUrls.end(); ++it)
+ {
+ out << " <update-url>" << xml_escape(it->asString()) << "</update-url>" << std::endl;
+ }
+ out << " </update-urls>" << std::endl;
out << " <product-flags>" << std::endl;
std::list<std::string> flags = obj->flags();
for ( std::list<std::string>::const_iterator it = flags.begin(); it != flags.end(); ++it)