+++ /dev/null
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/* ResolverQueue.h
- *
- * Copyright (C) 2007 SUSE Linux Products GmbH
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifndef ZYPP_SOLVER_DETAIL_CONTEXTPOOL_H
-#define ZYPP_SOLVER_DETAIL_CONTEXTPOOL_H
-
-#include <iosfwd>
-#include <list>
-#include <map>
-#include <string>
-
-#include "zypp/base/ReferenceCounted.h"
-#include "zypp/base/NonCopyable.h"
-#include "zypp/base/PtrTypes.h"
-
-#include "zypp/solver/detail/Types.h"
-#include "zypp/solver/detail/QueueItem.h"
-
-#include "zypp/Capability.h"
-
-/////////////////////////////////////////////////////////////////////////
-namespace zypp
-{ ///////////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////////
- namespace solver
- { /////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////////
- namespace detail
- { ///////////////////////////////////////////////////////////////////
-
-
-typedef std::list <ResolverContext_Ptr> ResolverContextList;
-
-///////////////////////////////////////////////////////////////////
-//
-// CLASS NAME : ContextPool
-/**
- * Save the last resolver results in a list.
- * The next sovler run can search an already existing rusult with which
- * he can continue.<br>
- *
- * */
-
-class ContextPool : public base::ReferenceCounted, private base::NonCopyable {
-
- private:
- /** maximum stored solver results */
- unsigned maxContext;
- /** List of sucessful solver runs */
- ResolverContextList contextList;
-
- public:
- ContextPool ();
- /**
- * Constructor
- *
- * @param maxCount maximum stored solver results
- * */
- ContextPool (const int maxCount);
- virtual ~ContextPool();
-
- // ---------------------------------- I/O
-
- friend std::ostream& operator<<(std::ostream&, const ContextPool & contextPool);
-
-
- // ---------------------------------- methods
- /**
- * Count of sucessful solver runs
- *
- * */
- int contextListSize() const { return contextList.size(); }
- /**
- * Add an additional sucessful solver run.
- *
- * @param context Solver context
- * @param installItems List of items which are selected by the user
- * @param deleteItems List of items which are selected by the user
- * @param lockUninstalledItems List of items which are selected by the user
- * @param keepItems List of items which are selected by the user
- *
- * */
- void addContext (ResolverContext_Ptr context,
- const PoolItemList & installItems,
- const PoolItemList & deleteItems,
- const PoolItemList & lockUninstalledItems,
- const PoolItemList & keepItems);
- /**
- * Find a solver result in order to use it for the next solver run.
- *
- * @param context Solver context
- * @param installItems List of items which are selected by the user
- * @param deleteItems List of items which are selected by the user
- * @param lockUninstalledItems List of items which are selected by the user
- * @param keepItems List of items which are selected by the user
- * @return solver context
- * */
- ResolverContext_Ptr findContext (PoolItemList & installItems,
- PoolItemList & deleteItems,
- const PoolItemList & lockUninstalledItems,
- const PoolItemList & keepItems);
-
- /**
- * Delete all sucessful solver run.
- *
- * */
- void reset () { contextList.clear(); }
-
-};
-///////////////////////////////////////////////////////////////////
- };// namespace detail
- /////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////////
- };// namespace solver
- ///////////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////////
-};// namespace zypp
-/////////////////////////////////////////////////////////////////////////
-
-#endif // ZYPP_SOLVER_DETAIL_CONTEXTPOOL_H
-
+++ /dev/null
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/* Importance.h
- *
- * Copyright (C) 2000-2002 Ximian, Inc.
- * Copyright (C) 2005 SUSE Linux Products GmbH
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifndef ZYPP_SOLVER_DETAIL_IMPORTANCE_H
-#define ZYPP_SOLVER_DETAIL_IMPORTANCE_H
-
-#include <iosfwd>
-#include <string>
-
-/////////////////////////////////////////////////////////////////////////
-namespace zypp
-{ ///////////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////////
- namespace solver
- { /////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////////
- namespace detail
- { ///////////////////////////////////////////////////////////////////
-
-///////////////////////////////////////////////////////////////////
-//
-// CLASS NAME : Importance
-/**
- *
- **/
-class Importance {
-
- private:
-
- typedef enum {
- IMPORTANCE_INVALID = -1,
-
- IMPORTANCE_NECESSARY,
- IMPORTANCE_URGENT,
- IMPORTANCE_SUGGESTED,
- IMPORTANCE_FEATURE,
- IMPORTANCE_MINOR,
- IMPORTANCE_UNDEFINED,
-
- // Not a real importance
- IMPORTANCE_LAST
- } importance_t;
-
- importance_t _importance;
-
- private:
- importance_t importance () const { return _importance; }
- Importance(importance_t importance);
-
- public:
- static const Importance parse (const std::string & str);
- virtual ~Importance();
-
- static const Importance Undefined;
- static const Importance Invalid;
- static const Importance Necessary;
- static const Importance Urgent;
- static const Importance Suggested;
- static const Importance Feature;
- static const Importance Minor;
-
- // ---------------------------------- I/O
-
- static std::string toString ( const Importance & importance);
-
- virtual std::ostream & dumpOn( std::ostream & str ) const;
-
- friend std::ostream& operator<<( std::ostream&, const Importance & importance);
-
- std::string asString ( void ) const;
-
- // ---------------------------------- accessors
-
- // equality
- bool operator==( const Importance & importance) const {
- return _importance == importance.importance();
- }
-
- // inequality
- bool operator!=( const Importance & importance) const {
- return !(*this == importance);
- }
-
-};
-
-///////////////////////////////////////////////////////////////////
- };// namespace detail
- /////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////////
- };// namespace solver
- ///////////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////////
-};// namespace zypp
-/////////////////////////////////////////////////////////////////////////
-
-#endif // ZYPP_SOLVER_DETAIL_IMPORTANCE_H
+++ /dev/null
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/* Pending.h
- *
- * Copyright (C) 2000-2002 Ximian, Inc.
- * Copyright (C) 2005 SUSE Linux Products GmbH
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifndef ZYPP_SOLVER_DETAIL_PENDING_H
-#define ZYPP_SOLVER_DETAIL_PENDING_H
-
-#include <iosfwd>
-#include <list>
-#include <string>
-#include <string.h>
-
-#include "zypp/base/ReferenceCounted.h"
-#include "zypp/base/NonCopyable.h"
-#include "zypp/base/PtrTypes.h"
-
-/////////////////////////////////////////////////////////////////////////
-namespace zypp
-{ ///////////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////////
- namespace solver
- { /////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////////
- namespace detail
- { ///////////////////////////////////////////////////////////////////
-
- DEFINE_PTR_TYPE(Pending);
-
- typedef std::list <Pending_Ptr> PendingList;
- typedef PendingList * PendingList_Ptr;
-
- ///////////////////////////////////////////////////////////////////
- //
- // CLASS NAME : Pending
-
- class Pending : public base::ReferenceCounted, private base::NonCopyable {
-
-
- typedef enum {
- PENDING_STATUS_INVALID = 0,
- PENDING_STATUS_PRE_BEGIN,
- PENDING_STATUS_RUNNING,
- PENDING_STATUS_BLOCKING,
- PENDING_STATUS_ABORTED,
- PENDING_STATUS_FAILED,
- PENDING_STATUS_FINISHED
- } PendingStatus;
-
- const char *pendingStatusToString (PendingStatus status);
-
- #define INVALID_PENDING_ID 0
-
-
- private:
-
- char *_description;
- int _id;
-
- PendingStatus _status;
-
- double _percent_complete;
-
- size_t _completed_size;
- size_t _total_size;
-
- time_t _start_time;
- time_t _last_time;
- time_t _poll_time;
-
- int _retval;
- char *_error_msg;
-
- std::list<const char *> _messages;
-
- void (*_update) (Pending_Ptr);
- void (*_complete) (Pending_Ptr);
- void (*_message) (Pending_Ptr);
-
- public:
-
- Pending (const char *description);
- virtual ~Pending();
-
- // ---------------------------------- I/O
-
- static std::string toString (const Pending & section);
-
- virtual std::ostream & dumpOn(std::ostream & str ) const;
-
- friend std::ostream& operator<<(std::ostream&, const Pending & section);
-
- std::string asString (void) const;
-
- // ---------------------------------- accessors
-
- const char *description (void) const { return _description; }
- void setDescription (const char *description) { _description = strdup (description); }
- int id (void) const { return _id; }
- PendingStatus status (void) const { return _status; }
- double percentComplete (void) const { return _percent_complete; }
- size_t completedSize (void) const { return _completed_size; }
- size_t totalSize (void) const { return _total_size; }
- time_t startTime (void) const { return _start_time; }
- time_t lastTime (void) const { return _last_time; }
- time_t pollTime (void) const { return _poll_time; }
-
- int elapsedSecs (void) const { return 0; }
- int expectedSecs (void) const { return 0; }
- int remainingSecs (void) const { return 0; }
-
- std::list<const char *> messages (void) const { return _messages; }
- const char *latestMessage (void) const { return _error_msg; }
-
- // ---------------------------------- methods
-
- Pending_Ptr lookupById (int id);
- std::list<Pending_Ptr> getAllActiveIds (void);
-
- void begin (void);
- void update (double percent_complete);
- void updateBySize (size_t size, size_t total_size);
-
- void finished (int retval);
- void abort (int retval);
- void fail (int retval, const char *error_msg);
-
- bool isActive (void);
-
- const char *errorMsg (void);
-
- void addMessage (const char *message);
-
- };
-
- ///////////////////////////////////////////////////////////////////
- };// namespace detail
- /////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////////
- };// namespace solver
- ///////////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////////
-};// namespace zypp
-/////////////////////////////////////////////////////////////////////////
-
-#endif // ZYPP_SOLVER_DETAIL_PENDING_H
+++ /dev/null
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/* Resolver_problems.cc
- *
- * Copyright (C) 2000-2002 Ximian, Inc.
- * Copyright (C) 2005 SUSE Linux Products GmbH
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifndef ZYPP_SOLVER_DETAIL_PROBLEMSOLUTIONALLBRANCHES_H
-#define ZYPP_SOLVER_DETAIL_PROBLEMSOLUTIONALLBRANCHES_H
-
-#include "zypp/ProblemSolution.h"
-#include "zypp/solver/detail/Types.h"
-
-/////////////////////////////////////////////////////////////////////////
-namespace zypp
-{ ///////////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////////
- namespace solver
- { /////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////////
- namespace detail
- { ///////////////////////////////////////////////////////////////////
-
- /**
- * Class representing one possible solution to one problem found during resolving
- * Make the next solver run with ALL branches which are available.
- * (Not regarding the best architecture only)
- *
- **/
- class ProblemSolutionAllBranches : public ProblemSolution
- {
- private:
- bool all;
- public:
-
- /**
- * Constructor.
- **/
- ProblemSolutionAllBranches( ResolverProblem_Ptr parent, const bool takeAll = true);
- };
-
- ///////////////////////////////////////////////////////////////////
- };// namespace detail
- /////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////////
- };// namespace solver
- ///////////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////////
-};// namespace zypp
-/////////////////////////////////////////////////////////////////////////
-
-#endif // ZYPP_SOLVER_DETAIL_PROBLEMSOLUTIONALLBRANCHES_H
-
+++ /dev/null
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/* Resolver_problems.cc
- *
- * Copyright (C) 2000-2002 Ximian, Inc.
- * Copyright (C) 2005 SUSE Linux Products GmbH
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifndef ZYPP_SOLVER_DETAIL_PROBLEMSOLUTIONDOUBLETIMEOUT_H
-#define ZYPP_SOLVER_DETAIL_PROBLEMSOLUTIONDOUBLETIMEOUT_H
-
-#include "zypp/ProblemSolution.h"
-#include "zypp/solver/detail/Types.h"
-
-/////////////////////////////////////////////////////////////////////////
-namespace zypp
-{ ///////////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////////
- namespace solver
- { /////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////////
- namespace detail
- { ///////////////////////////////////////////////////////////////////
-
- /**
- * Class representing one possible solution to one problem found during resolving
- * Make the next solver with double timeout
- *
- **/
- class ProblemSolutionDoubleTimeout : public ProblemSolution
- {
- public:
-
- /**
- * Constructor.
- **/
- ProblemSolutionDoubleTimeout( ResolverProblem_Ptr parent);
- };
-
- ///////////////////////////////////////////////////////////////////
- };// namespace detail
- /////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////////
- };// namespace solver
- ///////////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////////
-};// namespace zypp
-/////////////////////////////////////////////////////////////////////////
-
-#endif // ZYPP_SOLVER_DETAIL_PROBLEMSOLUTIONDOUBLETIMEOUT_H
-
+++ /dev/null
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/* QueueItem.h
- *
- * Copyright (C) 2000-2002 Ximian, Inc.
- * Copyright (C) 2005 SUSE Linux Products GmbH
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifndef ZYPP_SOLVER_DETAIL_QUEUEITEM_H
-#define ZYPP_SOLVER_DETAIL_QUEUEITEM_H
-
-#include <iosfwd>
-#include <list>
-#include <string>
-
-#include "zypp/base/ReferenceCounted.h"
-#include "zypp/base/NonCopyable.h"
-#include "zypp/base/PtrTypes.h"
-
-#include "zypp/ResPool.h"
-
-#include "zypp/solver/detail/Types.h"
-#include "zypp/solver/detail/ResolverInfo.h"
-
-/////////////////////////////////////////////////////////////////////////
-namespace zypp
-{ ///////////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////////
- namespace solver
- { /////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////////
- namespace detail
- { ///////////////////////////////////////////////////////////////////
-
-typedef enum {
- QUEUE_ITEM_TYPE_UNKNOWN = 0, // ordering is important !
- QUEUE_ITEM_TYPE_INSTALL,
- QUEUE_ITEM_TYPE_REQUIRE,
- QUEUE_ITEM_TYPE_BRANCH,
- QUEUE_ITEM_TYPE_GROUP,
- QUEUE_ITEM_TYPE_CONFLICT,
- QUEUE_ITEM_TYPE_UNINSTALL,
- QUEUE_ITEM_TYPE_ESTABLISH,
- QUEUE_ITEM_TYPE_LAST
-} QueueItemType;
-
-
-typedef std::list<QueueItem_Ptr> QueueItemList;
-
-#define CMP(a,b) (((a) < (b)) - ((b) < (a)))
-#define DEFAULTPRIO 10
-
-///////////////////////////////////////////////////////////////////
-//
-// CLASS NAME : QueueItem
-
-class QueueItem : public base::ReferenceCounted, private base::NonCopyable {
-
- private:
-
- QueueItemType _type;
- ResPool _pool;
-
- int _priority;
- size_t _size;
- ResolverInfoList _pending_info;
-
- protected:
-
- QueueItem (QueueItemType type, const ResPool & pool);
-
- public:
-
- virtual ~QueueItem();
-
- // ---------------------------------- I/O
-
- virtual std::ostream & dumpOn( std::ostream & str ) const;
-
- friend std::ostream& operator<<(std::ostream & str, const QueueItem & obj)
- { return obj.dumpOn (str); }
- friend std::ostream& operator<<(std::ostream & str, const QueueItemList & itemlist);
-
- // ---------------------------------- accessors
-
- ResPool pool (void) const { return _pool; }
- int priority (void) const { return _priority; }
- void setPriority (int priority) { _priority = priority; }
- int size (void) const { return _size; }
-
- // ---------------------------------- methods
-
- void copy (const QueueItem *from);
-
- bool isBranch (void) const { return _type == QUEUE_ITEM_TYPE_BRANCH; }
- bool isConflict (void) const { return _type == QUEUE_ITEM_TYPE_CONFLICT; }
- bool isGroup (void) const { return _type == QUEUE_ITEM_TYPE_GROUP; }
- bool isInstall (void) const { return _type == QUEUE_ITEM_TYPE_INSTALL; }
- bool isRequire (void) const { return _type == QUEUE_ITEM_TYPE_REQUIRE; }
- bool isUninstall (void) const { return _type == QUEUE_ITEM_TYPE_UNINSTALL; }
- bool isEstablish (void) const { return _type == QUEUE_ITEM_TYPE_ESTABLISH; }
-
- virtual bool process (const QueueItemList & mainQueue, ResolverContext_Ptr context, QueueItemList & qil) = 0;
- virtual QueueItem_Ptr copy (void) const = 0;
- virtual int cmp (QueueItem_constPtr item) const = 0;
- int compare (QueueItem_constPtr item) const { return CMP(_type, item->_type); }
-
- // isRedundant true == can be dropped from any branch
- virtual bool isRedundant (ResolverContext_Ptr context) const = 0;
-
- // isSatisfied true == can be dropped from any queue, and any
- // branch containing it can also be dropped
- virtual bool isSatisfied (ResolverContext_Ptr context) const = 0;
-
- void addInfo (ResolverInfo_Ptr);
- void logInfo (ResolverContext_Ptr);
-};
-
-///////////////////////////////////////////////////////////////////
- };// namespace detail
- /////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////////
- };// namespace solver
- ///////////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////////
-};// namespace zypp
-/////////////////////////////////////////////////////////////////////////
-
-#endif // ZYPP_SOLVER_DETAIL_QUEUEITEM_H
+++ /dev/null
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/* QueueItemBranch.h
- *
- * Copyright (C) 2000-2002 Ximian, Inc.
- * Copyright (C) 2005 SUSE Linux Products GmbH
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifndef ZYPP_SOLVER_DETAIL_QUEUEITEMBRANCH_H
-#define ZYPP_SOLVER_DETAIL_QUEUEITEMBRANCH_H
-
-#include <iosfwd>
-#include <list>
-#include <string>
-
-#include "zypp/solver/detail/Types.h"
-#include "zypp/solver/detail/QueueItem.h"
-
-/////////////////////////////////////////////////////////////////////////
-namespace zypp
-{ ///////////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////////
- namespace solver
- { /////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////////
- namespace detail
- { ///////////////////////////////////////////////////////////////////
-
-///////////////////////////////////////////////////////////////////
-//
-// CLASS NAME : QueueItemBranch
-
-class QueueItemBranch : public QueueItem {
-
-
- private:
- std::string _label;
- QueueItemList _possible_qitems;
-
- public:
-
- QueueItemBranch (const ResPool & pool);
- virtual ~QueueItemBranch();
-
- // ---------------------------------- I/O
-
- virtual std::ostream & dumpOn( std::ostream & str ) const;
-
- friend std::ostream& operator<<(std::ostream & str, const QueueItemBranch & obj)
- { return obj.dumpOn (str); }
-
- // ---------------------------------- accessors
-
- QueueItemList possibleQItems (void) const { return _possible_qitems; }
-
- const std::string & label (void) const { return _label; }
- void setLabel (const std::string & label) { _label = label; }
-
- bool isEmpty (void) const { return _possible_qitems.empty(); }
-
- // ---------------------------------- methods
-
- virtual bool process (const QueueItemList & mainQueue, ResolverContext_Ptr context, QueueItemList & qil);
- virtual QueueItem_Ptr copy (void) const;
- virtual int cmp (QueueItem_constPtr item) const;
- virtual bool isRedundant (ResolverContext_Ptr context) const { return false; }
- virtual bool isSatisfied (ResolverContext_Ptr context) const { return false; }
-
- void addItem (QueueItem_Ptr subitem);
- bool contains (QueueItem_Ptr possible_subbranch);
-};
-
-///////////////////////////////////////////////////////////////////
- };// namespace detail
- /////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////////
- };// namespace solver
- ///////////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////////
-};// namespace zypp
-/////////////////////////////////////////////////////////////////////////
-#endif // ZYPP_SOLVER_DETAIL_QUEUEITEMBRANCH_H
+++ /dev/null
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/* QueueItemConflict.h
- *
- * Copyright (C) 2000-2002 Ximian, Inc.
- * Copyright (C) 2005 SUSE Linux Products GmbH
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifndef ZYPP_SOLVER_DETAIL_QUEUEITEMCONFLICT_H
-#define ZYPP_SOLVER_DETAIL_QUEUEITEMCONFLICT_H
-
-#include <iosfwd>
-#include <list>
-#include <string>
-
-#include "zypp/solver/detail/Types.h"
-#include "zypp/solver/detail/QueueItem.h"
-
-#include "zypp/Capability.h"
-
-/////////////////////////////////////////////////////////////////////////
-namespace zypp
-{ ///////////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////////
- namespace solver
- { /////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////////
- namespace detail
- { ///////////////////////////////////////////////////////////////////
-
-///////////////////////////////////////////////////////////////////
-//
-// CLASS NAME : QueueItemConflict
-
-class QueueItemConflict : public QueueItem {
-
-
- private:
- const Capability _capability; // the conflicting capability
- PoolItem_Ref _conflicting_item; // the item which issued the conflict, can be 'empty' for 'extraConflicts'
- bool _soft;
-
- bool _actually_an_obsolete;
- bool _explicitly_requested;
-
- public:
-
- QueueItemConflict (const ResPool & pool, const Capability & capability, PoolItem_Ref item, bool soft = false);
- virtual ~QueueItemConflict();
-
- // ---------------------------------- I/O
-
- virtual std::ostream & dumpOn( std::ostream & str ) const;
-
- friend std::ostream& operator<<(std::ostream & str, const QueueItemConflict & obj)
- { return obj.dumpOn (str); }
-
- // ---------------------------------- accessors
-
- const Capability & capability (void) const { return _capability; }
- bool isSoft (void) const { return _soft; }
- bool actuallyAnObsolete (void) const { return _actually_an_obsolete; }
- void setActuallyAnObsolete (void) { _actually_an_obsolete = true; }
- void setExplicitlyRequested (void) { _explicitly_requested = true; }
-
- // ---------------------------------- methods
-
- virtual bool process (const QueueItemList & mainQueue, ResolverContext_Ptr context, QueueItemList & qil);
- virtual QueueItem_Ptr copy (void) const;
- virtual int cmp (QueueItem_constPtr item) const;
- virtual bool isRedundant (ResolverContext_Ptr context) const { return false; }
- virtual bool isSatisfied (ResolverContext_Ptr context) const { return false; }
-
-};
-
-///////////////////////////////////////////////////////////////////
- };// namespace detail
- /////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////////
- };// namespace solver
- ///////////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////////
-};// namespace zypp
-/////////////////////////////////////////////////////////////////////////
-#endif // ZYPP_SOLVER_DETAIL_QUEUEITEMCONFLICT_H
+++ /dev/null
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* QueueItemEstablish.h
- *
- * Copyright (C) 2000-2002 Ximian, Inc.
- * Copyright (C) 2005 SUSE Linux Products GmbH
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifndef ZYPP_SOLVER_DETAIL_QUEUEITEMESTABLISH_H
-#define ZYPP_SOLVER_DETAIL_QUEUEITEMESTABLISH_H
-
-#include <iosfwd>
-#include <list>
-#include <string>
-
-#include "zypp/solver/detail/Types.h"
-#include "zypp/solver/detail/QueueItem.h"
-#include "zypp/Capabilities.h"
-
-/////////////////////////////////////////////////////////////////////////
-namespace zypp
-{ ///////////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////////
- namespace solver
- { /////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////////
- namespace detail
- { ///////////////////////////////////////////////////////////////////
-
-///////////////////////////////////////////////////////////////////
-//
-// CLASS NAME : QueueItemEstablish
-
-class QueueItemEstablish : public QueueItem {
-
- private:
- PoolItem_Ref _item;
- bool _soft;
- int _channel_priority;
- int _other_penalty;
-
- bool _explicitly_requested;
-
- public:
-
- QueueItemEstablish (const ResPool & pool, PoolItem_Ref item, bool soft = false);
- virtual ~QueueItemEstablish();
-
- // ---------------------------------- I/O
-
- virtual std::ostream & dumpOn( std::ostream & str ) const;
-
- friend std::ostream& operator<<(std::ostream & str, const QueueItemEstablish & obj)
- { return obj.dumpOn (str); }
-
- // ---------------------------------- accessors
-
- PoolItem_Ref item (void) const { return _item; }
-
- int channelPriority (void) const { return _channel_priority; }
- void setChannelPriority (int channel_priority) { _channel_priority = channel_priority; }
-
- int otherPenalty (void) { return _other_penalty; }
- void setOtherPenalty (int other_penalty) { _other_penalty = other_penalty; }
-
- void setExplicitlyRequested (void) { _explicitly_requested = true; }
-
- // ---------------------------------- methods
-
- virtual bool process (const QueueItemList & mainQueue, ResolverContext_Ptr context, QueueItemList & qil);
- virtual QueueItem_Ptr copy (void) const;
- virtual int cmp (QueueItem_constPtr item) const;
-
- virtual bool isRedundant (ResolverContext_Ptr context) const { return false; }
- virtual bool isSatisfied (ResolverContext_Ptr context) const;
-};
-
-///////////////////////////////////////////////////////////////////
- };// namespace detail
- /////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////////
- };// namespace solver
- ///////////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////////
-};// namespace zypp
-/////////////////////////////////////////////////////////////////////////
-
-#endif // ZYPP_SOLVER_DETAIL_QUEUEITEMESTABLISH_H
+++ /dev/null
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/* QueueItemGroup.h
- *
- * Copyright (C) 2000-2002 Ximian, Inc.
- * Copyright (C) 2005 SUSE Linux Products GmbH
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifndef ZYPP_SOLVER_DETAIL_QUEUEITEMGROUP_H
-#define ZYPP_SOLVER_DETAIL_QUEUEITEMGROUP_H
-
-#include <iosfwd>
-#include <list>
-#include <string>
-
-#include "zypp/solver/detail/Types.h"
-#include "zypp/solver/detail/QueueItem.h"
-
-/////////////////////////////////////////////////////////////////////////
-namespace zypp
-{ ///////////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////////
- namespace solver
- { /////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////////
- namespace detail
- { ///////////////////////////////////////////////////////////////////
-
-///////////////////////////////////////////////////////////////////
-//
-// CLASS NAME : QueueItemGroup
-
-class QueueItemGroup : public QueueItem {
-
-
- private:
- QueueItemList _subitems;
-
- public:
-
- QueueItemGroup (const ResPool & pool);
- virtual ~QueueItemGroup();
-
- // ---------------------------------- I/O
-
- virtual std::ostream & dumpOn( std::ostream & str ) const;
-
- friend std::ostream& operator<<(std::ostream & str, const QueueItemGroup & obj)
- { return obj.dumpOn (str); }
-
- // ---------------------------------- accessors
-
- // ---------------------------------- methods
-
- virtual bool process (const QueueItemList & mainQueue, ResolverContext_Ptr context, QueueItemList & qil);
- virtual QueueItem_Ptr copy (void) const;
- virtual int cmp (QueueItem_constPtr item) const;
- virtual bool isRedundant (ResolverContext_Ptr context) const { return false; }
- virtual bool isSatisfied (ResolverContext_Ptr context) const { return false; }
-
- void addItem (QueueItem_Ptr subitem);
-};
-
-///////////////////////////////////////////////////////////////////
- };// namespace detail
- /////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////////
- };// namespace solver
- ///////////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////////
-};// namespace zypp
-/////////////////////////////////////////////////////////////////////////
-#endif // ZYPP_SOLVER_DETAIL_QUEUEITEMGROUP_H
+++ /dev/null
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/* QueueItemInstall.h
- *
- * Copyright (C) 2000-2002 Ximian, Inc.
- * Copyright (C) 2005 SUSE Linux Products GmbH
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifndef ZYPP_SOLVER_DETAIL_QUEUEITEMINSTALL_H
-#define ZYPP_SOLVER_DETAIL_QUEUEITEMINSTALL_H
-
-#include <iosfwd>
-#include <list>
-#include <string>
-
-#include "zypp/solver/detail/Types.h"
-#include "zypp/solver/detail/QueueItem.h"
-#include "zypp/Capabilities.h"
-
-/////////////////////////////////////////////////////////////////////////
-namespace zypp
-{ ///////////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////////
- namespace solver
- { /////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////////
- namespace detail
- { ///////////////////////////////////////////////////////////////////
-
-///////////////////////////////////////////////////////////////////
-//
-// CLASS NAME : QueueItemInstall
-
-class QueueItemInstall : public QueueItem {
-
-
- private:
- PoolItem_Ref _item; // the item to-be-installed
- bool _soft; // if triggered by a soft requirement (a recommends)
- PoolItem_Ref _upgrades; // the item this install upgrades (if any)
- Capability _dep_satisfied_by_this_install;
- PoolItem_Ref _needed_by;
- int _channel_priority;
- int _other_penalty;
-
- bool _explicitly_requested;
-
- public:
-
- QueueItemInstall (const ResPool & pool, PoolItem_Ref item, bool soft = false);
- virtual ~QueueItemInstall();
-
- // ---------------------------------- I/O
-
- virtual std::ostream & dumpOn( std::ostream & str ) const;
-
- friend std::ostream& operator<<(std::ostream & str, const QueueItemInstall & obj)
- { return obj.dumpOn (str); }
-
- // ---------------------------------- accessors
-
- PoolItem_Ref item(void) const { return _item; }
-
- bool isSoft (void) const { return _soft; }
-
- PoolItem_Ref upgrades (void) const { return _upgrades; }
- void setUpgrades (PoolItem_Ref upgrades) { _upgrades = upgrades; }
-
- int channelPriority (void) const { return _channel_priority; }
- void setChannelPriority (int channel_priority) { _channel_priority = channel_priority; }
-
- int otherPenalty (void) { return _other_penalty; }
- void setOtherPenalty (int other_penalty) { _other_penalty = other_penalty; }
-
- void setExplicitlyRequested (void) { _explicitly_requested = true; }
-
- // ---------------------------------- methods
-
- virtual bool process (const QueueItemList & mainQueue, ResolverContext_Ptr context, QueueItemList & qil);
- virtual QueueItem_Ptr copy (void) const;
- virtual int cmp (QueueItem_constPtr item) const;
-
- virtual bool isRedundant (ResolverContext_Ptr context) const { return false; }
- virtual bool isSatisfied (ResolverContext_Ptr context) const;
-
- void setDependency (const Capability & capability) {_dep_satisfied_by_this_install = capability;}
- void setNeededBy (const PoolItem_Ref item) {_needed_by=item;}
-
-};
-
-///////////////////////////////////////////////////////////////////
- };// namespace detail
- /////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////////
- };// namespace solver
- ///////////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////////
-};// namespace zypp
-/////////////////////////////////////////////////////////////////////////
-
-#endif // ZYPP_SOLVER_DETAIL_QUEUEITEMINSTALL_H
+++ /dev/null
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/* QueueItemRequire.h
- *
- * Copyright (C) 2000-2002 Ximian, Inc.
- * Copyright (C) 2005 SUSE Linux Products GmbH
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifndef ZYPP_SOLVER_DETAIL_QUEUEITEMREQUIRE_H
-#define ZYPP_SOLVER_DETAIL_QUEUEITEMREQUIRE_H
-
-#include <iosfwd>
-#include <list>
-#include <string>
-
-#include "zypp/solver/detail/QueueItem.h"
-
-#include "zypp/Capability.h"
-
-/////////////////////////////////////////////////////////////////////////
-namespace zypp
-{ ///////////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////////
- namespace solver
- { /////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////////
- namespace detail
- { ///////////////////////////////////////////////////////////////////
-
-///////////////////////////////////////////////////////////////////
-// CLASS NAME : QueueItemRequire_Ptr
-// CLASS NAME : QueueItemRequire_constPtr
-///////////////////////////////////////////////////////////////////
-DEFINE_PTR_TYPE(QueueItemRequire);
-
-///////////////////////////////////////////////////////////////////
-//
-// CLASS NAME : QueueItemRequire
-
-class QueueItemRequire : public QueueItem {
-
- private:
- const Capability _capability; // the required capability
- bool _soft;
-
- PoolItem_Ref _requiring_item; // who's requiring it
-
- PoolItem_Ref _upgraded_item;
- PoolItem_Ref _lost_item;
-
- bool _remove_only;
-
- public:
-
- QueueItemRequire (const ResPool & pool, const Capability & cap, bool soft = false);
- virtual ~QueueItemRequire();
-
- // ---------------------------------- I/O
-
- virtual std::ostream & dumpOn( std::ostream & str ) const;
-
- friend std::ostream & operator<<(std::ostream & str, const QueueItemRequire & obj)
- { return obj.dumpOn (str); }
-
- // ---------------------------------- accessors
-
- bool isSoft (void) const { return _soft; }
-
- const Capability & capability (void) const { return _capability; }
-
- void setRemoveOnly (void) { _remove_only = true; }
- void setUpgradedPoolItem (PoolItem_Ref upgraded_item) { _upgraded_item = upgraded_item; }
- void setLostPoolItem (PoolItem_Ref lost_item) { _lost_item = lost_item; }
-
- // ---------------------------------- methods
-
- virtual bool process (const QueueItemList & mainQueue, ResolverContext_Ptr context, QueueItemList & qil);
- virtual QueueItem_Ptr copy (void) const;
- virtual int cmp (QueueItem_constPtr item) const;
- virtual bool isRedundant (ResolverContext_Ptr context) const { return false; }
- virtual bool isSatisfied (ResolverContext_Ptr context) const { return false; }
-
- void addPoolItem (PoolItem_Ref item);
-
-
-};
-
-///////////////////////////////////////////////////////////////////
- };// namespace detail
- /////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////////
- };// namespace solver
- ///////////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////////
-};// namespace zypp
-/////////////////////////////////////////////////////////////////////////
-
-#endif // ZYPP_SOLVER_DETAIL_QUEUEITEMREQUIRE_H
+++ /dev/null
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/* QueueItemUninstall.h
- *
- * Copyright (C) 2000-2002 Ximian, Inc.
- * Copyright (C) 2005 SUSE Linux Products GmbH
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifndef ZYPP_SOLVER_DETAIL_QUEUITEMUNINSTALL_H
-#define ZYPP_SOLVER_DETAIL_QUEUITEMUNINSTALL_H
-
-#include "zypp/solver/detail/Types.h"
-
-#include "zypp/solver/detail/QueueItem.h"
-#include "zypp/Capability.h"
-
-/////////////////////////////////////////////////////////////////////////
-namespace zypp
-{ ///////////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////////
- namespace solver
- { /////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////////
- namespace detail
- { ///////////////////////////////////////////////////////////////////
-
-DEFINE_PTR_TYPE(QueueItemUninstall);
-
-///////////////////////////////////////////////////////////////////
-//
-// CLASS NAME : QueueItemUninstall
-
-class QueueItemUninstall : public QueueItem {
-
- public:
- typedef enum {
- CONFLICT, // conflicts [dep]
- OBSOLETE, // obsolets [dep]
- UNSATISFIED, // unsatisfied dep, must be unistalled since required dep isnt provided anymore
- BACKOUT, // back out during verify
- UPGRADE, // its being upgraded, so the original get uninstalled, find out if this breaks something
- DUPLICATE, // duplicate install
- EXPLICIT // user request
- } UninstallReason;
-
-
- private:
- PoolItem_Ref _item; // the item to-be-uninstalled
- UninstallReason _reason;
- bool _soft;
- Capability _cap_leading_to_uninstall;
- PoolItem_Ref _upgraded_to; // if the uninstall is actually an upgrade
-
- bool _explicitly_requested;
- bool _remove_only;
- bool _due_to_conflict;
- bool _due_to_obsolete;
- bool _unlink;
- PoolItem_Ref _obsoletes_item; // item which has caused (has the obsoletes) this request
-
- public:
-
- QueueItemUninstall (const ResPool & pool, PoolItem_Ref item, UninstallReason reason, bool soft = false);
- virtual ~QueueItemUninstall();
-
- // ---------------------------------- I/O
-
- virtual std::ostream & dumpOn( std::ostream & str ) const;
-
- friend std::ostream& operator<<(std::ostream& str, const QueueItemUninstall & obj)
- { return obj.dumpOn (str); }
-
- // ---------------------------------- accessors
-
- UninstallReason reason (void) const { return _reason; }
- void setCapability (const Capability & cap) { _cap_leading_to_uninstall = cap; }
- void setExplicitlyRequested (void) { _explicitly_requested = true; }
- void setRemoveOnly (void) { _remove_only = true; }
- void setUpgradedTo (PoolItem_Ref item) { _upgraded_to = item; }
- void setDueToConflict (void) { _due_to_conflict = true; }
- void setDueToObsolete (const PoolItem_Ref item)
- { _due_to_obsolete = true; _obsoletes_item = item; }
- void setUnlink (void);
- PoolItem_Ref deletedItem(void) const { return _item; }
-
- // ---------------------------------- methods
-
- virtual bool process (const QueueItemList & mainQueue, ResolverContext_Ptr context, QueueItemList & qil);
- virtual QueueItem_Ptr copy (void) const;
- virtual int cmp (QueueItem_constPtr item) const;
- virtual bool isRedundant (ResolverContext_Ptr context) const { return false; }
- virtual bool isSatisfied (ResolverContext_Ptr context) const { return false; }
-
-};
-
-///////////////////////////////////////////////////////////////////
- };// namespace detail
- /////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////////
- };// namespace solver
- ///////////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////////
-};// namespace zypp
-/////////////////////////////////////////////////////////////////////////
-
-#endif // ZYPP_SOLVER_DETAIL_QUEUITEMUNINSTALL_H
+++ /dev/null
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/* ResolverContext.h
- *
- *Keep a set of 'active' PoolItems, these are part of the current
- *transaction. It thereby provides a to-be status for these items
- *
- *
- *Copyright (C) 2000-2002 Ximian, Inc.
- *Copyright (C) 2005 SUSE Linux Products GmbH
- *
- *This program is free software; you can redistribute it and/or
- *modify it under the terms of the GNU General Public License,
- *version 2, as published by the Free Software Foundation.
- *
- *This program is distributed in the hope that it will be useful, but
- *WITHOUT ANY WARRANTY; without even the implied warranty of
- *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- *General Public License for more details.
- *
- *You should have received a copy of the GNU General Public License
- *along with this program; if not, write to the Free Software
- *Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- *02111-1307, USA.
- */
-
-#ifndef ZYPP_SOLVER_DETAIL_RESOLVERCONTEXT_H
-#define ZYPP_SOLVER_DETAIL_RESOLVERCONTEXT_H
-
-#include "zypp/ResPool.h"
-#include "zypp/PoolItem.h"
-#include "zypp/Capability.h"
-#include "zypp/Repository.h"
-
-#include "zypp/solver/detail/Types.h"
-#include "zypp/solver/detail/ResolverInfo.h"
-
-/////////////////////////////////////////////////////////////////////////
-namespace zypp
-{ ///////////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////////
- namespace solver
- { /////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////////
- namespace detail
- { ///////////////////////////////////////////////////////////////////
-
-typedef void (*ResolverContextFn) (ResolverContext_Ptr ctx, void *data);
-typedef void (*MarkedPoolItemFn) (PoolItem_Ref item, const ResStatus & status, void *data);
-typedef void (*MarkedPoolItemPairFn) (PoolItem_Ref item1, const ResStatus & status1, PoolItem_Ref item2, const ResStatus & status2, void *data);
-typedef std::multimap<PoolItem_Ref,Capability> IgnoreMap;
-typedef std::map<Repository ,int> RepositoryCounter;
-
-///////////////////////////////////////////////////////////////////
-//
-// CLASS NAME : ResolverContext
-class ResolverContext : public base::ReferenceCounted, private base::NonCopyable {
-
-
- private:
-
- ResolverContext_Ptr _parent; // branches share a common parent
- ResolverContext_Ptr _establish_context; // Context of the last Resolver-Establish call
-
- typedef std::map<PoolItem_Ref,ResStatus> Context;
- Context _context; // the set of items touched in this transaction
-
- ResPool _pool;
-
- ResolverInfoList _log; // report log
-
- unsigned long long _download_size;
- unsigned long long _install_size;
- int _total_priority;
- int _min_priority;
- int _max_priority;
- int _other_penalties;
-
- bool _verifying; // running 'verifySystem'
- bool _establishing; // running 'establishSystem'
- bool _invalid; // lead to invalid solution
- bool _askUser; // lead to invalid solution too cause we have to ask the user
-
- PoolItem_Ref _last_checked_item; // cache for {get,set}Status
- ResStatus _last_checked_status;
-
- PoolItemList _last_getMarked; // status of the last getMarked call
- // it is sorted
- int _last_getMarked_which; // which kind of getMarked
-
- Arch _architecture;
-
- // These conflict should be ignored of the concering item
- IgnoreMap _ignoreConflicts;
- // These requires should be ignored of the concering item
- IgnoreMap _ignoreRequires;
- // These obsoletes should be ignored of the concering item
- IgnoreMap _ignoreObsoletes;
- // Ignore the status "installed" of the item
- PoolItemList _ignoreInstalledItem;
- // Ignore the architecture of the item
- PoolItemList _ignoreArchitectureItem;
- // Ignore the vendor of the item
- PoolItemList _ignoreVendorItem;
-
- // Items which has been selected NOT by the solver
- // This will be stored while a solver run in order to save time
- // if this information is needed.
- PoolItemList _userDeleteItems;
- PoolItemList _userInstallItems;
- PoolItemList _userLockUninstalledItems;
- PoolItemList _userKeepItems;
-
- bool _forceResolve; // remove items which are conflicts with others or
- // have unfulfilled requirements.
- // This behaviour is favourited by ZMD
- bool _upgradeMode; // Resolver has been called with doUpgrade
-
- bool _preferHighestVersion; // Prefer the result with the newest version
- //if there are more solver results.
-
- // In order reducing solver time we are reducing the branches
- // by skipping resolvables which have worse architecture,edition
- // than a resolvable which provides the same cababilities.
- // BUT if there is no valid solution we will regard the "other"
- // resolvables in a second solver run too.
- bool _tryAllPossibilities; // Try ALL alternatives
- bool _skippedPossibilities;// Flag that there are other possibilities
- // which we are currently ignore
-
- public:
- ResolverContext (const ResPool & pool, const Arch & arch, ResolverContext_Ptr parent = NULL);
- virtual ~ResolverContext();
-
- // ---------------------------------- I/O
-
- friend std::ostream& operator<<(std::ostream&, const ResolverContext & context);
-
- // ---------------------------------- accessors
-
- unsigned long long downloadSize(void) const { return _download_size; }
- unsigned long long installSize(void) const { return _install_size; }
- int totalPriority (void) const { return _total_priority; }
- int minPriority (void) const { return _min_priority; }
- int maxPriority (void) const { return _max_priority; }
- int otherPenalties (void) const { return _other_penalties; }
-
- bool isValid (void) const { return !_invalid; }
- bool askUser (void) const { return _askUser; }
- bool isInvalid (void) const { return _invalid; }
-
- bool verifying (void) const { return _verifying; }
- void setVerifying (bool verifying) { _verifying = verifying; }
-
- bool tryAllPossibilities (void) const { return _tryAllPossibilities; }
- void setTryAllPossibilities (bool tryAllPossibilities) { _tryAllPossibilities = tryAllPossibilities; }
-
- bool skippedPossibilities (void) const { return _skippedPossibilities; }
- void setSkippedPossibilities (bool skippedPossibilities) { _skippedPossibilities = skippedPossibilities; }
-
- bool establishing (void) const { return _establishing; }
- void setEstablishing (bool establishing) { _establishing = establishing; }
-
- inline ResPool pool() const { return _pool; }
-
- inline Arch architecture() const { return _architecture; }
-
- // ---------------------------------- ignore capabilities
- void setIgnoreCababilities(const IgnoreMap ignoreConflicts,
- const IgnoreMap ignoreRequires,
- const IgnoreMap ignoreObsoletes,
- const PoolItemList ignoreInstalledItem,
- const PoolItemList ignoreArchitectureItem,
- const PoolItemList ignoreVendorItem)
- {_ignoreConflicts = ignoreConflicts;
- _ignoreRequires = ignoreRequires;
- _ignoreObsoletes = ignoreObsoletes;
- _ignoreInstalledItem = ignoreInstalledItem;
- _ignoreArchitectureItem = ignoreArchitectureItem;
- _ignoreVendorItem = ignoreVendorItem;
- }
-
- const IgnoreMap getIgnoreConflicts() const { return _ignoreConflicts; }
- const IgnoreMap getIgnoreRequires() const { return _ignoreRequires; }
- const IgnoreMap getIgnoreObsoletes() const { return _ignoreObsoletes; }
- const PoolItemList getIgnoreInstalledItem() const { return _ignoreInstalledItem; }
- const PoolItemList getIgnoreArchitectureItem() const { return _ignoreArchitectureItem; }
- const PoolItemList getIgnoreVendorItem() const { return _ignoreVendorItem; }
-
- void setForceResolve (const bool force) { _forceResolve = force; }
- bool forceResolve() { return _forceResolve; }
-
- void setEstablishContext (const ResolverContext_Ptr establish_context) { _establish_context = establish_context; }
-
- void setPreferHighestVersion (const bool highestVersion) { _preferHighestVersion = highestVersion; }
- bool preferHighestVersion() { return _preferHighestVersion; }
-
- void setUpgradeMode (const bool upgrade) { _upgradeMode = upgrade; }
- bool upgradeMode() { return _upgradeMode; }
-
- void setUserDeleteItems ( const PoolItemList & deleteItems) { _userDeleteItems = deleteItems; }
- void setUserInstallItems ( const PoolItemList& installItems) { _userInstallItems = installItems; }
- void setUserLockUninstalledItems ( const PoolItemList& lockItems) { _userLockUninstalledItems = lockItems; }
- void setUserKeepItems ( const PoolItemList& keepItems) { _userKeepItems = keepItems; }
- PoolItemList userDeleteItems () { return _userDeleteItems; }
- PoolItemList userInstallItems () { return _userInstallItems; }
- PoolItemList userLockUninstalledItems () { return _userLockUninstalledItems; }
- PoolItemList userKeepItems () { return _userKeepItems; }
-
- // ---------------------------------- methods
-
- /**
- *get the state of \c item
- *This is NOT the status in the pool but the status according
- * to the context. */
- ResStatus getStatus (PoolItem_Ref item);
-
- /** state change functions
- * they do some checking before actually changing the state of the PoolItem. */
-
- /**
- *set the state of \c item to \c status
- *If \c status is not the current state of \c item, make \c item
- *part of the current transaction (the context) */
- void setStatus (PoolItem_Ref item, const ResStatus & status);
-
- /**
- *set \c item to \a to-be-installed */
- bool install (PoolItem_Ref item, bool is_soft, int other_penalty);
-
- /**
- *set \c item to \a satisfied */
- bool satisfy (PoolItem_Ref item, int other_penalty);
-
- /**
- *set \c item to \a unneeded */
- bool unneeded (PoolItem_Ref item, int other_penalty);
-
- /**
- *set \c item to \a incomplete */
- bool incomplete (PoolItem_Ref item, int other_penalty);
-
- /**
- *upgrade \c from to \c to
- *marks \c from as \a to-be-uninstalled and \c to as \a to-be-installed */
- bool upgrade (PoolItem_Ref to, PoolItem_Ref from, bool is_soft, int other_penalty);
-
- /**
- *set \c item to \a to-be-uninstalled */
- bool uninstall (PoolItem_Ref item, bool part_of_upgrade, bool due_to_obsolete, bool due_to_unlink, bool explicitly_requested);
-
- // rough installed/uninstalled test for 'after transaction'
-
- /**
- *\return \c true if \c item is \a installed or \a to-be-installed */
- bool isPresent (PoolItem_Ref item, bool *unneeded = NULL,
- bool *installed = NULL);
-
- /**
- *\return \c true if \c item is \a uninstalled or \a to-be-uninstalled */
- bool isAbsent (PoolItem_Ref item);
-
- bool requirementIsMet (const Capability & cap,
- const PoolItem_Ref who,
- const Dep & capKind,
- bool *unneeded = NULL,
- bool *installed = NULL,
- const bool installInfoFlag = false);
- /**
- *\return \c true if the requirement is already fulfilled.
- *either by an installed item or the requirement is unneeded.
- *The behaviour depends on the item kind (package,patch,..)
- *which requires this capability.
- */
- bool requirementIsInstalledOrUnneeded (const Capability & capability,
- const PoolItem_Ref who,
- const Dep & capKind);
- bool requirementIsPossible (const Capability & cap);
- // check if its possible to install item; if not, return first failed capability via 'failed'
- bool itemIsPossible( const PoolItem_Ref item, Capability & failed );
- bool isParallelInstall (const PoolItem_Ref item) const;
- PoolItem_Ref getParallelInstall (const PoolItem_Ref item) const;
-
- /** iterate over various states */
-
- void foreachMarked (MarkedPoolItemFn fn, void *data) const;
- PoolItemList getMarked (int which); // <0:uninstalls, 0:all; >0:installs
-
- int foreachInstall (MarkedPoolItemFn fn, void *data) const;
- PoolItemList getInstalls (void) const;
- int installCount (void) const;
-
- int foreachUninstall (MarkedPoolItemFn fn, void *data);
- PoolItemList getUninstalls (void);
- int uninstallCount (void);
-
- int foreachUpgrade (MarkedPoolItemPairFn fn, void *data);
- PoolItemList getUpgrades (void);
- int upgradeCount (void);
-
- int foreachSatisfy (MarkedPoolItemFn fn, void *data) const;
- PoolItemList getSatisfies (void) const;
- int satisfyCount (void) const;
-
- int foreachIncomplete (MarkedPoolItemFn fn, void *data) const;
- PoolItemList getIncompletes (void) const;
- int incompleteCount (void) const;
-
- int foreachImpossible (MarkedPoolItemFn fn, void *data);
-// PoolItemList getImpossibles (void);
-// int impossibleCount (void);
-
- // add to the report log
- void addInfo (ResolverInfo_Ptr info, bool askUser = false); // normal progress info
- void addError (ResolverInfo_Ptr info, bool askUser = false);// error progress info
-
- // iterate over report log
- void foreachInfo (PoolItem_Ref item, int priority, ResolverInfoFn fn, void *data, const bool merge=true, const bool findImportant = true) const;
- ResolverInfoList getInfo (void) const;
-
- // Context compare to identify equal branches
- void collectCompareInfo (int & cmpVersion, // Version compare of ACCUMULATED items
- int & cmpSource, // compare of Sources
- ResolverContext_Ptr compareContext);
-
- int partialCompare (ResolverContext_Ptr context);
- int compare (ResolverContext_Ptr context);
-
- // debug
- void spew (void);
- void spewInfo (void) const;
-
- int getRepoPriority (Repository source) const;
-};
-
-///////////////////////////////////////////////////////////////////
- };// namespace detail
- /////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////////
- };// namespace solver
- ///////////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////////
-};// namespace zypp
-/////////////////////////////////////////////////////////////////////////
-#endif // ZYPP_SOLVER_DETAIL_RESOLVERCONTEXT_H
-
+++ /dev/null
-#/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/* ResolverInfo.h
- *
- * Copyright (C) 2000-2002 Ximian, Inc.
- * Copyright (C) 2005 SUSE Linux Products GmbH
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifndef ZYPP_SOLVER_DETAIL_RESOLVER_INFO_H
-#define ZYPP_SOLVER_DETAIL_RESOLVER_INFO_H
-
-#include "zypp/solver/detail/Types.h"
-
-/////////////////////////////////////////////////////////////////////////
-namespace zypp
-{ ///////////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////////
- namespace solver
- { /////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////////
- namespace detail
- { ///////////////////////////////////////////////////////////////////
-
-typedef enum {
- RESOLVER_INFO_TYPE_INVALID = 0,
- RESOLVER_INFO_TYPE_NEEDED_BY,
- RESOLVER_INFO_TYPE_CONFLICTS_WITH,
- RESOLVER_INFO_TYPE_OBSOLETES,
- RESOLVER_INFO_TYPE_DEPENDS_ON,
- RESOLVER_INFO_TYPE_CHILD_OF,
- RESOLVER_INFO_TYPE_MISSING_REQ,
- // from ResolverContext
- RESOLVER_INFO_TYPE_INVALID_SOLUTION, // Marking this resolution attempt as invalid.
- RESOLVER_INFO_TYPE_UNINSTALLABLE, // Marking p as uninstallable
- RESOLVER_INFO_TYPE_REJECT_INSTALL, // p is scheduled to be installed, but this is not possible because of dependency problems.
- RESOLVER_INFO_TYPE_INSTALL_TO_BE_UNINSTALLED, // Can't install p since it is already marked as needing to be uninstalled
- RESOLVER_INFO_TYPE_INSTALL_UNNEEDED, // Can't install p since it is does not apply to this system.
- RESOLVER_INFO_TYPE_INSTALL_PARALLEL, // Can't install p, since a resolvable of the same name is already marked as needing to be installed.
- RESOLVER_INFO_TYPE_INCOMPLETES, // This would invalidate p
- // from QueueItemEstablish
- RESOLVER_INFO_TYPE_ESTABLISHING, // Establishing p
- // from QueueItemInstall
- RESOLVER_INFO_TYPE_INSTALLING, // Installing p
- RESOLVER_INFO_TYPE_UPDATING, // Updating p
- RESOLVER_INFO_TYPE_SKIPPING, // Skipping p, already installed
- // from QueueItemRequire
- RESOLVER_INFO_TYPE_NO_OTHER_PROVIDER, // There are no alternative installed providers of c [for p]
- RESOLVER_INFO_TYPE_NO_PROVIDER, // There are no installable providers of c [for p]
- RESOLVER_INFO_TYPE_NO_UPGRADE, // Upgrade to q to avoid removing p is not possible.
- RESOLVER_INFO_TYPE_UNINSTALL_PROVIDER, // p provides c but is scheduled to be uninstalled
- RESOLVER_INFO_TYPE_KEEP_PROVIDER, // p provides c but is scheduled to be kept
- RESOLVER_INFO_TYPE_PARALLEL_PROVIDER, // p provides c but another version is already installed
- RESOLVER_INFO_TYPE_NOT_INSTALLABLE_PROVIDER, // p provides c but is uninstallable
- RESOLVER_INFO_TYPE_LOCKED_PROVIDER, // p provides c but is locked
- RESOLVER_INFO_TYPE_OTHER_ARCH_PROVIDER, // p provides c but has other architecture
- RESOLVER_INFO_TYPE_OTHER_VENDOR_PROVIDER, // p provides c but has other vendor
- RESOLVER_INFO_TYPE_CANT_SATISFY, // Can't satisfy requirement c
- // from QueueItemUninstall
- RESOLVER_INFO_TYPE_UNINSTALL_TO_BE_INSTALLED, // p is to-be-installed, so it won't be unlinked.
- RESOLVER_INFO_TYPE_UNINSTALL_INSTALLED, // p is required by installed, so it won't be unlinked.
- RESOLVER_INFO_TYPE_UNINSTALL_LOCKED, // cant uninstall, its locked
- // from QueueItemConflict
- RESOLVER_INFO_TYPE_CONFLICT_CANT_INSTALL, // to-be-installed p conflicts with q due to c
- RESOLVER_INFO_TYPE_CONFLICT_UNINSTALLABLE // uninstalled p is marked uninstallable it conflicts [with q] due to c
-} ResolverInfoType;
-
-#define RESOLVER_INFO_PRIORITY_USER 500
-#define RESOLVER_INFO_PRIORITY_VERBOSE 100
-#define RESOLVER_INFO_PRIORITY_DEBUGGING 0
-
-typedef void (*ResolverInfoFn) (ResolverInfo_Ptr info, void *data);
-
-typedef std::list <ResolverInfo_Ptr> ResolverInfoList;
-
-///////////////////////////////////////////////////////////////////
-//
-// CLASS NAME : ResolverInfo
-
-class ResolverInfo : public base::ReferenceCounted, private base::NonCopyable {
-
- private:
-
- ResolverInfoType _type;
-
- PoolItem_Ref _affected;
-
- int _priority;
-
- bool _error;
- bool _important;
-
- protected:
-
- ResolverInfo (ResolverInfoType type, PoolItem_Ref affected, int priority);
-
- public:
-
- virtual ~ResolverInfo();
-
- void copy (ResolverInfo_constPtr from);
-
- // ---------------------------------- I/O
-
- static std::string toString (PoolItem_Ref item, bool shortVersion=false);
- static std::string toString (const Capability & capability);
-
- virtual std::ostream & dumpOn( std::ostream & str ) const;
- friend std::ostream& operator<<(std::ostream & str, const ResolverInfo & obj)
- { return obj.dumpOn (str); }
-
- // ---------------------------------- accessors
-
- ResolverInfoType type (void) const { return _type; }
- PoolItem_Ref affected (void) const { return _affected; }
- int priority (void) const { return _priority; }
-
- int error (void) const { return _error; }
- void flagAsError (void) { _error = true; }
- int important (void) const { return _important || _error; }
- void flagAsImportant (void) { _important = true; }
-
- // ---------------------------------- methods
-
- virtual std::string message (void) const;
- bool merge (ResolverInfo_Ptr to_be_merged);
- virtual ResolverInfo_Ptr copy (void) const;
-
- bool isAbout (PoolItem_Ref item) const;
-};
-
-///////////////////////////////////////////////////////////////////
- };// namespace detail
- /////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////////
- };// namespace solver
- ///////////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////////
-};// namespace zypp
-/////////////////////////////////////////////////////////////////////////
-#endif // ZYPP_SOLVER_DETAIL_RESOLVER_INFO_H
-
+++ /dev/null
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/* ResolverInfoChildOf.h
- *
- * Copyright (C) 2000-2002 Ximian, Inc.
- * Copyright (C) 2005 SUSE Linux Products GmbH
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifndef ZYPP_SOLVER_DETAIL_RESOLVERINFOCHILDOF_H
-#define ZYPP_SOLVER_DETAIL_RESOLVERINFOCHILDOF_H
-
-#include "zypp/solver/detail/Types.h"
-#include "zypp/solver/detail/ResolverInfoContainer.h"
-
-/////////////////////////////////////////////////////////////////////////
-namespace zypp
-{ ///////////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////////
- namespace solver
- { /////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////////
- namespace detail
- { ///////////////////////////////////////////////////////////////////
-
-//////////////////////////////////////////////////////////////////
-//
-// CLASS NAME : ResolverInfoChildOf
-
-class ResolverInfoChildOf : public ResolverInfoContainer {
-
- private:
-
- public:
-
- ResolverInfoChildOf (PoolItem_Ref item, PoolItem_Ref dependency);
- virtual ~ResolverInfoChildOf();
-
- // ---------------------------------- I/O
-
- virtual std::ostream & dumpOn( std::ostream & str ) const;
- friend std::ostream& operator<<(std::ostream & str, const ResolverInfoChildOf & obj)
- { return obj.dumpOn (str); }
-
- // ---------------------------------- accessors
-
- // ---------------------------------- methods
-
- virtual std::string message (void) const;
- virtual ResolverInfo_Ptr copy (void) const;
-};
-
-///////////////////////////////////////////////////////////////////
- };// namespace detail
- /////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////////
- };// namespace solver
- ///////////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////////
-};// namespace zypp
-/////////////////////////////////////////////////////////////////////////
-#endif // ZYPP_SOLVER_DETAIL_RESOLVERINFOCHILDOF_H
-
+++ /dev/null
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/* ResolverInfoConflictsWith.h
- *
- * Copyright (C) 2000-2002 Ximian, Inc.
- * Copyright (C) 2005 SUSE Linux Products GmbH
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifndef ZYPP_SOLVER_DETAIL_RESOLVERINFOCONFLICTSWITH_H
-#define ZYPP_SOLVER_DETAIL_RESOLVERINFOCONFLICTSWITH_H
-
-#include "zypp/solver/detail/Types.h"
-#include "zypp/solver/detail/ResolverInfoContainer.h"
-#include "zypp/Capability.h"
-
-/////////////////////////////////////////////////////////////////////////
-namespace zypp
-{ ///////////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////////
- namespace solver
- { /////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////////
- namespace detail
- { ///////////////////////////////////////////////////////////////////
-
-///////////////////////////////////////////////////////////////////
-//
-// CLASS NAME : ResolverInfoConflictsWith
-
-class ResolverInfoConflictsWith : public ResolverInfoContainer {
-
- private:
-
- Capability _capability; // capability leading to this info
-
- public:
-
- ResolverInfoConflictsWith (PoolItem_Ref resItem, PoolItem_Ref with,
- const Capability & capability = Capability::noCap);
- virtual ~ResolverInfoConflictsWith();
-
- // ---------------------------------- I/O
-
- virtual std::ostream & dumpOn( std::ostream & str ) const;
- friend std::ostream& operator<<(std::ostream & str, const ResolverInfoConflictsWith & obj)
- { return obj.dumpOn (str); }
-
- // ---------------------------------- accessors
-
- const Capability capability(void) const { return _capability; }
-
- // ---------------------------------- methods
-
- virtual std::string message (void) const;
- virtual ResolverInfo_Ptr copy (void) const;
-};
-
-///////////////////////////////////////////////////////////////////
- };// namespace detail
- /////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////////
- };// namespace solver
- ///////////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////////
-};// namespace zypp
-/////////////////////////////////////////////////////////////////////////
-#endif // ZYPP_SOLVER_DETAIL_RESOLVERINFOCONFLICTSWITH_H
-
+++ /dev/null
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/* ResolverInfoContainer.h
- *
- * Copyright (C) 2000-2002 Ximian, Inc.
- * Copyright (C) 2005 SUSE Linux Products GmbH
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifndef ZYPP_SOLVER_DETAIL_RESOLVERINFOCONTAINER_H
-#define ZYPP_SOLVER_DETAIL_RESOLVERINFOCONTAINER_H
-
-#include "zypp/solver/detail/Types.h"
-#include "zypp/solver/detail/ResolverInfo.h"
-
-/////////////////////////////////////////////////////////////////////////
-namespace zypp
-{ ///////////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////////
- namespace solver
- { /////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////////
- namespace detail
- { ///////////////////////////////////////////////////////////////////
-
-//////////////////////////////////////////////////////////////////
-//
-// CLASS NAME : ResolverInfoContainer
-
-class ResolverInfoContainer : public ResolverInfo {
-
- private:
-
- PoolItemList _item_list;
-
- protected:
-
- ResolverInfoContainer (ResolverInfoType type, PoolItem_Ref initial_item, int priority, PoolItem_Ref child = PoolItem_Ref());
-
- public:
- virtual ~ResolverInfoContainer();
-
- void copy (ResolverInfoContainer_constPtr from);
-
- // ---------------------------------- I/O
-
- virtual std::ostream & dumpOn( std::ostream & str ) const;
- friend std::ostream& operator<<(std::ostream & str, const ResolverInfoContainer & obj)
- { return obj.dumpOn (str); }
-
- // ---------------------------------- accessors
-
- PoolItemList items (void) const { return _item_list; }
-
- // ---------------------------------- methods
-
- virtual bool merge (ResolverInfoContainer_Ptr to_be_merged);
- virtual ResolverInfo_Ptr copy (void) const;
-
- std::string itemsToString (const bool names_only) const;
-
- bool mentions (PoolItem_Ref item) const;
- void addRelatedPoolItem (PoolItem_Ref item);
- void addRelatedPoolItemList (const PoolItemList & items);
-
-};
-
-///////////////////////////////////////////////////////////////////
- };// namespace detail
- /////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////////
- };// namespace solver
- ///////////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////////
-};// namespace zypp
-/////////////////////////////////////////////////////////////////////////
-#endif // ZYPP_SOLVER_DETAIL_RESOLVERINFOCONTAINER_H
+++ /dev/null
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/* ResolverInfoDependsOn.h
- *
- * Copyright (C) 2000-2002 Ximian, Inc.
- * Copyright (C) 2005 SUSE Linux Products GmbH
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifndef ZYPP_SOLVER_DETAIL_RESOLVERINFODEPENDSON_H
-#define ZYPP_SOLVER_DETAIL_RESOLVERINFODEPENDSON_H
-
-#include <string>
-#include "zypp/solver/detail/Types.h"
-#include "zypp/solver/detail/ResolverInfoContainer.h"
-
-/////////////////////////////////////////////////////////////////////////
-namespace zypp
-{ ///////////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////////
- namespace solver
- { /////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////////
- namespace detail
- { ///////////////////////////////////////////////////////////////////
-
-///////////////////////////////////////////////////////////////////
-//
-// CLASS NAME : ResolverInfoDependsOn
-
-class ResolverInfoDependsOn : public ResolverInfoContainer {
-
- private:
-
- public:
-
- ResolverInfoDependsOn (PoolItem_Ref item, PoolItem_Ref on);
- virtual ~ResolverInfoDependsOn();
-
- // ---------------------------------- I/O
-
- virtual std::ostream & dumpOn( std::ostream & str ) const;
- friend std::ostream& operator<<(std::ostream & str, const ResolverInfoDependsOn & obj)
- { return obj.dumpOn (str); }
-
- // ---------------------------------- accessors
-
- // ---------------------------------- methods
-
- virtual std::string message (void) const;
- virtual ResolverInfo_Ptr copy (void) const;
-
-};
-
-///////////////////////////////////////////////////////////////////
- };// namespace detail
- /////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////////
- };// namespace solver
- ///////////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////////
-};// namespace zypp
-/////////////////////////////////////////////////////////////////////////
-
-#endif // ZYPP_SOLVER_DETAIL_RESOLVERINFODEPENDSON_H
-
+++ /dev/null
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/* ResolverInfoMisc.h
- *
- * Copyright (C) 2000-2002 Ximian, Inc.
- * Copyright (C) 2005 SUSE Linux Products GmbH
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifndef ZYPP_SOLVER_DETAIL_RESOLVERINFOMISC_H
-#define ZYPP_SOLVER_DETAIL_RESOLVERINFOMISC_H
-
-#include <string>
-
-#include "zypp/ResPool.h"
-#include "zypp/Capability.h"
-
-
-#include "zypp/solver/detail/Types.h"
-#include "zypp/solver/detail/ResolverInfoContainer.h"
-
-/////////////////////////////////////////////////////////////////////////
-namespace zypp
-{ ///////////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////////
- namespace solver
- { /////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////////
- namespace detail
- { ///////////////////////////////////////////////////////////////////
-
-///////////////////////////////////////////////////////////////////
-//
-// CLASS NAME : ResolverInfoMisc
-
-class ResolverInfoMisc : public ResolverInfoContainer {
- public:
- typedef enum {
- NONE,
- CONFLICT, // conflicts [dep]
- OBSOLETE, // obsoletes [dep]
- REQUIRE // require [dep]
- } TriggerReason;
-
-
-
- private:
-
- Capability _capability; // capability leading to this info
-
- PoolItem_Ref _other_item;
- Capability _other_capability;
-
- std::string _action;
- TriggerReason _trigger;
-
- public:
-
- ResolverInfoMisc (ResolverInfoType detailedtype, PoolItem_Ref affected, int priority, const Capability & capability = Capability::noCap);
- virtual ~ResolverInfoMisc();
-
- // ---------------------------------- I/O
-
- virtual std::ostream & dumpOn( std::ostream & str ) const;
- friend std::ostream& operator<<(std::ostream & str, const ResolverInfoMisc & obj)
- { return obj.dumpOn (str); }
-
- // ---------------------------------- accessors
-
- virtual std::string message (void) const;
- std::string action (void) const { return _action; }
- TriggerReason trigger (void) const { return _trigger; }
-
- PoolItem_Ref other (void) const { return _other_item; }
- const Capability other_capability (void) const { return _other_capability; }
- const Capability capability(void) const { return _capability; }
-
- // ---------------------------------- methods
-
- virtual bool merge ( ResolverInfoContainer_Ptr to_be_merged);
- virtual ResolverInfo_Ptr copy (void) const;
-
- void addAction (const std::string & action_msg);
- void addTrigger (const TriggerReason & trigger);
-
- void setOtherPoolItem (PoolItem_Ref other);
- void setOtherCapability (const Capability & capability);
-};
-
-///////////////////////////////////////////////////////////////////
- };// namespace detail
- /////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////////
- };// namespace solver
- ///////////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////////
-};// namespace zypp
-/////////////////////////////////////////////////////////////////////////
-#endif // ZYPP_SOLVER_DETAIL_RESOLVERINFOMISC_H
-
+++ /dev/null
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/* ResolverInfoMissingReq.h
- *
- * Copyright (C) 2000-2002 Ximian, Inc.
- * Copyright (C) 2005 SUSE Linux Products GmbH
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifndef ZYPP_SOLVER_DETAIL_RESOLVERINFOMISSINGREQ_H
-#define ZYPP_SOLVER_DETAIL_RESOLVERINFOMISSINGREQ_H
-
-#include "zypp/solver/detail/Types.h"
-#include "zypp/solver/detail/ResolverInfo.h"
-#include "zypp/Capability.h"
-
-/////////////////////////////////////////////////////////////////////////
-namespace zypp
-{ ///////////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////////
- namespace solver
- { /////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////////
- namespace detail
- { ///////////////////////////////////////////////////////////////////
-
-///////////////////////////////////////////////////////////////////
-//
-// CLASS NAME : ResolverInfoMissingReq
-
-class ResolverInfoMissingReq : public ResolverInfo {
-
- private:
-
- const Capability _missing;
-
- public:
-
- ResolverInfoMissingReq (PoolItem_Ref item, const Capability & missing);
- virtual ~ResolverInfoMissingReq();
-
- // ---------------------------------- I/O
-
- virtual std::ostream & dumpOn( std::ostream & str ) const;
- friend std::ostream& operator<<(std::ostream & str, const ResolverInfoMissingReq & obj)
- { return obj.dumpOn (str); }
-
- // ---------------------------------- accessors
-
- const Capability capability (void) const { return _missing; }
-
- // ---------------------------------- methods
-
- virtual ResolverInfo_Ptr copy (void) const;
- virtual std::string message (void) const;
-
-};
-
-///////////////////////////////////////////////////////////////////
- };// namespace detail
- /////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////////
- };// namespace solver
- ///////////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////////
-};// namespace zypp
-/////////////////////////////////////////////////////////////////////////
-
-#endif // ZYPP_SOLVER_DETAIL_RESOLVERINFOMISSINGREQ_H
-
+++ /dev/null
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/* ResolverInfoNeededBy.h
- *
- * Copyright (C) 2000-2002 Ximian, Inc.
- * Copyright (C) 2005 SUSE Linux Products GmbH
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifndef ZYPP_SOLVER_DETAIL_RESOLVERINFONEEDEDBY_H
-#define ZYPP_SOLVER_DETAIL_RESOLVERINFONEEDEDBY_H
-
-#include "zypp/solver/detail/Types.h"
-#include "zypp/solver/detail/ResolverInfoContainer.h"
-
-/////////////////////////////////////////////////////////////////////////
-namespace zypp
-{ ///////////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////////
- namespace solver
- { /////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////////
- namespace detail
- { ///////////////////////////////////////////////////////////////////
-
-///////////////////////////////////////////////////////////////////
-//
-// CLASS NAME : ResolverInfoNeededBy
-
-class ResolverInfoNeededBy : public ResolverInfoContainer {
-
-
-
- private:
- Capability _cap;
- Dep _capKind;
- bool _initialInstallation;
-
- public:
-
- ResolverInfoNeededBy (PoolItem_Ref item);
- virtual ~ResolverInfoNeededBy();
-
- // ---------------------------------- I/O
-
- virtual std::ostream & dumpOn( std::ostream & str ) const;
- friend std::ostream& operator<<(std::ostream & str, const ResolverInfoNeededBy & obj)
- { return obj.dumpOn (str); }
-
- // ---------------------------------- accessors
-
- // ---------------------------------- methods
-
- virtual std::string message (void) const;
- virtual ResolverInfo_Ptr copy (void) const;
- void setCapability (const Capability & cap, const Dep & capKind) { _cap = cap; _capKind = capKind; }
- void setInitialInstallation (const bool initial) { _initialInstallation = initial; }
- Dep capKind() const {return _capKind;}
- Capability capability() const {return _cap;};
- bool initialInstallation() const {return _initialInstallation;};
-};
-
- ///////////////////////////////////////////////////////////////////
- };// namespace detail
- /////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////////
- };// namespace solver
- ///////////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////////
-};// namespace zypp
-/////////////////////////////////////////////////////////////////////////
-#endif // ZYPP_SOLVER_DETAIL_RESOLVERINFONEEDEDBY_H
-
+++ /dev/null
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/* ResolverInfoObsoletes.h
- *
- * Copyright (C) 2000-2002 Ximian, Inc.
- * Copyright (C) 2005 SUSE Linux Products GmbH
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifndef ZYPP_SOLVER_DETAIL_RESOLVERINFOOBSOLETES_H
-#define ZYPP_SOLVER_DETAIL_RESOLVERINFOOBSOLETES_H
-
-#include "zypp/solver/detail/Types.h"
-#include "zypp/solver/detail/ResolverInfoContainer.h"
-
-/////////////////////////////////////////////////////////////////////////
-namespace zypp
-{ ///////////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////////
- namespace solver
- { /////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////////
- namespace detail
- { ///////////////////////////////////////////////////////////////////
-
-///////////////////////////////////////////////////////////////////
-//
-// CLASS NAME : ResolverInfoObsoletes
-
-class ResolverInfoObsoletes : public ResolverInfoContainer {
-
- private:
-
- public:
-
- ResolverInfoObsoletes (PoolItem_Ref resItem, PoolItem_Ref obsoletes);
- virtual ~ResolverInfoObsoletes();
-
- // ---------------------------------- I/O
-
- virtual std::ostream & dumpOn( std::ostream & str ) const;
- friend std::ostream& operator<<(std::ostream & str, const ResolverInfoObsoletes & obj)
- { return obj.dumpOn (str); }
-
- // ---------------------------------- accessors
-
- // ---------------------------------- methods
-
- virtual std::string message (void) const;
- virtual ResolverInfo_Ptr copy (void) const;
-};
-///////////////////////////////////////////////////////////////////
- };// namespace detail
- /////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////////
- };// namespace solver
- ///////////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////////
-};// namespace zypp
-/////////////////////////////////////////////////////////////////////////
-#endif // ZYPP_SOLVER_DETAIL_RESOLVERINFOOBSOLETES_H
-
+++ /dev/null
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/* ResolverQueue.h
- *
- * Copyright (C) 2000-2002 Ximian, Inc.
- * Copyright (C) 2005 SUSE Linux Products GmbH
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifndef ZYPP_SOLVER_DETAIL_RESOLVERQUEUE_H
-#define ZYPP_SOLVER_DETAIL_RESOLVERQUEUE_H
-
-#include <iosfwd>
-#include <list>
-#include <map>
-#include <string>
-
-#include "zypp/base/ReferenceCounted.h"
-#include "zypp/base/NonCopyable.h"
-#include "zypp/base/PtrTypes.h"
-
-#include "zypp/solver/detail/Types.h"
-#include "zypp/solver/detail/QueueItem.h"
-
-#include "zypp/Capability.h"
-
-/////////////////////////////////////////////////////////////////////////
-namespace zypp
-{ ///////////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////////
- namespace solver
- { /////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////////
- namespace detail
- { ///////////////////////////////////////////////////////////////////
-
-typedef std::list <ResolverQueue_Ptr> ResolverQueueList;
-
-///////////////////////////////////////////////////////////////////
-//
-// CLASS NAME : ResolverQueue
-
-class ResolverQueue : public base::ReferenceCounted, private base::NonCopyable {
-
- private:
-
- ResolverContext_Ptr _context;
- QueueItemList _qitems;
-
- ResolverQueue_Ptr copy_queue_except_for_branch (QueueItem_Ptr branch_qitem, QueueItem_Ptr subqitem) const;
-
- public:
- ResolverQueue (const ResPool & pool, const Arch & arch, ResolverContext_Ptr context = NULL);
- virtual ~ResolverQueue();
-
- // ---------------------------------- I/O
-
- friend std::ostream& operator<<(std::ostream&, const ResolverQueue & context);
-
- // ---------------------------------- accessors
-
- ResolverContext_Ptr context (void) const { return _context; }
- QueueItemList qitems(void) const { return _qitems; }
-
- // ---------------------------------- methods
-
- void addPoolItemToInstall (PoolItem_Ref poolItem);
- void addPoolItemToEstablish (PoolItem_Ref poolItem);
- void addPoolItemToRemove (PoolItem_Ref poolItem, bool remove_only_mode);
- void addPoolItemToVerify (PoolItem_Ref poolItem);
- void addExtraCapability (const Capability & cap);
- void addExtraConflict (const Capability & cap);
- void addItem (QueueItem_Ptr qtem);
-
- bool isEmpty () const { return _qitems.empty(); }
- bool isInvalid ();
- bool containsOnlyBranches ();
-
- bool processOnce ();
- void process ();
-
- void splitFirstBranch (ResolverQueueList & new_queues, ResolverQueueList & deferred_queues);
-
- void spew ();
-
-};
-///////////////////////////////////////////////////////////////////
- };// namespace detail
- /////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////////
- };// namespace solver
- ///////////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////////
-};// namespace zypp
-/////////////////////////////////////////////////////////////////////////
-
-#endif // ZYPP_SOLVER_DETAIL_RESOLVERQUEUE_H
-