Author: mlandres
Date: Fri Aug 3 20:28:22 2007
New Revision: 6464
URL: http://svn.opensuse.org/viewcvs/zypp?rev=6464&view=rev
Log:
- Add product attribute 'type' (aka 'category' which is now
deprecated). Adapted sustags and yum parsers to parse and
provide this value.
Modified:
trunk/libzypp/VERSION.cmake
trunk/libzypp/devel/devel.ma/Parse.cc
trunk/libzypp/devel/devel.ma/Test.cc
trunk/libzypp/zypp/Product.cc
trunk/libzypp/zypp/Product.h
trunk/libzypp/zypp/cache/CacheAttributes.h
trunk/libzypp/zypp/cache/CacheStore.cc
trunk/libzypp/zypp/data/ResolvableData.h
trunk/libzypp/zypp/detail/ProductImplIf.cc
trunk/libzypp/zypp/detail/ProductImplIf.h
trunk/libzypp/zypp/parser/susetags/ContentFileReader.cc
trunk/libzypp/zypp/parser/yum/ProductFileReader.cc
trunk/libzypp/zypp/repo/cached/ProductImpl.cc
trunk/libzypp/zypp/repo/cached/ProductImpl.h
trunk/libzypp/zypp/repo/memory/ProductImpl.cc
trunk/libzypp/zypp/repo/memory/ProductImpl.h
trunk/libzypp/zypp/target/store/XMLFilesBackend.cc
trunk/libzypp/zypp/target/store/serialize.cc
trunk/libzypp/zypp/target/store/xml/XMLProductImpl.cc
trunk/libzypp/zypp/target/store/xml/XMLProductImpl.h
Modified: trunk/libzypp/VERSION.cmake
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/VERSION.cmake?rev=6464&r1=6463&r2=6464&view=diff
==============================================================================
--- trunk/libzypp/VERSION.cmake (original)
+++ trunk/libzypp/VERSION.cmake Fri Aug 3 20:28:22 2007
@@ -47,4 +47,4 @@
SET(LIBZYPP_MAJOR "3")
SET(LIBZYPP_MINOR "13")
SET(LIBZYPP_COMPATMINOR "13")
-SET(LIBZYPP_PATCH "10")
+SET(LIBZYPP_PATCH "11")
Modified: trunk/libzypp/devel/devel.ma/Parse.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/devel/devel.ma/Parse.cc?rev=6464&r1=6463&r2=6464&view=diff
==============================================================================
--- trunk/libzypp/devel/devel.ma/Parse.cc (original)
+++ trunk/libzypp/devel/devel.ma/Parse.cc Fri Aug 3 20:28:22 2007
@@ -48,18 +48,35 @@
{
bool operator()( const PoolItem & obj_r )
{
- handle( asKind<Pattern>( obj_r ) );
+ //handle( asKind<Package>( obj_r ) );
+ //handle( asKind<Pattern>( obj_r ) );
+ handle( asKind<Product>( obj_r ) );
return true;
}
+ void handle( const Package_constPtr & p )
+ {
+ if ( !p )
+ return;
+
+ MIL << p->mediaNr() << endl;
+ }
+
void handle( const Pattern_constPtr & p )
{
if ( !p )
return;
MIL << p << endl;
- if ( ! p->includes().empty() ) DBG << p->includes() << endl;
- if ( ! p->extends().empty() ) DBG << p->extends() << endl;
+ }
+
+ void handle( const Product_constPtr & p )
+ {
+ if ( !p )
+ return;
+
+ ERR << p << endl;
+ ERR << p->type() << endl;
}
template<class _C>
@@ -308,8 +325,8 @@
SEC << "cleanCache" << endl;
repoManager.cleanCache( nrepo );
}
- SEC << "refreshMetadat" << endl;
- repoManager.refreshMetadata( nrepo );
+ //SEC << "refreshMetadat" << endl;
+ //repoManager.refreshMetadata( nrepo );
SEC << "buildCache" << endl;
repoManager.buildCache( nrepo );
}
@@ -335,6 +352,15 @@
MIL << "Added target: " << pool << endl;
}
+ Capability _cap( CapFactory().parse<Language>( "de" ) );
+ SEC << "F" << endl;
+ forEachMatchIn( pool, Dep::FRESHENS, _cap, Print() );
+ SEC << "S" << endl;
+ forEachMatchIn( pool, Dep::SUPPLEMENTS, _cap, Print() );
+ SEC << "P" << endl;
+ forEachMatchIn( pool, Dep::PROVIDES, _cap, Print() );
+ SEC << endl;
+
std::for_each( pool.begin(), pool.end(), Xprint() );
///////////////////////////////////////////////////////////////////
Modified: trunk/libzypp/devel/devel.ma/Test.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/devel/devel.ma/Test.cc?rev=6464&r1=6463&r2=6464&view=diff
==============================================================================
--- trunk/libzypp/devel/devel.ma/Test.cc (original)
+++ trunk/libzypp/devel/devel.ma/Test.cc Fri Aug 3 20:28:22 2007
@@ -19,165 +19,13 @@
#include
#include
-#include "zypp/parser/TagParser.h"
-#include "zypp/parser/susetags/PackagesFileReader.h"
-#include "zypp/parser/susetags/PackagesLangFileReader.h"
-#include "zypp/parser/susetags/PatternFileReader.h"
-#include "zypp/parser/susetags/ContentFileReader.h"
-#include "zypp/parser/susetags/RepoIndex.h"
-#include "zypp/parser/susetags/RepoParser.h"
#include "zypp/cache/CacheStore.h"
using namespace std;
using namespace zypp;
-using namespace zypp::parser;
-using namespace zypp::parser::susetags;
///////////////////////////////////////////////////////////////////
-struct DummyConsumer : public zypp::data::ResolvableDataConsumer
- , private base::NonCopyable
-{
- std::string idString( const data::ResObject_Ptr & res_r, ResolvableTraits::KindType kind_r )
- {
- std::string ret( kind_r.asString() );
- ret += ":";
- ret += res_r->name;
- ret += "-";
- ret += res_r->edition.asString();
- ret += ".";
- ret += res_r->arch.asString();
- return ret;
- }
-
- data::RecordId _lastId;
- std::mapstd::string,data::RecordId _idMap;
- std::mapdata::RecordId,std::string _reverseMap;
-
- bool hasEntry( const std::string & id_r )
- {
- return _idMap.find( id_r ) != _idMap.end();
- }
-
- data::RecordId newId( const data::ResObject_Ptr & res_r, ResolvableTraits::KindType kind_r )
- {
- std::string id( idString( res_r, kind_r ) );
- if ( hasEntry( id ) )
- ZYPP_THROW(Exception(id));
- _idMap[id] = ++_lastId;
- _reverseMap[_lastId] = id;
- MIL << "NEW_ID " << _lastId << " - " << id << endl;
- logNew( res_r, kind_r );
- return _lastId;
- }
-
- data::RecordId getId( const data::ResObject_Ptr & res_r, ResolvableTraits::KindType kind_r )
- {
- std::string id( idString( res_r, kind_r ) );
- if ( ! hasEntry( id ) )
- ZYPP_THROW(Exception(id));
- data::RecordId ret = _idMap[id];
- DBG << ret << " " << id << endl;
- return ret;
- }
-
- std::string lookup( data::RecordId id_r )
- {
- if ( id_r == data::noRecordId )
- {
- return "";
- }
-
- if ( _reverseMap.find( id_r ) != _reverseMap.end() )
- {
- return _reverseMap[id_r];
- }
-
- WAR << "Lookup id " << id_r << "failed" << endl;
- return std::string();
- }
-
- void logNew( const data::ResObject_Ptr & res_r, ResolvableTraits::KindType kind_r )
- {
- std::string shr( lookup( res_r->shareDataWith ) );
- if ( ! shr.empty() )
- {
- DBG << " SHR: " << shr << endl;
- }
- //DBG << " SUM: " << res_r->summary << endl;
- if ( 0&&kind_r == ResTraits<Package>::kind )
- {
- data::Package_Ptr p = dynamic_pointer_castdata::Package(res_r);
- DBG << " PKG: " << p << endl;
- DBG << " LOC: " << p->repositoryLocation << endl;
- }
- static unsigned n = 20;
- if ( 0&&! --n )
- throw;
- }
-
- public:
-
- virtual data::RecordId consumePackage( const data::RecordId & repository_id, const data::Package_Ptr & res_r )
- {
- return newId( res_r, ResTraits<Package>::kind );
- }
-
- virtual data::RecordId consumeSourcePackage( const data::RecordId & repository_id, const data::SrcPackage_Ptr & res_r )
- {
- return newId( res_r, ResTraits<SrcPackage>::kind );
- }
-
- virtual data::RecordId consumeProduct ( const data::RecordId & repository_id, const data::Product_Ptr & res_r )
- {
- return newId( res_r, ResTraits<Product>::kind );
- }
-
- virtual data::RecordId consumePatch ( const data::RecordId & repository_id, const data::Patch_Ptr & res_r )
- {
- return newId( res_r, ResTraits<Patch>::kind );
- }
-
- virtual data::RecordId consumePackageAtom ( const data::RecordId & repository_id, const data::PackageAtom_Ptr & res_r )
- {
- return newId( res_r, ResTraits<Atom>::kind );
- }
-
- virtual data::RecordId consumeMessage ( const data::RecordId & repository_id, const data::Message_Ptr & res_r )
- {
- return newId( res_r, ResTraits<Message>::kind );
- }
-
- virtual data::RecordId consumeScript ( const data::RecordId & repository_id, const data::Script_Ptr & res_r )
- {
- return newId( res_r, ResTraits<Script>::kind );
- }
-
- virtual data::RecordId consumePattern ( const data::RecordId & repository_id, const data::Pattern_Ptr & res_r )
- {
- return newId( res_r, ResTraits<Pattern>::kind );
- }
-
- virtual data::RecordId consumeChangelog ( const data::RecordId & repository_id, const data::Resolvable_Ptr &, const Changelog & )
- { return data::RecordId(); }
-
- virtual data::RecordId consumeFilelist ( const data::RecordId & repository_id, const data::Resolvable_Ptr &, const data::Filenames & )
- { return data::RecordId(); }
-
- void updatePackageLang( const data::RecordId & resolvable_id,
- const data::Packagebase_Ptr & data_r )
- {
- SEC << lookup( resolvable_id ) << endl;
- INT << " " << data_r->summary.text() << endl;
- INT << " " << data_r->summary.text( Locale("en") ) << endl;
- if ( data_r->licenseToConfirm.locales().size() )
- {
- INT << " " << data_r->licenseToConfirm.text() << endl;
- INT << " " << data_r->licenseToConfirm.text( Locale("en") ) << endl;
- INT << " " << data_r->licenseToConfirm.locales() << endl;
- }
- }
-};
/******************************************************************
**
Modified: trunk/libzypp/zypp/Product.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/Product.cc?rev=6464&r1=6463&r2=6464&view=diff
==============================================================================
--- trunk/libzypp/zypp/Product.cc (original)
+++ trunk/libzypp/zypp/Product.cc Fri Aug 3 20:28:22 2007
@@ -44,8 +44,8 @@
//
///////////////////////////////////////////////////////////////////
- std::string Product::category() const
- { return pimpl().category(); }
+ std::string Product::type() const
+ { return pimpl().type(); }
Label Product::vendor() const
{ return pimpl().vendor(); }
@@ -55,10 +55,10 @@
std::list<Url> Product::updateUrls() const
{ return pimpl().updateUrls(); }
-
+
std::list<Url> Product::extraUrls() const
{ return pimpl().extraUrls(); }
-
+
std::list<Url> Product::optionalUrls() const
{ return pimpl().optionalUrls(); }
Modified: trunk/libzypp/zypp/Product.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/Product.h?rev=6464&r1=6463&r2=6464&view=diff
==============================================================================
--- trunk/libzypp/zypp/Product.h (original)
+++ trunk/libzypp/zypp/Product.h Fri Aug 3 20:28:22 2007
@@ -40,8 +40,11 @@
typedef TraitsType::constPtrType constPtr;
public:
- /** Get the product categoty (base, add-on) */
- std::string category() const;
+ /** Get the product type (base, add-on) */
+ std::string type() const;
+ /** \deprecated Use \ref type. */
+ std::string category() const ZYPP_DEPRECATED
+ { return type(); }
/** Get the vendor of the product */
Label vendor() const;
@@ -49,25 +52,25 @@
/** The URL to download the release notes for this product */
Url releaseNotesUrl() const;
- /**
+ /**
* Online updates for the product.
- * They are complementary, not alternatives. #163192
+ * They are complementary, not alternatives. #163192
*/
std::list<Url> updateUrls() const;
- /**
+ /**
* Additional software for the product
* They are complementary, not alternatives.
*/
std::list<Url> extraUrls() const;
-
- /**
+
+ /**
* Optional software for the product
* (for example. Non OSS repositories)
* They are complementary, not alternatives.
*/
std::list<Url> optionalUrls() const;
-
+
/** The product flags */
std::liststd::string flags() const;
Modified: trunk/libzypp/zypp/cache/CacheAttributes.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/cache/CacheAttributes.h?rev=6464&r1=6463&r2=6464&view=diff
==============================================================================
--- trunk/libzypp/zypp/cache/CacheAttributes.h (original)
+++ trunk/libzypp/zypp/cache/CacheAttributes.h Fri Aug 3 20:28:22 2007
@@ -84,6 +84,7 @@
inline const Attribute & attrProductOptionalUrls() { static Attribute a("Product","optionalUrls"); return a; }
inline const Attribute & attrProductReleasenotesUrl() { static Attribute a("Product","releasenotesUrl"); return a; }
inline const Attribute & attrProductShortName() { static Attribute a("Product","shortName"); return a; }
+ inline const Attribute & attrProductType() { static Attribute a("Product","type"); return a; }
inline const Attribute & attrProductUpdateUrls() { static Attribute a("Product","updateUrls"); return a; }
///////////////////////////////////////////////////////////////////
inline const Attribute & attrResObjectBuildTime() { static Attribute a("ResObject","buildTime"); return a; }
Modified: trunk/libzypp/zypp/cache/CacheStore.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/cache/CacheStore.cc?rev=6464&r1=6463&r2=6464&view=diff
==============================================================================
--- trunk/libzypp/zypp/cache/CacheStore.cc (original)
+++ trunk/libzypp/zypp/cache/CacheStore.cc Fri Aug 3 20:28:22 2007
@@ -63,7 +63,7 @@
MIL << "database " << (dbdir + "zypp.db") << " was just created" << endl;
}
}
-
+
try
{
con.open( (dbdir + "zypp.db").asString().c_str());
@@ -111,9 +111,9 @@
append_hal_dependency_cmd.reset( new sqlite3_command( con, "insert into hal_capabilities ( resolvable_id, dependency_type, refers_kind, name, value, relation ) values ( :resolvable_id, :dependency_type, :refers_kind, :name, :value, :relation );" ));
append_filesystem_dependency_cmd.reset( new sqlite3_command( con, "insert into filesystem_capabilities ( resolvable_id, dependency_type, refers_kind, name_id ) values ( :resolvable_id, :dependency_type, :refers_kind, :name_id );" ));
-
+
append_split_dependency_cmd.reset( new sqlite3_command( con, "insert into split_capabilities ( resolvable_id, dependency_type, refers_kind, name_id, file_id ) values ( :resolvable_id, :dependency_type, :refers_kind, :name_id, :file_id );" ));
-
+
append_other_dependency_cmd.reset( new sqlite3_command( con, "insert into other_capabilities ( resolvable_id, dependency_type, refers_kind, value ) values ( :resolvable_id, :dependency_type, :refers_kind, :value );" ));
append_resolvable_cmd.reset( new sqlite3_command( con, "insert into resolvables ( name, version, release, epoch, arch, kind, shared_id, repository_id ) values ( :name, :version, :release, :epoch, :arch, :kind, :shared_id, :repository_id );" ));
@@ -420,6 +420,7 @@
NVRA( product->name, product->edition, product->arch ), product->deps );
appendResObjectAttributes( id, product );
+ appendStringAttribute( id, attrProductType(), product->type );
appendTranslatedStringAttribute( id, attrProductShortName(), product->shortName );
appendTranslatedStringAttribute( id, attrProductLongName(), product->longName );
appendStringContainerAttribute( id, attrProductFlags(), product->flags.begin(), product->flags.end() );
@@ -703,7 +704,7 @@
//RecordId capability_id = appendDependencyEntry( resolvable_id, deptype, cap->refers() );
RecordId name_id = lookupOrAppendName(cap->name());
RecordId file_id = lookupOrAppendFile(cap->path());
-
+
_pimpl->append_split_dependency_cmd->bind( ":resolvable_id", resolvable_id );
_pimpl->append_split_dependency_cmd->bind( ":dependency_type", lookupOrAppendType("deptype", deptype.asString()) );
_pimpl->append_split_dependency_cmd->bind( ":refers_kind", lookupOrAppendType("kind", cap->refers().asString()) );
Modified: trunk/libzypp/zypp/data/ResolvableData.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/data/ResolvableData.h?rev=6464&r1=6463&r2=6464&view=diff
==============================================================================
--- trunk/libzypp/zypp/data/ResolvableData.h (original)
+++ trunk/libzypp/zypp/data/ResolvableData.h Fri Aug 3 20:28:22 2007
@@ -242,6 +242,9 @@
Product()
{};
+ /** The product type (base, add-on) */
+ std::string type;
+
/** Abbreviation like \c SLES10 */
TranslatedText shortName;
/** More verbose Name like <tt>Suse Linux Enterprise Server 10</tt>*/
Modified: trunk/libzypp/zypp/detail/ProductImplIf.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/detail/ProductImplIf.cc?rev=6464&r1=6463&r2=6464&view=diff
==============================================================================
--- trunk/libzypp/zypp/detail/ProductImplIf.cc (original)
+++ trunk/libzypp/zypp/detail/ProductImplIf.cc Fri Aug 3 20:28:22 2007
@@ -20,8 +20,7 @@
namespace detail
{ /////////////////////////////////////////////////////////////////
- /** Get the category of the product - addon or base*/
- std::string ProductImplIf::category() const
+ std::string ProductImplIf::type() const
{ return std::string(); }
Url ProductImplIf::releaseNotesUrl() const
@@ -29,10 +28,10 @@
std::list<Url> ProductImplIf::updateUrls() const
{ return std::list<Url>(); }
-
+
std::list<Url> ProductImplIf::extraUrls() const
{ return std::list<Url>(); }
-
+
std::list<Url> ProductImplIf::optionalUrls() const
{ return std::list<Url>(); }
Modified: trunk/libzypp/zypp/detail/ProductImplIf.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/detail/ProductImplIf.h?rev=6464&r1=6463&r2=6464&view=diff
==============================================================================
--- trunk/libzypp/zypp/detail/ProductImplIf.h (original)
+++ trunk/libzypp/zypp/detail/ProductImplIf.h Fri Aug 3 20:28:22 2007
@@ -42,26 +42,26 @@
typedef Product ResType;
public:
- /** Get the category of the product - addon or base*/
- virtual std::string category() const PURE_VIRTUAL;
+ /** Get the type of the product - addon or base*/
+ virtual std::string type() const PURE_VIRTUAL;
virtual Url releaseNotesUrl() const PURE_VIRTUAL;
virtual std::list<Url> updateUrls() const PURE_VIRTUAL;
-
- /**
+
+ /**
* Additional software for the product
* They are complementary, not alternatives.
*/
virtual std::list<Url> extraUrls() const PURE_VIRTUAL;
-
- /**
+
+ /**
* Optional software for the product
* (for example. Non OSS repositories)
* They are complementary, not alternatives.
*/
virtual std::list<Url> optionalUrls() const PURE_VIRTUAL;
-
+
/** The product flags */
virtual std::liststd::string flags() const PURE_VIRTUAL;
Modified: trunk/libzypp/zypp/parser/susetags/ContentFileReader.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/parser/susetags/ContentFileReader.cc?rev=6464&r1=6463&r2=6464&view=diff
==============================================================================
--- trunk/libzypp/zypp/parser/susetags/ContentFileReader.cc (original)
+++ trunk/libzypp/zypp/parser/susetags/ContentFileReader.cc Fri Aug 3 20:28:22 2007
@@ -372,6 +372,10 @@
{
_pimpl->product().shortName.setText( value, Locale(modifier) );
}
+ else if ( key == "TYPE" )
+ {
+ _pimpl->product().type = value;
+ }
else if ( key == "RELNOTESURL" )
{
for( std::string::size_type pos = value.find("%a");
Modified: trunk/libzypp/zypp/parser/yum/ProductFileReader.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/parser/yum/ProductFileReader.cc?rev=6464&r1=6463&r2=6464&view=diff
==============================================================================
--- trunk/libzypp/zypp/parser/yum/ProductFileReader.cc (original)
+++ trunk/libzypp/zypp/parser/yum/ProductFileReader.cc Fri Aug 3 20:28:22 2007
@@ -41,8 +41,8 @@
/**
* Callback provided to the XML reader.
- *
- * \param the xml reader object reading the file
+ *
+ * \param the xml reader object reading the file
* \return true to tell the reader to continue, false to tell it to stop
*
* \see PrimaryFileReader::consumeNode(xml::Reader)
@@ -86,10 +86,10 @@
/*
* xpath and multiplicity of processed nodes are included in the code
* for convenience:
- *
+ *
* // xpath: <xpath> (?|*|+)
- *
- * if multiplicity is ommited, then the node has multiplicity 'one'.
+ *
+ * if multiplicity is ommited, then the node has multiplicity 'one'.
*/
// --------------------------------------------------------------------------
@@ -114,8 +114,8 @@
if (reader_r->name() == "name")
{
_product->name = reader_r.nodeText().asString();
- // TODO what's this?
- // _product->? = reader_r->getAttribute("type").asString();
+ // product type (base, add-on)
+ _product->type = reader_r->getAttribute("type").asString();
return true;
}
@@ -156,26 +156,26 @@
_product->description.setText(reader_r.nodeText().asString(), locale);
return true;
}
-
+
// xpath: /products/product/distribution-name (+)
if (reader_r->name() == "distribution-name")
{
_product->distributionName = reader_r.nodeText().asString();
return true;
}
-
+
// xpath: /products/product/distribution-edition (+)
if (reader_r->name() == "distribution-edition")
{
_product->distributionEdition = reader_r.nodeText().asString();
return true;
}
-
+
// xpath: /products/product/release-notes-url (+)
if (reader_r->name() == "release-notes-url")
{
string value = reader_r.nodeText().asString();
-
+
for( std::string::size_type pos = value.find("%a");
pos != std::string::npos;
pos = value.find("%a") )
@@ -197,7 +197,7 @@
if (reader_r->name() == "update-url")
{
string value = reader_r.nodeText().asString();
-
+
try
{
_product->updateUrls.push_back(Url(value));
@@ -208,12 +208,12 @@
}
return true;
}
-
+
// xpath: /products/product/extra-url (*)
if (reader_r->name() == "extra-url")
{
string value = reader_r.nodeText().asString();
-
+
try
{
_product->extraUrls.push_back(Url(value));
@@ -224,12 +224,12 @@
}
return true;
}
-
+
// xpath: /products/product/optional-url (*)
if (reader_r->name() == "optional-url")
{
string value = reader_r.nodeText().asString();
-
+
try
{
_product->optionalUrls.push_back(Url(value));
Modified: trunk/libzypp/zypp/repo/cached/ProductImpl.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/repo/cached/ProductImpl.cc?rev=6464&r1=6463&r2=6464&view=diff
==============================================================================
--- trunk/libzypp/zypp/repo/cached/ProductImpl.cc (original)
+++ trunk/libzypp/zypp/repo/cached/ProductImpl.cc Fri Aug 3 20:28:22 2007
@@ -100,18 +100,14 @@
// PRODUCT
/////////////////////////////////////////
-std::string ProductImpl::category() const
+std::string ProductImpl::type() const
{
-#warning DUBIOUS ATTRIBUTE
- return "";
- //return _repository->resolvableQuery().queryStringAttribute( _id, cache::attrProductCategory() );
+ return _repository->resolvableQuery().queryStringAttribute( _id, cache::attrProductType() );
}
Url ProductImpl::releaseNotesUrl() const
{
-#warning DUBIOUS ATTRIBUTE
- return Url();
- //return _repository->resolvableQuery().queryStringAttribute( _id, cache::attrProductReleaseNotesUrl() );
+ return _repository->resolvableQuery().queryStringAttribute( _id, cache::attrProductReleasenotesUrl() );
}
std::list<Url> ProductImpl::updateUrls() const
Modified: trunk/libzypp/zypp/repo/cached/ProductImpl.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/repo/cached/ProductImpl.h?rev=6464&r1=6463&r2=6464&view=diff
==============================================================================
--- trunk/libzypp/zypp/repo/cached/ProductImpl.h (original)
+++ trunk/libzypp/zypp/repo/cached/ProductImpl.h Fri Aug 3 20:28:22 2007
@@ -30,7 +30,7 @@
public:
ProductImpl( const data::RecordId &id, repo::cached::RepoImpl::Ptr repository_r );
-
+
virtual TranslatedText summary() const;
virtual TranslatedText description() const;
virtual TranslatedText insnotify() const;
@@ -41,9 +41,9 @@
virtual bool installOnly() const;
virtual Date buildtime() const;
virtual Date installtime() const;
-
+
// PRODUCT
- virtual std::string category() const;
+ virtual std::string type() const;
virtual Url releaseNotesUrl() const;
virtual std::list<Url> updateUrls() const;
virtual std::list<Url> extraUrls() const ;
@@ -51,9 +51,9 @@
virtual std::liststd::string flags() const;
virtual TranslatedText shortName() const;
virtual std::string distributionName() const;
- virtual Edition distributionEdition() const;
+ virtual Edition distributionEdition() const;
virtual Repository repository() const;
-
+
private:
repo::cached::RepoImpl::Ptr _repository;
data::RecordId _id;
Modified: trunk/libzypp/zypp/repo/memory/ProductImpl.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/repo/memory/ProductImpl.cc?rev=6464&r1=6463&r2=6464&view=diff
==============================================================================
--- trunk/libzypp/zypp/repo/memory/ProductImpl.cc (original)
+++ trunk/libzypp/zypp/repo/memory/ProductImpl.cc Fri Aug 3 20:28:22 2007
@@ -100,9 +100,9 @@
///////////////////////////////////////////
-std::string ProductImpl::category() const
+std::string ProductImpl::type() const
{
- return _category;
+ return _type;
}
Url ProductImpl::releaseNotesUrl() const
Modified: trunk/libzypp/zypp/repo/memory/ProductImpl.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/repo/memory/ProductImpl.h?rev=6464&r1=6463&r2=6464&view=diff
==============================================================================
--- trunk/libzypp/zypp/repo/memory/ProductImpl.h (original)
+++ trunk/libzypp/zypp/repo/memory/ProductImpl.h Fri Aug 3 20:28:22 2007
@@ -51,7 +51,7 @@
virtual Date buildtime() const;
virtual Date installtime() const;
- virtual std::string category() const;
+ virtual std::string type() const;
virtual Url releaseNotesUrl() const;
virtual std::list<Url> updateUrls() const;
virtual std::list<Url> extraUrls() const;
@@ -75,7 +75,7 @@
Date _buildtime;
Date _installtime;
- std::string _category;
+ std::string _type;
std::string _dist_name;
Edition _dist_version;
std::string _base_product;
@@ -83,11 +83,11 @@
std::string _you_type;
std::string _shortlabel;
Url _release_notes_url;
-
+
std::list<Url> _update_urls;
std::list<Url> _extra_urls;
std::list<Url> _optional_urls;
-
+
std::string _default_base;
std::liststd::string _flags;
};
Modified: trunk/libzypp/zypp/target/store/XMLFilesBackend.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/target/store/XMLFilesBackend.cc?rev=6464&r1=6463&r2=6464&view=diff
==============================================================================
--- trunk/libzypp/zypp/target/store/XMLFilesBackend.cc (original)
+++ trunk/libzypp/zypp/target/store/XMLFilesBackend.cc Fri Aug 3 20:28:22 2007
@@ -1032,7 +1032,7 @@
impl->_build_time = parsed.build_time;
impl->_install_time = parsed.install_time;
- impl->_category = parsed.type;
+ impl->_type = parsed.type;
impl->_short_name = parsed.short_name;
impl->_dist_name = parsed.dist_name;
impl->_dist_version = parsed.dist_version;
Modified: trunk/libzypp/zypp/target/store/serialize.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/target/store/serialize.cc?rev=6464&r1=6463&r2=6464&view=diff
==============================================================================
--- trunk/libzypp/zypp/target/store/serialize.cc (original)
+++ trunk/libzypp/zypp/target/store/serialize.cc Fri Aug 3 20:28:22 2007
@@ -333,7 +333,7 @@
{
stringstream out;
out << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << endl;
- out << "http://www.novell.com/metadata/zypp/xml-store\" type=\"" << xml_escape(obj->category()) << "\">" << endl;
+ out << "http://www.novell.com/metadata/zypp/xml-store\" type=\"" << xml_escape(obj->type()) << "\">" << endl;
out << toXML(static_castResolvable::constPtr(obj)) << endl;
#warning "FIXME description and displayname of products"
Modified: trunk/libzypp/zypp/target/store/xml/XMLProductImpl.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/target/store/xml/XMLProductImpl.cc?rev=6464&r1=6463&r2=6464&view=diff
==============================================================================
--- trunk/libzypp/zypp/target/store/xml/XMLProductImpl.cc (original)
+++ trunk/libzypp/zypp/target/store/xml/XMLProductImpl.cc Fri Aug 3 20:28:22 2007
@@ -35,8 +35,8 @@
XMLProductImpl::~XMLProductImpl()
{}
- std::string XMLProductImpl::category() const
- { return _category; }
+ std::string XMLProductImpl::type() const
+ { return _type; }
TranslatedText XMLProductImpl::shortName() const
{ return _short_name; }
@@ -46,10 +46,10 @@
std::list<Url> XMLProductImpl::updateUrls() const
{ return _update_urls; }
-
+
std::list<Url> XMLProductImpl::extraUrls() const
{ return _extra_urls; }
-
+
std::list<Url> XMLProductImpl::optionalUrls() const
{ return _optional_urls; }
Modified: trunk/libzypp/zypp/target/store/xml/XMLProductImpl.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/target/store/xml/XMLProductImpl.h?rev=6464&r1=6463&r2=6464&view=diff
==============================================================================
--- trunk/libzypp/zypp/target/store/xml/XMLProductImpl.h (original)
+++ trunk/libzypp/zypp/target/store/xml/XMLProductImpl.h Fri Aug 3 20:28:22 2007
@@ -48,8 +48,6 @@
{ return _size; }
virtual ByteCount downloadSize() const
{ return _downloadSize; }
- virtual unsigned sourceMediaNr() const
- { return 0; }
virtual bool installOnly() const
{ return _install_only; }
virtual Date buildtime() const
@@ -57,25 +55,25 @@
virtual Date installtime() const
{ return _install_time; }
- virtual std::string category() const;
+ virtual std::string type() const;
virtual TranslatedText shortName() const;
virtual Url releaseNotesUrl() const;
-
+
virtual std::list<Url> updateUrls() const;
virtual std::list<Url> extraUrls() const;
virtual std::list<Url> optionalUrls() const;
-
+
virtual std::liststd::string flags() const;
virtual std::string distributionName() const;
virtual Edition distributionEdition() const;
- std::string _category;
+ std::string _type;
Url _release_notes_url;
-
+
std::list<Url> _update_urls;
std::list<Url> _extra_urls;
std::list<Url> _optional_urls;
-
+
std::liststd::string _flags;
TranslatedText _summary;
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org
For additional commands, e-mail: zypp-commit+help@opensuse.org