Author: mlandres
Date: Mon Feb 4 17:23:33 2008
New Revision: 8458
URL: http://svn.opensuse.org/viewcvs/zypp?rev=8458&view=rev
Log:
remove Language and Selection
Removed:
branches/tmp/ma/jump_sat/libzypp/zypp/Language.cc
branches/tmp/ma/jump_sat/libzypp/zypp/Language.h
branches/tmp/ma/jump_sat/libzypp/zypp/Selection.cc
branches/tmp/ma/jump_sat/libzypp/zypp/Selection.h
Modified:
branches/tmp/ma/jump_sat/libzypp/zypp/CMakeLists.txt
branches/tmp/ma/jump_sat/libzypp/zypp/ResKind.cc
branches/tmp/ma/jump_sat/libzypp/zypp/ResKind.h
branches/tmp/ma/jump_sat/libzypp/zypp/ResObject.cc
branches/tmp/ma/jump_sat/libzypp/zypp/ResObjects.h
branches/tmp/ma/jump_sat/libzypp/zypp/ResTraits.h
branches/tmp/ma/jump_sat/libzypp/zypp/sat/SATResolver.cc
branches/tmp/ma/jump_sat/libzypp/zypp/sat/Solvable.cc
branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Testcase.cc
branches/tmp/ma/jump_sat/libzypp/zypp/target/TargetImpl.cc
branches/tmp/ma/jump_sat/libzypp/zypp/target/store/XMLFilesBackend.cc
branches/tmp/ma/jump_sat/libzypp/zypp/target/store/XMLFilesBackend.h
branches/tmp/ma/jump_sat/libzypp/zypp/target/store/serialize.cc
branches/tmp/ma/jump_sat/libzypp/zypp/target/store/serialize.h
branches/tmp/ma/jump_sat/libzypp/zypp/ui/UserWantedPackages.cc
branches/tmp/ma/jump_sat/libzypp/zypp/ui/UserWantedPackages.h
branches/tmp/ma/jump_sat/libzypp/zypp/zypp_detail/ZYppImpl.cc
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/CMakeLists.txt
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/CMakeLists.txt?rev=8458&r1=8457&r2=8458&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/CMakeLists.txt (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/CMakeLists.txt Mon Feb 4 17:23:33 2008
@@ -33,7 +33,6 @@
FileChecker.cc
IdString.cc
KeyRing.cc
- Language.cc
LanguageCode.cc
Locale.cc
Locks.cc
@@ -72,7 +71,6 @@
ResStatus.cc
ResStore.cc
Script.cc
- Selection.cc
Signature.cc
SrcPackage.cc
SysContent.cc
@@ -120,7 +118,6 @@
KeyRing.h
KVMap.h
LanguageCode.h
- Language.h
Locale.h
Locks.h
ManagedFile.h
@@ -166,7 +163,6 @@
ResStore.h
ResTraits.h
Script.h
- Selection.h
Signature.h
SrcPackage.h
SysContent.h
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/ResKind.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/ResKind.cc?rev=8458&r1=8457&r2=8458&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/ResKind.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/ResKind.cc Mon Feb 4 17:23:33 2008
@@ -23,21 +23,17 @@
{ /////////////////////////////////////////////////////////////////
const ResKind ResKind::atom ( "atom" );
- const ResKind ResKind::language ( "language" );
const ResKind ResKind::message ( "message" );
const ResKind ResKind::package ( "package" );
const ResKind ResKind::patch ( "patch" );
const ResKind ResKind::pattern ( "pattern" );
const ResKind ResKind::product ( "product" );
const ResKind ResKind::script ( "script" );
- const ResKind ResKind::selection ( "selection" );
const ResKind ResKind::srcpackage( "srcpackage" );
template<>
const ResKind ResTraits<Atom> ::kind( ResKind::atom );
template<>
- const ResKind ResTraits<Language> ::kind( ResKind::language );
- template<>
const ResKind ResTraits<Message> ::kind( ResKind::message );
template<>
const ResKind ResTraits<Package> ::kind( ResKind::package );
@@ -50,8 +46,6 @@
template<>
const ResKind ResTraits<Script> ::kind( ResKind::script );
template<>
- const ResKind ResTraits<Selection> ::kind( ResKind::selection );
- template<>
const ResKind ResTraits<SrcPackage>::kind( ResKind::srcpackage );
std::string ResKind::satIdent( const ResKind & refers_r, const std::string & name_r )
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/ResKind.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/ResKind.h?rev=8458&r1=8457&r2=8458&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/ResKind.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/ResKind.h Mon Feb 4 17:23:33 2008
@@ -40,14 +40,12 @@
static const ResKind nokind;
static const ResKind atom;
- static const ResKind language;
static const ResKind message;
static const ResKind package;
static const ResKind patch;
static const ResKind pattern;
static const ResKind product;
static const ResKind script;
- static const ResKind selection;
static const ResKind srcpackage;
//@}
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/ResObject.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/ResObject.cc?rev=8458&r1=8457&r2=8458&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/ResObject.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/ResObject.cc Mon Feb 4 17:23:33 2008
@@ -111,14 +111,12 @@
ResKind kind( solvable_r.kind() );
#define OUTS(X) if ( kind == ResTraits<X>::kind ) return make<X>( solvable_r );
OUTS( Atom );
- OUTS( Language );
OUTS( Message );
OUTS( Package );
OUTS( Patch );
OUTS( Pattern );
OUTS( Product );
OUTS( Script );
- OUTS( Selection );
OUTS( SrcPackage );
#undef OUTS
return 0;
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/ResObjects.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/ResObjects.h?rev=8458&r1=8457&r2=8458&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/ResObjects.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/ResObjects.h Mon Feb 4 17:23:33 2008
@@ -13,14 +13,12 @@
#define ZYPP_RESOBJECTS_H
#include "zypp/Atom.h"
-#include "zypp/Language.h"
#include "zypp/Message.h"
#include "zypp/Package.h"
#include "zypp/Patch.h"
#include "zypp/Pattern.h"
#include "zypp/Product.h"
#include "zypp/Script.h"
-#include "zypp/Selection.h"
#include "zypp/SrcPackage.h"
#endif // ZYPP_RESOBJECTS_H
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/ResTraits.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/ResTraits.h?rev=8458&r1=8457&r2=8458&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/ResTraits.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/ResTraits.h Mon Feb 4 17:23:33 2008
@@ -53,13 +53,11 @@
DEFINE_PTR_TYPE( Atom );
DEFINE_PTR_TYPE( Package );
DEFINE_PTR_TYPE( SrcPackage );
- DEFINE_PTR_TYPE( Selection );
DEFINE_PTR_TYPE( Pattern );
DEFINE_PTR_TYPE( Product );
DEFINE_PTR_TYPE( Patch );
DEFINE_PTR_TYPE( Script );
DEFINE_PTR_TYPE( Message );
- DEFINE_PTR_TYPE( Language );
//@}
/** ResTraits. Defines common types and the ResKind value. */
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/sat/SATResolver.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/sat/SATResolver.cc?rev=8458&r1=8457&r2=8458&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/sat/SATResolver.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/sat/SATResolver.cc Mon Feb 4 17:23:33 2008
@@ -61,14 +61,14 @@
// for the pool. Documents already inserted items.
//---------------------------------------------------------------------------
-// Callbacks for SAT policies
+// Callbacks for SAT policies
//---------------------------------------------------------------------------
-
+
int vendorCheck (Pool *pool, Solvable *solvable1, Solvable *solvable2) {
DBG << "vendorCheck: " << id2str(pool, solvable1->vendor) << " <--> " << id2str(pool, solvable1->vendor) << endl;
return VendorAttr::instance().equivalent(id2str(pool, solvable1->vendor), id2str(pool, solvable2->vendor)) ? 0:1;
}
-
+
//---------------------------------------------------------------------------
std::ostream &
@@ -237,46 +237,6 @@
//----------------------------------------------------------------------------
-Resolvable::Kind
-string2kind (const std::string & str)
-{
- Resolvable::Kind kind = ResTraitszypp::Package::kind;
- if (!str.empty()) {
- if (str == "package") {
- // empty
- }
- else if (str == "patch") {
- kind = ResTraitszypp::Patch::kind;
- }
- else if (str == "atom") {
- kind = ResTraitszypp::Atom::kind;
- }
- else if (str == "pattern") {
- kind = ResTraitszypp::Pattern::kind;
- }
- else if (str == "selection") {
- kind = ResTraitszypp::Selection::kind;
- }
- else if (str == "script") {
- kind = ResTraitszypp::Script::kind;
- }
- else if (str == "message") {
- kind = ResTraitszypp::Message::kind;
- }
- else if (str == "product") {
- kind = ResTraitszypp::Product::kind;
- }
- else if (str == "language") {
- kind = ResTraitszypp::Language::kind;
- }
- else {
- ERR << "string2kind unknown kind '" << str << "'" << endl;
- }
- }
- return kind;
-}
-
-
//------------------------------------------------------------------------------------------------------------
// This function loops over the pool and grabs
// all item.status().transacts() and item.status().byUser()
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/sat/Solvable.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/sat/Solvable.cc?rev=8458&r1=8457&r2=8458&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/sat/Solvable.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/sat/Solvable.cc Mon Feb 4 17:23:33 2008
@@ -99,8 +99,6 @@
// ----v
case 'c': OUTS( patch, 5 ); break;
case 'd': OUTS( product, 7 ); break;
- case 'e': OUTS( selection, 9 ); break;
- case 'g': OUTS( language, 8 ); break;
case 'i': OUTS( script, 6 ); break;
case 'k': OUTS( package, 7 ); break;
case 'm': OUTS( atom, 4 ); break;
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Testcase.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Testcase.cc?rev=8458&r1=8457&r2=8458&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Testcase.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Testcase.cc Mon Feb 4 17:23:33 2008
@@ -166,11 +166,6 @@
{
const Resolvable::constPtr resolvable = item.resolvable();
stringstream str;
- if ( isKind<Language>(resolvable) ) {
- // language dependencies will be written in another part
- return str.str();
- }
-
str << "<" << toLower (resolvable->kind().asString()) << ">" << endl;
str << TAB << xml_tag_enclose (resolvable->name(), "name", true) << endl;
str << TAB << xml_tag_enclose (item->vendor(), "vendor", true) << endl;
@@ -261,12 +256,17 @@
{
Resolvable::constPtr res = it->resolvable();
+#warning NO MORE LANGUAGE RESOLVABLE
+ // - use pools list of requested locales and pass it as 'LocaleList language'
+ // - restore the list via Pool::setRequestedLocales.
+#if 0
if (isKind<Language>(res)) {
if ( it->status().isInstalled()
|| it->status().isToBeInstalled()) {
language.push_back (*it);
}
} else {
+#endif
if ( system && it->status().isInstalled() ) {
// system channel
system->addResolvable (*it);
@@ -300,7 +300,6 @@
&& !(it->status().isBySolver())) {
items_locked.push_back (*it);
}
- }
}
// writing control file "*-test.xml"
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/target/TargetImpl.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/target/TargetImpl.cc?rev=8458&r1=8457&r2=8458&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/target/TargetImpl.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/target/TargetImpl.cc Mon Feb 4 17:23:33 2008
@@ -24,14 +24,7 @@
#include "zypp/ZConfig.h"
#include "zypp/PoolItem.h"
-#include "zypp/Resolvable.h"
-#include "zypp/ResObject.h"
-#include "zypp/Package.h"
-#include "zypp/SrcPackage.h"
-#include "zypp/Pattern.h"
-#include "zypp/Selection.h"
-#include "zypp/Script.h"
-#include "zypp/Message.h"
+#include "zypp/ResObjects.h"
#include "zypp/Url.h"
#include "zypp/RepoStatus.h"
#include "zypp/ExternalProgram.h"
@@ -316,7 +309,7 @@
if ( status.checksum() == rpmstatus.checksum() )
build_rpm_solv = false;
}
-
+
if ( build_rpm_solv )
{
MIL << "Executing solv converter" << endl;
@@ -726,7 +719,7 @@
ts_store = Date(store_info.mtime());
else
ts_store = Date::now();
-
+
if ( ts_rpm > ts_store )
{
return ts_rpm;
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/target/store/XMLFilesBackend.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/target/store/XMLFilesBackend.cc?rev=8458&r1=8457&r2=8458&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/target/store/XMLFilesBackend.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/target/store/XMLFilesBackend.cc Mon Feb 4 17:23:33 2008
@@ -27,7 +27,6 @@
#include "zypp/parser/xmlstore/XMLProductParser.h"
#include "zypp/parser/xmlstore/XMLPatternParser.h"
#include "zypp/parser/xmlstore/XMLPatchParser.h"
-#include "zypp/parser/xmlstore/XMLLanguageParser.h"
#include <iostream>
#include <fstream>
@@ -159,20 +158,16 @@
d->kinds.insert(ResTraitszypp::Patch::kind);
//d->kinds.insert(ResTraitszypp::Message::kind);
//d->kinds.insert(ResTraitszypp::Script::kind);
- d->kinds.insert(ResTraitszypp::Selection::kind);
d->kinds.insert(ResTraitszypp::Product::kind);
d->kinds.insert(ResTraitszypp::Pattern::kind);
- d->kinds.insert(ResTraitszypp::Language::kind);
// types of resolvables stored (supported)
d->kinds_flags.insert(ResTraitszypp::Package::kind);
d->kinds_flags.insert(ResTraitszypp::Patch::kind);
//d->kinds.insert(ResTraitszypp::Message::kind);
d->kinds_flags.insert(ResTraitszypp::Script::kind);
- d->kinds_flags.insert(ResTraitszypp::Selection::kind);
d->kinds_flags.insert(ResTraitszypp::Product::kind);
d->kinds_flags.insert(ResTraitszypp::Pattern::kind);
- d->kinds_flags.insert(ResTraitszypp::Language::kind);
// check if the db exists
@@ -654,15 +649,6 @@
break;
}
}
- else if ( kind == ResTraitszypp::Selection::kind )
- {
- XMLPatternParser iter(res_file,"");
- for (; !iter.atEnd(); ++iter)
- {
- resolvables.push_back(createSelection(**iter));
- break;
- }
- }
else if ( kind == ResTraitszypp::Pattern::kind )
{
XMLPatternParser iter(res_file,"");
@@ -672,15 +658,6 @@
break;
}
}
- else if ( kind == ResTraitszypp::Language::kind )
- {
- XMLLanguageParser iter(res_file,"");
- for (; !iter.atEnd(); ++iter)
- {
- resolvables.push_back(createLanguage(**iter));
- break;
- }
- }
else
{
/* nothing for now */
@@ -983,24 +960,6 @@
return 0L;
}
-Language::Ptr
-XMLFilesBackend::createLanguage( const zypp::parser::xmlstore::XMLLanguageData & parsed ) const
-{
- try
- {
- return Language::installedInstance( Locale(parsed.name) );
- }
- catch (const Exception & excpt_r)
- {
- ZYPP_CAUGHT(excpt_r);
- Exception nexcpt("Cannot create language object");
- nexcpt.remember(excpt_r);
- ZYPP_THROW(nexcpt);
- }
- return 0L;
-}
-
-
Product::Ptr
XMLFilesBackend::createProduct( const zypp::parser::xmlstore::XMLProductData & parsed ) const
{
@@ -1209,49 +1168,6 @@
return 0L;
}
-Selection::Ptr
-XMLFilesBackend::createSelection( const zypp::parser::xmlstore::XMLPatternData & parsed ) const
-{
- try
- {
- detail::ResImplTraits<XMLSelectionImpl>::Ptr impl(new XMLSelectionImpl());
-
- impl->_summary = parsed.summary;
- impl->_description = parsed.summary;
-
- impl->_install_notify = parsed.install_notify;
- impl->_delete_notify = parsed.delete_notify;
- impl->_license_to_confirm = parsed.license_to_confirm;
- impl->_vendor = parsed.vendor;
- impl->_size = parsed.size;
- impl->_downloadSize = parsed.downloadSize;
- impl->_install_only = parsed.install_only;
- impl->_build_time = parsed.build_time;
- impl->_install_time = parsed.install_time;
-
- impl->_visible = parsed.userVisible;
- impl->_name = parsed.name;
- //impl->_default = ((parsed.default_ == "false" ) ? false : true );
- impl->_category = parsed.category;
-
- Arch arch;
- if (!parsed.arch.empty())
- arch = Arch(parsed.arch);
-
- // Collect basic Resolvable data
- NVRAD dataCollect( parsed.name, Edition( parsed.ver, parsed.rel, parsed.epoch ), arch, createDependencies( parsed, ResTraits<Pattern>::kind));
- Selection::Ptr selection = detail::makeResolvableFromImpl( dataCollect, impl );
- return selection;
- }
- catch (const Exception & excpt_r)
- {
- ZYPP_CAUGHT(excpt_r);
- Exception nexcpt("Cannot create installation selection object");
- nexcpt.remember(excpt_r);
- ZYPP_THROW(nexcpt);
- }
- return 0L;
-}
Dependencies
XMLFilesBackend::createDependencies( const zypp::parser::xmlstore::XMLResObjectData & parsed, const Resolvable::Kind my_kind ) const
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/target/store/XMLFilesBackend.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/target/store/XMLFilesBackend.h?rev=8458&r1=8457&r2=8458&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/target/store/XMLFilesBackend.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/target/store/XMLFilesBackend.h Mon Feb 4 17:23:33 2008
@@ -15,14 +15,7 @@
#include <iosfwd>
#include "zypp/NVR.h"
-#include "zypp/Atom.h"
-#include "zypp/Message.h"
-#include "zypp/Patch.h"
-#include "zypp/Script.h"
-#include "zypp/Product.h"
-#include "zypp/Selection.h"
-#include "zypp/Pattern.h"
-#include "zypp/Language.h"
+#include "zypp/ResObjects.h"
#include "zypp/parser/xmlstore/XMLParserData.h"
@@ -181,10 +174,8 @@
Message::Ptr createMessage( const zypp::parser::xmlstore::XMLPatchMessageData & parsed ) const;
Script::Ptr createScript(const zypp::parser::xmlstore::XMLPatchScriptData & parsed ) const;
Product::Ptr createProduct( const zypp::parser::xmlstore::XMLProductData & parsed ) const;
- Selection::Ptr createSelection( const zypp::parser::xmlstore::XMLPatternData & parsed ) const;
Pattern::Ptr createPattern( const zypp::parser::xmlstore::XMLPatternData & parsed ) const;
Atom::Ptr createAtom( const zypp::parser::xmlstore::XMLPatchAtomData & parsed ) const;
- Language::Ptr createLanguage( const zypp::parser::xmlstore::XMLLanguageData & parsed ) const;
Dependencies createDependencies( const zypp::parser::xmlstore::XMLResObjectData & parsed, const Resolvable::Kind my_kind ) const;
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/target/store/serialize.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/target/store/serialize.cc?rev=8458&r1=8457&r2=8458&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/target/store/serialize.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/target/store/serialize.cc Mon Feb 4 17:23:33 2008
@@ -294,37 +294,6 @@
}
template<>
-string toXML( const Language::constPtr &obj )
-{
- stringstream out;
- out << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << endl;
- out << "