Mailinglist Archive: zypp-commit (171 mails)

< Previous Next >
[zypp-commit] <libzypp> master : Satsolver includes are system includes.
  • From: Michael Andres <ma@xxxxxxx>
  • Date: Fri, 5 Jun 2009 14:21:20 +0200
  • Message-id: <E1MCf0t-0003Qr-8i@xxxxxxxxxxxxxxxx>
ref: refs/heads/master
commit 68a3f822faa9e8376c881e6dd2d7fb3a435d7f08
Author: Michael Andres <ma@xxxxxxx>
Date: Fri Jun 5 14:21:20 2009 +0200

Satsolver includes are system includes.
---
zypp/sat/AttrMatcher.cc | 2 +-
zypp/solver/detail/SATResolver.cc | 21 +++++++++--------
zypp/solver/detail/SATResolver.h | 10 +++++---
zypp/solver/detail/SolverQueueItem.cc | 11 ++++++---
zypp/solver/detail/SolverQueueItemDelete.cc | 13 ++++++----
zypp/solver/detail/SolverQueueItemInstall.cc | 15 +++++++-----
zypp/solver/detail/SolverQueueItemInstallOneOf.cc | 25 +++++++++++---------
zypp/solver/detail/SolverQueueItemLock.cc | 21 ++++++++++-------
zypp/solver/detail/SolverQueueItemUpdate.cc | 9 +++++--
9 files changed, 74 insertions(+), 53 deletions(-)

diff --git a/zypp/sat/AttrMatcher.cc b/zypp/sat/AttrMatcher.cc
index 026f2ba..146cd5e 100644
--- a/zypp/sat/AttrMatcher.cc
+++ b/zypp/sat/AttrMatcher.cc
@@ -11,7 +11,7 @@
*/
extern "C"
{
-#include "satsolver/repo.h"
+#include <satsolver/repo.h>
}

#include <iostream>
diff --git a/zypp/solver/detail/SATResolver.cc
b/zypp/solver/detail/SATResolver.cc
index 7524b4a..e8c3df7 100644
--- a/zypp/solver/detail/SATResolver.cc
+++ b/zypp/solver/detail/SATResolver.cc
@@ -18,6 +18,17 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
* 02111-1307, USA.
*/
+extern "C"
+{
+#include <satsolver/repo_solv.h>
+#include <satsolver/poolarch.h>
+#include <satsolver/evr.h>
+#include <satsolver/poolvendor.h>
+#include <satsolver/policy.h>
+#include <satsolver/bitmap.h>
+#include <satsolver/queue.h>
+}
+
#include <sstream>
#include "zypp/solver/detail/Helper.h"
#include "zypp/base/String.h"
@@ -41,16 +52,6 @@
#include "zypp/solver/detail/SolverQueueItemDelete.h"
#include "zypp/solver/detail/SystemCheck.h"

-extern "C" {
-#include "satsolver/repo_solv.h"
-#include "satsolver/poolarch.h"
-#include "satsolver/evr.h"
-#include "satsolver/poolvendor.h"
-#include "satsolver/policy.h"
-#include "satsolver/bitmap.h"
-#include "satsolver/queue.h"
-}
-
/////////////////////////////////////////////////////////////////////////
namespace zypp
{ ///////////////////////////////////////////////////////////////////////
diff --git a/zypp/solver/detail/SATResolver.h b/zypp/solver/detail/SATResolver.h
index 5cb5aba..750731d 100644
--- a/zypp/solver/detail/SATResolver.h
+++ b/zypp/solver/detail/SATResolver.h
@@ -22,6 +22,12 @@
#ifndef ZYPP_SOLVER_DETAIL_SAT_RESOLVER_H
#define ZYPP_SOLVER_DETAIL_SAT_RESOLVER_H

+extern "C"
+{
+#include <satsolver/solver.h>
+#include <satsolver/pool.h>
+}
+
#include <iosfwd>
#include <list>
#include <map>
@@ -36,10 +42,6 @@
#include "zypp/ProblemSolution.h"
#include "zypp/Capability.h"
#include "zypp/solver/detail/SolverQueueItem.h"
-extern "C" {
-#include "satsolver/solver.h"
-#include "satsolver/pool.h"
-}


/////////////////////////////////////////////////////////////////////////
diff --git a/zypp/solver/detail/SolverQueueItem.cc
b/zypp/solver/detail/SolverQueueItem.cc
index 21eb527..e7ca81d 100644
--- a/zypp/solver/detail/SolverQueueItem.cc
+++ b/zypp/solver/detail/SolverQueueItem.cc
@@ -17,13 +17,16 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
* 02111-1307, USA.
*/
+extern "C"
+{
+#include <satsolver/solver.h>
+}

#include "zypp/base/Logger.h"
#include "zypp/solver/detail/SolverQueueItem.h"
-#include "satsolver/solver.h"

/////////////////////////////////////////////////////////////////////////
-namespace zypp
+namespace zypp
{ ///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
namespace solver
@@ -44,10 +47,10 @@ SolverQueueItem::dumpOn( std::ostream & os ) const
switch (_type) {
case QUEUE_ITEM_TYPE_UNKNOWN : os << "unknown"; break;
case QUEUE_ITEM_TYPE_UPDATE : os << "update"; break;
- case QUEUE_ITEM_TYPE_LOCK : os << "lock"; break;
+ case QUEUE_ITEM_TYPE_LOCK : os << "lock"; break;
case QUEUE_ITEM_TYPE_INSTALL : os << "install"; break;
case QUEUE_ITEM_TYPE_DELETE : os << "delete"; break;
- case QUEUE_ITEM_TYPE_INSTALL_ONE_OF: os << "install one of"; break;

+ case QUEUE_ITEM_TYPE_INSTALL_ONE_OF: os << "install one of"; break;
default: os << "?solverqueueitem?"; break;
}
return os;
diff --git a/zypp/solver/detail/SolverQueueItemDelete.cc
b/zypp/solver/detail/SolverQueueItemDelete.cc
index 68dfb3d..70c2b28 100644
--- a/zypp/solver/detail/SolverQueueItemDelete.cc
+++ b/zypp/solver/detail/SolverQueueItemDelete.cc
@@ -17,14 +17,17 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
* 02111-1307, USA.
*/
+extern "C"
+{
+#include <satsolver/solver.h>
+}

#include "zypp/base/Logger.h"
#include "zypp/IdString.h"
#include "zypp/solver/detail/SolverQueueItemDelete.h"
-#include "satsolver/solver.h"

/////////////////////////////////////////////////////////////////////////
-namespace zypp
+namespace zypp
{ ///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
namespace solver
@@ -67,15 +70,15 @@ SolverQueueItemDelete::~SolverQueueItemDelete()
bool SolverQueueItemDelete::addRule (_Queue & q)
{
::Id id = IdString(_name).id();
- if (_soft) {
+ if (_soft) {
queue_push( &(q), SOLVER_ERASE_SOLVABLE_NAME | SOLVER_WEAK);
} else {
- queue_push( &(q), SOLVER_ERASE_SOLVABLE_NAME );
+ queue_push( &(q), SOLVER_ERASE_SOLVABLE_NAME );
}
queue_push( &(q), id);

MIL << "Delete " << _name << (_soft ? "(soft)" : "")
- << " with SAT-Pool: " << id << endl;
+ << " with SAT-Pool: " << id << endl;
return true;
}

diff --git a/zypp/solver/detail/SolverQueueItemInstall.cc
b/zypp/solver/detail/SolverQueueItemInstall.cc
index 71923c1..8f8d495 100644
--- a/zypp/solver/detail/SolverQueueItemInstall.cc
+++ b/zypp/solver/detail/SolverQueueItemInstall.cc
@@ -17,15 +17,18 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
* 02111-1307, USA.
*/
+extern "C"
+{
+#include <satsolver/solver.h>
+}

#include "zypp/base/Logger.h"
#include "zypp/IdString.h"
#include "zypp/IdStringType.h"
#include "zypp/solver/detail/SolverQueueItemInstall.h"
-#include "satsolver/solver.h"

/////////////////////////////////////////////////////////////////////////
-namespace zypp
+namespace zypp
{ ///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
namespace solver
@@ -46,7 +49,7 @@ SolverQueueItemInstall::dumpOn( std::ostream & os ) const
os << "[" << (_soft?"Soft":"") << "Install: "
<< _name
<< "]";
-
+
return os;
}

@@ -69,7 +72,7 @@ SolverQueueItemInstall::~SolverQueueItemInstall()
bool SolverQueueItemInstall::addRule (_Queue & q)
{
::Id id = IdString(_name).id();
- if (_soft) {
+ if (_soft) {
queue_push( &(q), SOLVER_INSTALL_SOLVABLE_NAME | SOLVER_WEAK );
} else {
queue_push( &(q), SOLVER_INSTALL_SOLVABLE_NAME );
@@ -77,7 +80,7 @@ bool SolverQueueItemInstall::addRule (_Queue & q)
queue_push( &(q), id);

MIL << "Install " << _name << (_soft ? "(soft)" : "")
- << " with SAT-PoolID: " << id << endl;
+ << " with SAT-PoolID: " << id << endl;
return true;
}

@@ -100,7 +103,7 @@ SolverQueueItemInstall::cmp (SolverQueueItem_constPtr item)
const
SolverQueueItemInstall_constPtr ins = dynamic_pointer_cast<const
SolverQueueItemInstall>(item);
if (_name != ins->_name) {
return _name.compare(ins->_name);
- }
+ }
return 0;
}

diff --git a/zypp/solver/detail/SolverQueueItemInstallOneOf.cc
b/zypp/solver/detail/SolverQueueItemInstallOneOf.cc
index 191db39..f89149c 100644
--- a/zypp/solver/detail/SolverQueueItemInstallOneOf.cc
+++ b/zypp/solver/detail/SolverQueueItemInstallOneOf.cc
@@ -17,14 +17,17 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
* 02111-1307, USA.
*/
+extern "C"
+{
+#include <satsolver/solver.h>
+}

#include "zypp/base/Logger.h"
#include "zypp/solver/detail/SolverQueueItemInstallOneOf.h"
-#include "satsolver/solver.h"
#include "zypp/sat/Pool.h"

/////////////////////////////////////////////////////////////////////////
-namespace zypp
+namespace zypp
{ ///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
namespace solver
@@ -48,7 +51,7 @@ SolverQueueItemInstallOneOf::dumpOn( std::ostream & os ) const
iter++)
os << *iter;
os << "]";
-
+
return os;
}

@@ -58,7 +61,7 @@ SolverQueueItemInstallOneOf::SolverQueueItemInstallOneOf
(const ResPool & pool,
bool soft)
: SolverQueueItem (QUEUE_ITEM_TYPE_INSTALL_ONE_OF, pool)
, _oneOfList (itemList)
- , _soft (soft)
+ , _soft (soft)
{
}

@@ -74,14 +77,14 @@ bool SolverQueueItemInstallOneOf::addRule (_Queue & q)
bool ret = true;
MIL << "Install one of " << (_soft ? "(soft):" : ":")<< endl;
Queue qs;
-
- if (_soft) {
+
+ if (_soft) {
queue_push( &(q), SOLVER_INSTALL_SOLVABLE_ONE_OF | SOLVER_WEAK);
} else {
queue_push( &(q), SOLVER_INSTALL_SOLVABLE_ONE_OF );
}

- queue_init(&qs);
+ queue_init(&qs);
for (PoolItemList::const_iterator iter = _oneOfList.begin(); iter !=
_oneOfList.end(); iter++) {
Id id = (*iter)->satSolvable().id();
if (id == ID_NULL) {
@@ -89,13 +92,13 @@ bool SolverQueueItemInstallOneOf::addRule (_Queue & q)
ret = false;
} else {
MIL << " candidate:" << *iter << " with the SAT-Pool ID: " << id
<< endl;
- queue_push( &(qs), id );
+ queue_push( &(qs), id );
}
}
- sat::Pool satPool( sat::Pool::instance() );
+ sat::Pool satPool( sat::Pool::instance() );
queue_push( &(q), pool_queuetowhatprovides(satPool.get(), &qs));
queue_free(&qs);
-
+
return ret;
}

@@ -105,7 +108,7 @@ SolverQueueItemInstallOneOf::copy (void) const
SolverQueueItemInstallOneOf_Ptr new_installOneOf = new
SolverQueueItemInstallOneOf (pool(), _oneOfList);
new_installOneOf->SolverQueueItem::copy(this);
new_installOneOf->_soft = _soft;
-
+
return new_installOneOf;
}

diff --git a/zypp/solver/detail/SolverQueueItemLock.cc
b/zypp/solver/detail/SolverQueueItemLock.cc
index 5f9cec3..346aca8 100644
--- a/zypp/solver/detail/SolverQueueItemLock.cc
+++ b/zypp/solver/detail/SolverQueueItemLock.cc
@@ -17,13 +17,16 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
* 02111-1307, USA.
*/
+extern "C"
+{
+#include <satsolver/solver.h>
+}

#include "zypp/base/Logger.h"
#include "zypp/solver/detail/SolverQueueItemLock.h"
-#include "satsolver/solver.h"

/////////////////////////////////////////////////////////////////////////
-namespace zypp
+namespace zypp
{ ///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
namespace solver
@@ -72,20 +75,20 @@ bool SolverQueueItemLock::addRule (_Queue & q)
return false;
}
MIL << "Lock " << _item << " with the SAT-Pool ID: " << id << endl;
- if (_item.status().isInstalled()) {
- if (_soft) {
+ if (_item.status().isInstalled()) {
+ if (_soft) {
queue_push( &(q), SOLVER_INSTALL_SOLVABLE | SOLVER_WEAK );
} else {
- queue_push( &(q), SOLVER_INSTALL_SOLVABLE );
+ queue_push( &(q), SOLVER_INSTALL_SOLVABLE );
}
} else {
- if (_soft) {
+ if (_soft) {
queue_push( &(q), SOLVER_ERASE_SOLVABLE | SOLVER_WEAK );
} else {
- queue_push( &(q), SOLVER_ERASE_SOLVABLE );
- }
+ queue_push( &(q), SOLVER_ERASE_SOLVABLE );
+ }
}
- queue_push( &(q), id );
+ queue_push( &(q), id );
return true;
}

diff --git a/zypp/solver/detail/SolverQueueItemUpdate.cc
b/zypp/solver/detail/SolverQueueItemUpdate.cc
index 695f768..820a61a 100644
--- a/zypp/solver/detail/SolverQueueItemUpdate.cc
+++ b/zypp/solver/detail/SolverQueueItemUpdate.cc
@@ -17,13 +17,16 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
* 02111-1307, USA.
*/
+extern "C"
+{
+#include <satsolver/solver.h>
+}

#include "zypp/base/Logger.h"
#include "zypp/solver/detail/SolverQueueItemUpdate.h"
-#include "satsolver/solver.h"

/////////////////////////////////////////////////////////////////////////
-namespace zypp
+namespace zypp
{ ///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
namespace solver
@@ -73,7 +76,7 @@ bool SolverQueueItemUpdate::addRule (_Queue & q)
}
MIL << "Update explicit " << _item << " with the SAT-Pool ID: " << id <<
endl;
queue_push( &(q), SOLVER_INSTALL_SOLVABLE_UPDATE );
- queue_push( &(q), id );
+ queue_push( &(q), id );
return true;
}

--
To unsubscribe, e-mail: zypp-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages