Author: schubi2
Date: Mon Feb 11 15:25:29 2008
New Revision: 8608
URL: http://svn.opensuse.org/viewcvs/zypp?rev=8608&view=rev
Log:
code cleanup
Modified:
branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Testcase.cc
branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Testcase.h
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=8608&r1=8607&r2=8608&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 11 15:25:29 2008
@@ -26,6 +26,7 @@
#include "zypp/base/String.h"
#include "zypp/base/PtrTypes.h"
#include "zypp/Capabilities.h"
+#include "zypp/sat/Solvable.h"
/////////////////////////////////////////////////////////////////////////
@@ -158,7 +159,7 @@
stringstream out;
Capabilities caps( obj->dep(deptag_r) );
if ( ! caps.empty() )
- out << " " << xml_tag_enclose(helixXML(caps), deptag_r.asString()) << endl;
+ out << TAB << xml_tag_enclose(helixXML(caps), deptag_r.asString()) << endl;
return out.str();
}
@@ -234,18 +235,15 @@
for ( ResPool::const_iterator it = pool.begin(); it != pool.end(); ++it )
{
- Resolvable::constPtr res = it->resolvable();
-
if ( it->status().isInstalled() ) {
// system channel
system.addResolvable (*it);
} else {
// repo channels
- ResObject::constPtr repoItem = it->resolvable();
- Repository repo = repoItem->repository();
+ sat::Repo repo = it->resolvable()->satSolvable().repo();
if (repoTable.find (repo) == repoTable.end()) {
repoTable[repo] = new HelixResolvable(dumpPath + "/"
- + numstring(repo.numericId())
+ + hexstring((int)repo.id())
+ "-package.xml.gz");
}
repoTable[repo]->addResolvable (*it);
@@ -284,7 +282,7 @@
}
ResPool pool = resolver.pool();
- RepositoryTable repoTable;
+ RepositoryTable repoTable;
PoolItemList items_to_install;
PoolItemList items_to_remove;
PoolItemList items_locked;
@@ -315,12 +313,11 @@
system->addResolvable (*it);
} else {
// repo channels
- ResObject::constPtr repoItem = it->resolvable();
- Repository repo = repoItem->repository();
+ sat::Repo repo = it->resolvable()->satSolvable().repo();
if (dumpPool) {
if (repoTable.find (repo) == repoTable.end()) {
repoTable[repo] = new HelixResolvable(dumpPath + "/"
- + numstring(repo.numericId())
+ + hexstring((int)repo.id())
+ "-package.xml.gz");
}
repoTable[repo]->addResolvable (*it);
@@ -419,21 +416,21 @@
<< TAB << "" << endl << endl;
for ( RepositoryTable::const_iterator it = repoTable.begin();
it != repoTable.end(); ++it ) {
- Repository repo = it->first;
+ RepoInfo repo = it->first.info();
*file << TAB << "<!-- " << endl
- << TAB << "- alias : " << repo.info().alias() << endl;
- for ( RepoInfo::urls_const_iterator itUrl = repo.info().baseUrlsBegin();
- itUrl != repo.info().baseUrlsEnd();
+ << TAB << "- alias : " << repo.alias() << endl;
+ for ( RepoInfo::urls_const_iterator itUrl = repo.baseUrlsBegin();
+ itUrl != repo.baseUrlsEnd();
++itUrl )
{
*file << TAB << "- url : " << *itUrl << endl;
}
- *file << TAB << "- path : " << repo.info().path() << endl;
- *file << TAB << "- type : " << repo.info().type() << endl;
+ *file << TAB << "- path : " << repo.path() << endl;
+ *file << TAB << "- type : " << repo.type() << endl;
*file << TAB << " -->" << endl;
- *file << TAB << "first.id()
+ << "-package.xml.gz\" name=\"" << repo.alias()
<< "\" />" << endl << endl;
}
for (PoolItemList::const_iterator iter = languages.begin(); iter != languages.end(); iter++) {
@@ -442,9 +439,7 @@
}
*file << "</setup>" << endl
<< "<trial>" << endl
- << "" << endl
- << "<establish/>" << endl
- << "!> ESTABLISHED:\"/>" << endl;
+ << "" << endl;
}
HelixControl::HelixControl()
@@ -462,8 +457,7 @@
void HelixControl::installResolvable(const ResObject::constPtr &resObject,
const ResStatus &status)
{
- Repository repo = resObject->repository();
- *file << "kind().asString()) << "\""
+ *file << "repoInfo().alias() << "\" kind=\"" << toLower (resObject->kind().asString()) << "\""
<< " name=\"" << resObject->name() << "\"" << " arch=\"" << resObject->arch().asString() << "\""
<< " version=\"" << resObject->edition().version() << "\"" << " release=\"" << resObject->edition().release() << "\""
<< " status=\"" << status << "\""
@@ -473,8 +467,7 @@
void HelixControl::lockResolvable(const ResObject::constPtr &resObject,
const ResStatus &status)
{
- Repository repo = resObject->repository();
- *file << "kind().asString()) << "\""
+ *file << "repoInfo().alias() << "\" kind=\"" << toLower (resObject->kind().asString()) << "\""
<< " name=\"" << resObject->name() << "\"" << " arch=\"" << resObject->arch().asString() << "\""
<< " version=\"" << resObject->edition().version() << "\"" << " release=\"" << resObject->edition().release() << "\""
<< " status=\"" << status << "\""
@@ -484,8 +477,7 @@
void HelixControl::keepResolvable(const ResObject::constPtr &resObject,
const ResStatus &status)
{
- Repository repo = resObject->repository();
- *file << "kind().asString()) << "\""
+ *file << "repoInfo().alias() << "\" kind=\"" << toLower (resObject->kind().asString()) << "\""
<< " name=\"" << resObject->name() << "\"" << " arch=\"" << resObject->arch().asString() << "\""
<< " version=\"" << resObject->edition().version() << "\"" << " release=\"" << resObject->edition().release() << "\""
<< " status=\"" << status << "\""
@@ -495,7 +487,6 @@
void HelixControl::deleteResolvable(const ResObject::constPtr &resObject,
const ResStatus &status)
{
- Repository repo = resObject->repository();
*file << "kind().asString()) << "\""
<< " name=\"" << resObject->name() << "\""
<< " status=\"" << status << "\""
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Testcase.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Testcase.h?rev=8608&r1=8607&r2=8608&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Testcase.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Testcase.h Mon Feb 11 15:25:29 2008
@@ -22,6 +22,7 @@
#include "zypp/Capabilities.h"
#include "zypp/ResPool.h"
#include "zypp/base/GzStream.h"
+#include "zypp/sat/Repo.h"
/////////////////////////////////////////////////////////////////////////
namespace zypp
@@ -81,7 +82,7 @@
};
DEFINE_PTR_TYPE(HelixResolvable);
-typedef std::map RepositoryTable;
+typedef std::map RepositoryTable;
///////////////////////////////////////////////////////////////////
//
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org
For additional commands, e-mail: zypp-commit+help@opensuse.org