renamed resovlable to resItem
authorStefan Schubert <schubi@suse.de>
Wed, 14 Dec 2005 09:47:36 +0000 (09:47 +0000)
committerStefan Schubert <schubi@suse.de>
Wed, 14 Dec 2005 09:47:36 +0000 (09:47 +0000)
69 files changed:
zypp/solver/detail/Channel.h
zypp/solver/detail/Dependency.cc
zypp/solver/detail/Dependency.h
zypp/solver/detail/Makefile.am
zypp/solver/detail/Match.cc
zypp/solver/detail/Match.h
zypp/solver/detail/MultiWorld.cc
zypp/solver/detail/MultiWorld.h
zypp/solver/detail/Package.cc
zypp/solver/detail/Package.h
zypp/solver/detail/QueueItem.h
zypp/solver/detail/QueueItemBranch.h
zypp/solver/detail/QueueItemConflict.cc
zypp/solver/detail/QueueItemConflict.h
zypp/solver/detail/QueueItemGroup.h
zypp/solver/detail/QueueItemInstall.cc
zypp/solver/detail/QueueItemInstall.h
zypp/solver/detail/QueueItemRequire.cc
zypp/solver/detail/QueueItemRequire.h
zypp/solver/detail/QueueItemUninstall.cc
zypp/solver/detail/QueueItemUninstall.h
zypp/solver/detail/ResItem.cc [new file with mode: 0644]
zypp/solver/detail/ResItem.h [new file with mode: 0644]
zypp/solver/detail/ResItemAndDependency.cc [new file with mode: 0644]
zypp/solver/detail/ResItemAndDependency.h [new file with mode: 0644]
zypp/solver/detail/ResItemAndDependencyPtr.h [new file with mode: 0644]
zypp/solver/detail/ResItemPtr.h [new file with mode: 0644]
zypp/solver/detail/Resolvable.cc [deleted file]
zypp/solver/detail/Resolvable.h [deleted file]
zypp/solver/detail/ResolvableAndDependency.cc [deleted file]
zypp/solver/detail/ResolvableAndDependency.h [deleted file]
zypp/solver/detail/ResolvableAndDependencyPtr.h [deleted file]
zypp/solver/detail/ResolvablePtr.h [deleted file]
zypp/solver/detail/Resolver.cc
zypp/solver/detail/Resolver.h
zypp/solver/detail/ResolverContext.cc
zypp/solver/detail/ResolverContext.h
zypp/solver/detail/ResolverInfo.cc
zypp/solver/detail/ResolverInfo.h
zypp/solver/detail/ResolverInfoChildOf.cc
zypp/solver/detail/ResolverInfoChildOf.h
zypp/solver/detail/ResolverInfoConflictsWith.cc
zypp/solver/detail/ResolverInfoConflictsWith.h
zypp/solver/detail/ResolverInfoContainer.cc
zypp/solver/detail/ResolverInfoContainer.h
zypp/solver/detail/ResolverInfoDependsOn.cc
zypp/solver/detail/ResolverInfoDependsOn.h
zypp/solver/detail/ResolverInfoMisc.cc
zypp/solver/detail/ResolverInfoMisc.h
zypp/solver/detail/ResolverInfoMissingReq.cc
zypp/solver/detail/ResolverInfoMissingReq.h
zypp/solver/detail/ResolverInfoNeededBy.cc
zypp/solver/detail/ResolverInfoNeededBy.h
zypp/solver/detail/ResolverInfoObsoletes.cc
zypp/solver/detail/ResolverInfoObsoletes.h
zypp/solver/detail/ResolverQueue.cc
zypp/solver/detail/ResolverQueue.h
zypp/solver/detail/Spec.cc
zypp/solver/detail/Spec.h
zypp/solver/detail/StoreWorld.cc
zypp/solver/detail/StoreWorld.h
zypp/solver/detail/UndumpWorld.cc
zypp/solver/detail/World.cc
zypp/solver/detail/World.h
zypp/solver/detail/XmlParser.cc
zypp/solver/detail/extract.cc
zypp/solver/detail/extract.h
zypp/solver/detail/libzypp_solver.h
zypp/solver/testsuite/deptestomatic_multi.cc

index 41177716b431334529a52b6e6de6dbc143b15c5a..b39968d2747453807e41b0eb1275f01c9ce32987 100644 (file)
@@ -185,7 +185,7 @@ class Channel : public CountedRep {
     bool hasEqualId (const Channel & channel) const;
     bool hasEqualId (constChannelPtr channel) const;
 
-       //RCResolvableSList *rc_channel_get_resolvables (RCChannel *channel);
+       //RCResItemSList *rc_channel_get_resItems (RCChannel *channel);
 
     // Distro target functions
 
index 3fd9d9cf0a0d4efd8c54b2585da8c9e31b127be1..c65d7f868c20131a06bf702545b886b14f559804 100644 (file)
@@ -448,51 +448,51 @@ if (getenv ("SPEW_DEP")) fprintf (stderr, " -> false\n");
 
 #if 0
 xmlNode *
-rc_resolvable_dep_or_slist_to_xml_node (RCResolvableDepSList *dep)
+rc_resItem_dep_or_slist_to_xml_node (RCResItemDepSList *dep)
 {
     xmlNode *or_node;
-    const RCResolvableDepSList *dep_iter;
+    const RCResItemDepSList *dep_iter;
 
     or_node = xmlNewNode (NULL, "or");
 
     dep_iter = dep;
     while (dep_iter) {
-       RCResolvableDep *dep_item = (RCResolvableDep *)(dep_iter->data);
-       xmlAddChild (or_node, rc_resolvable_dep_to_xml_node (dep_item));
+       RCResItemDep *dep_item = (RCResItemDep *)(dep_iter->data);
+       xmlAddChild (or_node, rc_resItem_dep_to_xml_node (dep_item));
        dep_iter = dep_iter->next;
     }
 
     return or_node;
-} /* rc_resolvable_dep_or_slist_to_xml_node */
+} /* rc_resItem_dep_or_slist_to_xml_node */
 
 xmlNode *
-rc_resolvable_dep_to_xml_node (RCResolvableDep *dep_item)
+rc_resItem_dep_to_xml_node (RCResItemDep *dep_item)
 {
-    RCResolvableSpec *spec = (RCResolvableSpec *) dep_item;
+    RCResItemSpec *spec = (RCResItemSpec *) dep_item;
     xmlNode *dep_node;
 
-    if (rc_resolvable_dep_is_or (dep_item)) {
-       RCResolvableDepSList *dep_or_slist;
+    if (rc_resItem_dep_is_or (dep_item)) {
+       RCResItemDepSList *dep_or_slist;
        dep_or_slist = rc_dep_string_to_or_dep_slist
-           (rc_resolvable_spec_get_name (spec));
-       dep_node = rc_resolvable_dep_or_slist_to_xml_node (dep_or_slist);
-       rc_resolvable_dep_slist_free (dep_or_slist);
+           (rc_resItem_spec_get_name (spec));
+       dep_node = rc_resItem_dep_or_slist_to_xml_node (dep_or_slist);
+       rc_resItem_dep_slist_free (dep_or_slist);
        return dep_node;
     }
 
     dep_node = xmlNewNode (NULL, "dep");
 
-    xmlSetProp (dep_node, "name", rc_resolvable_spec_get_name (spec));
+    xmlSetProp (dep_node, "name", rc_resItem_spec_get_name (spec));
 
-    if (rc_resolvable_dep_get_relation (dep_item) != Relation::Any) {
+    if (rc_resItem_dep_get_relation (dep_item) != Relation::Any) {
        xmlSetProp (dep_node, "op",
-                   rc_resolvable_relation_to_string (
-                       rc_resolvable_dep_get_relation (dep_item), false));
+                   rc_resItem_relation_to_string (
+                       rc_resItem_dep_get_relation (dep_item), false));
 
-       if (rc_resolvable_spec_has_epoch (spec)) {
+       if (rc_resItem_spec_has_epoch (spec)) {
            gchar *tmp;
 
-           tmp = g_strdup_printf ("%d", rc_resolvable_spec_get_epoch (spec));
+           tmp = g_strdup_printf ("%d", rc_resItem_spec_get_epoch (spec));
            xmlSetProp (dep_node, "epoch", tmp);
            g_free (tmp);
        }
@@ -507,7 +507,7 @@ rc_resolvable_dep_to_xml_node (RCResolvableDep *dep_item)
     }
 
     return (dep_node);
-} /* rc_resolvable_dep_to_xml_node */
+} /* rc_resItem_dep_to_xml_node */
 
 #endif
 
index ffdb2716efc8be26630a5a417fb5df3f41f7aa77..05931e1c7ed8cc044d84251521f46f197fcc1798 100644 (file)
@@ -142,15 +142,15 @@ class Dependency : public Spec {
          bool or_dep = false,
          bool pre_dep = false);
 
-    Dependency (OrDependencyPtr or_dep);       //RCResolvableDep *rc_dep_or_new_provide (RCDepOr *dor);
+    Dependency (OrDependencyPtr or_dep);       //RCResItemDep *rc_dep_or_new_provide (RCDepOr *dor);
 
-    Dependency (constXmlNodePtr node);         //RCResolvableDep *rc_xml_node_to_resolvable_dep (const xmlNode *node);
+    Dependency (constXmlNodePtr node);         //RCResItemDep *rc_xml_node_to_resItem_dep (const xmlNode *node);
 
     virtual ~Dependency();
 
     // ---------------------------------- I/O
 
-    const xmlNodePtr asXmlNode (void) const;           // xmlNode *rc_resolvable_dep_to_xml_node (RCResolvableDep *dep_item);
+    const xmlNodePtr asXmlNode (void) const;           // xmlNode *rc_resItem_dep_to_xml_node (RCResItemDep *dep_item);
 
     static std::string toString ( const Dependency & dep );
 
@@ -179,7 +179,7 @@ class Dependency : public Spec {
     bool verifyRelation (constDependencyPtr prov) const;
 };
 
-// xmlNode *rc_resolvable_dep_or_slist_to_xml_node (RCResolvableDepSList *dep);
+// xmlNode *rc_resItem_dep_or_slist_to_xml_node (RCResItemDepSList *dep);
 
 ///////////////////////////////////////////////////////////////////
 }; // namespace ZYPP
index b8033a981de54287c9dde66d05e8a95274cef457..c45cf456c8bc5d8e4c6fa7a0e0b5166c3959d93b 100644 (file)
@@ -24,12 +24,12 @@ include_HEADERS = \
        Channel.h                       \
        ChannelPtr.h                    \
        Subscription.h                  \
-       Resolvable.h                    \
-       ResolvablePtr.h                 \
+       ResItem.h                       \
+       ResItemPtr.h                    \
        Dependency.h                    \
        DependencyPtr.h                 \
-       ResolvableAndDependency.h       \
-       ResolvableAndDependencyPtr.h    \
+       ResItemAndDependency.h  \
+       ResItemAndDependencyPtr.h       \
        OrDependency.h                  \
        OrDependencyPtr.h               \
        Package.h                       \
@@ -106,9 +106,9 @@ lib@PACKAGE@_solver_detail_la_SOURCES =                     \
        Spec.cc                                         \
        Channel.cc                                      \
        Subscription.cc                                 \
-       Resolvable.cc                                   \
+       ResItem.cc                                      \
        Dependency.cc                                   \
-       ResolvableAndDependency.cc                      \
+       ResItemAndDependency.cc                 \
        OrDependency.cc                                 \
        XmlNode.cc                                      \
        Importance.cc                                   \
index 65c8e9d1cbe7ccd3bee49ede61a6d54ec81c8997..85232e530dc9ec2cd7d8b06e920de0d1f7f52314 100644 (file)
@@ -130,10 +130,10 @@ Match::equals ( const Match & lock ) const {
 
 
 bool
-Match::test (constResolvablePtr resolvable, WorldPtr world) const
+Match::test (constResItemPtr resItem, WorldPtr world) const
 {
     string name;
-    constChannelPtr channel = resolvable->channel ();
+    constChannelPtr channel = resItem->channel ();
   
     if (channel != NULL && !_channel_id.empty()) {
        if (! channel->hasEqualId (_channel_id)) {
@@ -141,7 +141,7 @@ Match::test (constResolvablePtr resolvable, WorldPtr world) const
        }
     }
 
-    name = resolvable->name ();
+    name = resItem->name ();
 
 // FIXME, implement regexp
 #if 0
@@ -151,10 +151,10 @@ Match::test (constResolvablePtr resolvable, WorldPtr world) const
     }
 #endif
 
-  /* FIXME: Resolvables don't have ResolvableUpdate right now */
+  /* FIXME: ResItems don't have ResItemUpdate right now */
 /*   if (match->importance != RC_IMPORTANCE_INVALID && */
-/*       !rc_resolvable_is_installed (resolvable)) { */
-/*       RCResolvableUpdate *up = rc_resolvable_get_latest_update (pkg); */
+/*       !rc_resItem_is_installed (resItem)) { */
+/*       RCResItemUpdate *up = rc_resItem_get_latest_update (pkg); */
 /*       if (up) { */
 /*               if (match->importance_gteq ? up->importance > match->importance */
 /*                       : up->importance < match->importance) */
@@ -166,7 +166,7 @@ Match::test (constResolvablePtr resolvable, WorldPtr world) const
        DependencyPtr dependency;
        bool check;
 
-       dependency = new Dependency (resolvable->name(), Relation::Equal, Kind::Package, resolvable->channel(), resolvable->edition());
+       dependency = new Dependency (resItem->name(), Relation::Equal, Kind::Package, resItem->channel(), resItem->edition());
        check = _dependency->verifyRelation (dependency);
        return check;
     }
index 53d8b080eff28ca98e5773890f274ff4260cfa0f..1c68bf11f31347133f77a855d66eec2a47d759fa 100644 (file)
@@ -30,7 +30,7 @@
 #include <zypp/solver/detail/MatchPtr.h>
 #include <zypp/solver/detail/Channel.h>
 #include <zypp/solver/detail/Importance.h>
-#include <zypp/solver/detail/Resolvable.h>
+#include <zypp/solver/detail/ResItem.h>
 #include <zypp/solver/detail/WorldPtr.h>
 #include <zypp/solver/detail/XmlNode.h>
 
@@ -104,7 +104,7 @@ class Match : public CountedRep {
     // equality
     bool equals (const Match & match) const;
 
-    bool test (constResolvablePtr resolvable, WorldPtr world) const;
+    bool test (constResItemPtr resItem, WorldPtr world) const;
 };
 
 ///////////////////////////////////////////////////////////////////
index bb4fea968b3eea1caafdc568114f9156eb1872fb..36c5b2ad022edb124970c63494a335da92eb035f 100644 (file)
@@ -43,7 +43,7 @@ class SubWorldInfo {
 
     bool _refreshed_ready;
 
-    unsigned int _changed_resolvables_id;
+    unsigned int _changed_resItems_id;
     unsigned int _changed_channels_id;
     unsigned int _changed_subscriptions_id;
     unsigned int _changed_locks_id;
@@ -105,17 +105,17 @@ operator<<( ostream& os, const SubWorldInfo & subworldinfo)
 
 SubWorldInfo::SubWorldInfo (WorldPtr subworld, MultiWorldPtr multiworld)
     : _subworld (subworld)
-    , _changed_resolvables_id (0)
+    , _changed_resItems_id (0)
     , _changed_channels_id (0)
     , _changed_subscriptions_id (0)
     , _changed_locks_id (0)
 
 {
 #if 0
-    _changed_resolvables_id =
+    _changed_resItems_id =
         g_signal_connect (G_OBJECT (subworld),
-                          "changed_resolvables",
-                          (GCallback) changed_resolvables_cb,
+                          "changed_resItems",
+                          (GCallback) changed_resItems_cb,
                           world);
 
     _changed_channels_id =
@@ -508,14 +508,14 @@ MultiWorld::foreachChannel (ChannelFn fn, void *data) const
 
 
 //---------------------------------------------------------------------------
-// Single resolvable queries
+// Single resItem queries
 
-constResolvablePtr
-MultiWorld::findInstalledResolvable (constResolvablePtr resolvable)
+constResItemPtr
+MultiWorld::findInstalledResItem (constResItemPtr resItem)
 {
-    constResolvablePtr installed;
+    constResItemPtr installed;
     for (SubWorldInfoList::const_iterator iter = _subworlds.begin(); iter != _subworlds.end(); iter++) {
-       installed = (*iter)->subworld()->findInstalledResolvable(resolvable);
+       installed = (*iter)->subworld()->findInstalledResItem(resItem);
        if (installed != NULL)
            return installed;
     }
@@ -523,38 +523,38 @@ MultiWorld::findInstalledResolvable (constResolvablePtr resolvable)
 }
 
 
-constResolvablePtr
-MultiWorld::findResolvable (constChannelPtr channel, const char *name) const
+constResItemPtr
+MultiWorld::findResItem (constChannelPtr channel, const char *name) const
 {
-    constResolvablePtr resolvable;
+    constResItemPtr resItem;
     for (SubWorldInfoList::const_iterator iter = _subworlds.begin(); iter != _subworlds.end(); iter++) {
-       resolvable = (*iter)->subworld()->findResolvable(channel, name);
-       if (resolvable != NULL)
-           return resolvable;
+       resItem = (*iter)->subworld()->findResItem(channel, name);
+       if (resItem != NULL)
+           return resItem;
     }
     return NULL;
 }
 
 
-constResolvablePtr
-MultiWorld::findResolvableWithConstraint (constChannelPtr channel, const char *name, constDependencyPtr constraint, bool is_and) const
+constResItemPtr
+MultiWorld::findResItemWithConstraint (constChannelPtr channel, const char *name, constDependencyPtr constraint, bool is_and) const
 {
-    constResolvablePtr resolvable;
+    constResItemPtr resItem;
     for (SubWorldInfoList::const_iterator iter = _subworlds.begin(); iter != _subworlds.end(); iter++) {
-       resolvable = (*iter)->subworld()->findResolvableWithConstraint(channel, name, constraint, is_and);
-       if (resolvable != NULL)
-           return resolvable;
+       resItem = (*iter)->subworld()->findResItemWithConstraint(channel, name, constraint, is_and);
+       if (resItem != NULL)
+           return resItem;
     }
     return NULL;
 }
 
 
 ChannelPtr
-MultiWorld::guessResolvableChannel (constResolvablePtr resolvable) const
+MultiWorld::guessResItemChannel (constResItemPtr resItem) const
 {
     ChannelPtr channel;
     for (SubWorldInfoList::const_iterator iter = _subworlds.begin(); iter != _subworlds.end(); iter++) {
-       channel = (*iter)->subworld()->guessResolvableChannel(resolvable);
+       channel = (*iter)->subworld()->guessResItemChannel(resItem);
        if (channel != NULL)
            return channel;
     }
@@ -562,22 +562,22 @@ MultiWorld::guessResolvableChannel (constResolvablePtr resolvable) const
 }
 
 //---------------------------------------------------------------------------
-// iterate over resolvables
+// iterate over resItems
 
 int
-MultiWorld::foreachResolvable (ChannelPtr channel, CResolvableFn fn, void *data)
+MultiWorld::foreachResItem (ChannelPtr channel, CResItemFn fn, void *data)
 {
-    return foreachResolvableByName ("", channel, fn, data);
+    return foreachResItemByName ("", channel, fn, data);
 }
 
 
 int
-MultiWorld::foreachResolvableByName (const std::string & name, ChannelPtr channel, CResolvableFn fn, void *data)
+MultiWorld::foreachResItemByName (const std::string & name, ChannelPtr channel, CResItemFn fn, void *data)
 {
     int count = 0;
     for (SubWorldInfoList::const_iterator iter = _subworlds.begin(); iter != _subworlds.end(); iter++) {
        int this_count;
-       this_count = (*iter)->subworld()->foreachResolvableByName(name, channel, fn, data);
+       this_count = (*iter)->subworld()->foreachResItemByName(name, channel, fn, data);
        if (this_count < 0)
            return -1;
        count += this_count;
@@ -587,23 +587,23 @@ MultiWorld::foreachResolvableByName (const std::string & name, ChannelPtr channe
 
 
 int
-MultiWorld::foreachResolvableByMatch (constMatchPtr match, CResolvableFn fn, void *data)
+MultiWorld::foreachResItemByMatch (constMatchPtr match, CResItemFn fn, void *data)
 {
-    fprintf (stderr, "MultiWorld::foreachResolvableByMatch not implemented\n");
+    fprintf (stderr, "MultiWorld::foreachResItemByMatch not implemented\n");
     return 0;
 }
 
 
 //-----------------------------------------------------------------------------
-// iterater over resolvables with dependency
+// iterater over resItems with dependency
 
 int
-MultiWorld::foreachProvidingResolvable (constDependencyPtr dep, ResolvableAndSpecFn fn, void *data)
+MultiWorld::foreachProvidingResItem (constDependencyPtr dep, ResItemAndSpecFn fn, void *data)
 {
     int count = 0;
     for (SubWorldInfoList::const_iterator iter = _subworlds.begin(); iter != _subworlds.end(); iter++) {
        int this_count;
-       this_count = (*iter)->subworld()->foreachProvidingResolvable (dep, fn, data);
+       this_count = (*iter)->subworld()->foreachProvidingResItem (dep, fn, data);
        if (this_count < 0)
            return -1;
        count += this_count;
@@ -612,12 +612,12 @@ MultiWorld::foreachProvidingResolvable (constDependencyPtr dep, ResolvableAndSpe
 }
 
 int
-MultiWorld::foreachRequiringResolvable (constDependencyPtr dep, ResolvableAndDepFn fn, void *data)
+MultiWorld::foreachRequiringResItem (constDependencyPtr dep, ResItemAndDepFn fn, void *data)
 {
     int count = 0;
     for (SubWorldInfoList::const_iterator iter = _subworlds.begin(); iter != _subworlds.end(); iter++) {
        int this_count;
-       this_count = (*iter)->subworld()->foreachRequiringResolvable (dep, fn, data);
+       this_count = (*iter)->subworld()->foreachRequiringResItem (dep, fn, data);
        if (this_count < 0)
            return -1;
        count += this_count;
@@ -626,12 +626,12 @@ MultiWorld::foreachRequiringResolvable (constDependencyPtr dep, ResolvableAndDep
 }
 
 int
-MultiWorld::foreachConflictingResolvable (constDependencyPtr dep, ResolvableAndDepFn fn, void *data)
+MultiWorld::foreachConflictingResItem (constDependencyPtr dep, ResItemAndDepFn fn, void *data)
 {
     int count = 0;
     for (SubWorldInfoList::const_iterator iter = _subworlds.begin(); iter != _subworlds.end(); iter++) {
        int this_count;
-       this_count = (*iter)->subworld()->foreachConflictingResolvable (dep, fn, data);
+       this_count = (*iter)->subworld()->foreachConflictingResItem (dep, fn, data);
        if (this_count < 0)
            return -1;
        count += this_count;
@@ -641,7 +641,7 @@ MultiWorld::foreachConflictingResolvable (constDependencyPtr dep, ResolvableAndD
 
 
 //-----------------------------------------------------------------------------
-// iterater over resolvables with locks
+// iterater over resItems with locks
 
 int
 MultiWorld::foreachLock (MatchFn fn, void *data) const
index 353879237d767568d38bab567e693b7c02a361d7..28da764971c321d650f84881cc8d5ac3029ba944 100644 (file)
@@ -86,7 +86,7 @@ class MultiWorld : public World {
     virtual ChannelPtr getChannelByName (const char *channel_name) const;
     virtual ChannelPtr getChannelByAlias (const char *alias) const;
     virtual ChannelPtr getChannelById (const char *channel_id) const;
-    virtual ChannelPtr guessResolvableChannel (constResolvablePtr resolvable) const;
+    virtual ChannelPtr guessResItemChannel (constResItemPtr resItem) const;
     virtual int foreachChannel (ChannelFn fn, void *data) const;
 
     int foreachSubworld (WorldFn callback, void *user_data);
@@ -96,23 +96,23 @@ class MultiWorld : public World {
     ServiceWorldPtr lookupServiceById (const char *id);
     bool mountService (const char *url, void *error);                  // GError **error);
 
-    // Single resolvable queries
+    // Single resItem queries
 
-    virtual constResolvablePtr findInstalledResolvable (constResolvablePtr resolvable);
-    virtual constResolvablePtr findResolvable (constChannelPtr channel, const char *name) const;
-    virtual constResolvablePtr findResolvableWithConstraint (constChannelPtr channel, const char *name, constDependencyPtr constraint, bool is_and) const;
+    virtual constResItemPtr findInstalledResItem (constResItemPtr resItem);
+    virtual constResItemPtr findResItem (constChannelPtr channel, const char *name) const;
+    virtual constResItemPtr findResItemWithConstraint (constChannelPtr channel, const char *name, constDependencyPtr constraint, bool is_and) const;
 
-    // Iterate over resolvables
+    // Iterate over resItems
 
-    virtual int foreachResolvable (ChannelPtr channel, CResolvableFn fn, void *data);
-    virtual int foreachResolvableByName (const std::string & name, ChannelPtr channel, CResolvableFn fn, void *data);
-    virtual int foreachResolvableByMatch (constMatchPtr match, CResolvableFn fn, void *data);
+    virtual int foreachResItem (ChannelPtr channel, CResItemFn fn, void *data);
+    virtual int foreachResItemByName (const std::string & name, ChannelPtr channel, CResItemFn fn, void *data);
+    virtual int foreachResItemByMatch (constMatchPtr match, CResItemFn fn, void *data);
 
     // Iterate across provides or requirement
 
-    virtual int foreachProvidingResolvable (constDependencyPtr dep, ResolvableAndSpecFn fn, void *data);
-    virtual int foreachRequiringResolvable (constDependencyPtr dep, ResolvableAndDepFn fn, void *data);
-    virtual int foreachConflictingResolvable (constDependencyPtr dep, ResolvableAndDepFn fn, void *data);
+    virtual int foreachProvidingResItem (constDependencyPtr dep, ResItemAndSpecFn fn, void *data);
+    virtual int foreachRequiringResItem (constDependencyPtr dep, ResItemAndDepFn fn, void *data);
+    virtual int foreachConflictingResItem (constDependencyPtr dep, ResItemAndDepFn fn, void *data);
 
     // locks
 
index c7014811a43d678617b860e0e269fe95f8782f44..023a28bd7de634956e65ab0f96cb78c9f4e9312a 100644 (file)
@@ -207,7 +207,7 @@ string
 Package::toString ( const Package & package, bool full )
 {
     string ret;
-    ret += Resolvable::toString(package, full);
+    ret += ResItem::toString(package, full);
     if (full) {
 //     if (package._section != NULL) ret += (string ("<section '") + package._section->asString() + "'/>");
 //     if (!package._pretty_name.empty()) ret += (string ("<pretty_name '") + package._pretty_name + "'/>");
@@ -236,7 +236,7 @@ operator<<( ostream& os, const Package& package)
 //---------------------------------------------------------------------------
 
 Package::Package (constChannelPtr channel)
-    : Resolvable (Kind::Package, "")
+    : ResItem (Kind::Package, "")
     , _section (NULL)
     , _pretty_name ("")
     , _summary ("")
@@ -252,7 +252,7 @@ Package::Package (constChannelPtr channel)
 
 
 Package::Package (constXmlNodePtr node, constChannelPtr channel)
-    : Resolvable (Kind::Package, "")
+    : ResItem (Kind::Package, "")
     , _section (NULL)
     , _pretty_name ("")
     , _summary ("")
@@ -478,7 +478,7 @@ Package::getLatestUpdate (void) const
 
     for (PackageUpdateList::const_iterator l = _history.begin(); l != _history.end(); l++) {
        PackageUpdatePtr update = *l;
-       constResolvablePtr installed;
+       constResItemPtr installed;
        
        if (!update->equals (latest)) {
            return NULL;
@@ -490,7 +490,7 @@ Package::getLatestUpdate (void) const
        }
 
        /* see if the required parent for this patch is installed */
-       installed = world->findInstalledResolvable (update->parent());
+       installed = world->findInstalledResItem (update->parent());
 
        if (installed != NULL &&
            installed->equals(update->parent()))
@@ -509,19 +509,19 @@ rc_package_to_xml_node (RCPackage *package)
     xmlNode *package_node;
     xmlNode *tmp_node;
     xmlNode *deps_node;
-    RCResolvable *r;
-    RCResolvableSpec *spec;
+    RCResItem *r;
+    RCResItemSpec *spec;
     RCPackageUpdateSList *history_iter;
     int i;
     char buffer[128];
     char *tmp_str;
 
     r = RC_RESOLVABLE (package);
-    spec = rc_resolvable_get_spec (r);
+    spec = rc_resItem_get_spec (r);
 
     package_node = xmlNewNode (NULL, "package");
 
-    xmlNewTextChild (package_node, NULL, "name", rc_resolvable_get_name (r));
+    xmlNewTextChild (package_node, NULL, "name", rc_resItem_get_name (r));
 
     if (spec->has_epoch) {
        g_snprintf (buffer, 128, "%d", spec->epoch);
@@ -548,10 +548,10 @@ rc_package_to_xml_node (RCPackage *package)
     xmlNewTextChild (package_node, NULL, "section",
                     rc_package_section_to_string (package->section));
 
-    g_snprintf (buffer, 128, "%u", rc_resolvable_get_file_size (r));
+    g_snprintf (buffer, 128, "%u", rc_resItem_get_file_size (r));
     xmlNewTextChild (package_node, NULL, "filesize", buffer);
 
-    g_snprintf (buffer, 128, "%u", rc_resolvable_get_installed_size (r));
+    g_snprintf (buffer, 128, "%u", rc_resItem_get_installed_size (r));
     xmlNewTextChild (package_node, NULL, "installedsize", buffer);
 
     if (package->install_only) {
@@ -577,54 +577,54 @@ rc_package_to_xml_node (RCPackage *package)
     if (r->requires_a) {
        tmp_node = xmlNewChild (deps_node, NULL, "requires", NULL);
        for (i = 0; i < r->requires_a->len; i++) {
-           RCResolvableDep *dep = r->requires_a->data[i];
+           RCResItemDep *dep = r->requires_a->data[i];
 
-           xmlAddChild (tmp_node, rc_resolvable_dep_to_xml_node (dep));
+           xmlAddChild (tmp_node, rc_resItem_dep_to_xml_node (dep));
        }
     }
 
     if (r->recommends_a) {
        tmp_node = xmlNewChild (deps_node, NULL, "recommends", NULL);
        for (i = 0; i < r->recommends_a->len; i++) {
-           RCResolvableDep *dep = r->recommends_a->data[i];
+           RCResItemDep *dep = r->recommends_a->data[i];
 
-           xmlAddChild (tmp_node, rc_resolvable_dep_to_xml_node (dep));
+           xmlAddChild (tmp_node, rc_resItem_dep_to_xml_node (dep));
        }
     }
 
     if (r->suggests_a) {
        tmp_node = xmlNewChild (deps_node, NULL, "suggests", NULL);
        for (i = 0; i < r->suggests_a->len; i++) {
-           RCResolvableDep *dep = r->suggests_a->data[i];
+           RCResItemDep *dep = r->suggests_a->data[i];
 
-           xmlAddChild (tmp_node, rc_resolvable_dep_to_xml_node (dep));
+           xmlAddChild (tmp_node, rc_resItem_dep_to_xml_node (dep));
        }
     }
 
     if (r->conflicts_a) {
        tmp_node = xmlNewChild (deps_node, NULL, "conflicts", NULL);
        for (i = 0; i < r->conflicts_a->len; i++) {
-           RCResolvableDep *dep = r->conflicts_a->data[i];
+           RCResItemDep *dep = r->conflicts_a->data[i];
 
-           xmlAddChild (tmp_node, rc_resolvable_dep_to_xml_node (dep));
+           xmlAddChild (tmp_node, rc_resItem_dep_to_xml_node (dep));
        }
     }
 
     if (r->obsoletes_a) {
        tmp_node = xmlNewChild (deps_node, NULL, "obsoletes", NULL);
        for (i = 0; i < r->obsoletes_a->len; i++) {
-           RCResolvableDep *dep = r->obsoletes_a->data[i];
+           RCResItemDep *dep = r->obsoletes_a->data[i];
 
-           xmlAddChild (tmp_node, rc_resolvable_dep_to_xml_node (dep));
+           xmlAddChild (tmp_node, rc_resItem_dep_to_xml_node (dep));
        }
     }
 
     if (r->provides_a) {
        tmp_node = xmlNewChild (deps_node, NULL, "provides", NULL);
        for (i = 0; i < r->provides_a->len; i++) {
-           RCResolvableDep *dep = r->provides_a->data[i];
+           RCResItemDep *dep = r->provides_a->data[i];
 
-           xmlAddChild (tmp_node, rc_resolvable_dep_to_xml_node (dep));
+           xmlAddChild (tmp_node, rc_resItem_dep_to_xml_node (dep));
        }
     }
 
index 206e3c79568a94a44c9bf236fa22e7e4e92f92c9..8404948785b61205b5f6794ba4b530ad7e835575 100644 (file)
@@ -30,7 +30,7 @@
 #include <zypp/solver/detail/PackagePtr.h>
 #include <zypp/solver/detail/PackageUpdatePtr.h>
 #include <zypp/solver/detail/Section.h>
-#include <zypp/solver/detail/Resolvable.h>
+#include <zypp/solver/detail/ResItem.h>
 #include <zypp/solver/detail/XmlNode.h>
 
 ///////////////////////////////////////////////////////////////////
@@ -51,7 +51,7 @@ typedef PackageUpdateList * PackageUpdateListPtr;
  *
  **/
 
-class Package : public Resolvable {
+class Package : public ResItem {
     REP_BODY(Package);
 
   private:
index eed828dd52a2ef1452b7f4fe09c3dd055bf91a9a..41186be2da35f601db3406f6efa0b420014bb6d3 100644 (file)
@@ -29,7 +29,7 @@
 #include <zypp/solver/detail/QueueItemPtr.h>
 #include <zypp/solver/detail/ResolverContextPtr.h>
 #include <zypp/solver/detail/ResolverInfo.h>
-#include <zypp/solver/detail/Resolvable.h>
+#include <zypp/solver/detail/ResItem.h>
 #include <zypp/solver/detail/Dependency.h>
 #include <zypp/solver/detail/Channel.h>
 
index a3af3349e8e88fc1fff6b3cc65dd881bd7753799..ce7fe1904e02f7214dc51c5b5c9d3f2d89ba6f40 100644 (file)
@@ -27,7 +27,7 @@
 #include <string.h>
 
 #include <zypp/solver/detail/QueueItemBranchPtr.h>
-#include <zypp/solver/detail/Resolvable.h>
+#include <zypp/solver/detail/ResItem.h>
 #include <zypp/solver/detail/Dependency.h>
 #include <zypp/solver/detail/Channel.h>
 
index 1cae4df1222445dba2776b32e2439edf3225accc..32dc3c4636726fa12c3becd236d618c9c450bdc6 100644 (file)
@@ -56,7 +56,7 @@ QueueItemConflict::toString ( const QueueItemConflict & item)
     string res = "[Conflict: ";
     res += item._dep->asString();
     res += ", Triggered by ";
-    res += item._conflicting_resolvable->asString();
+    res += item._conflicting_resItem->asString();
     if (item._actually_an_obsolete) res += ", Obsolete !";
     res += "]";
     return res;
@@ -79,10 +79,10 @@ operator<<( ostream& os, const QueueItemConflict & item)
 
 //---------------------------------------------------------------------------
 
-QueueItemConflict::QueueItemConflict (WorldPtr world, constDependencyPtr dep, constResolvablePtr resolvable)
+QueueItemConflict::QueueItemConflict (WorldPtr world, constDependencyPtr dep, constResItemPtr resItem)
     : QueueItem (QUEUE_ITEM_TYPE_CONFLICT, world)
     , _dep (dep)
-    , _conflicting_resolvable (resolvable)
+    , _conflicting_resItem (resItem)
     , _actually_an_obsolete (false)
 {
 }
@@ -96,25 +96,25 @@ QueueItemConflict::~QueueItemConflict()
 
 #if PHI
 
-// on conflict, try to find upgrade candidates for the installed resolvable triggering the conflict
+// on conflict, try to find upgrade candidates for the installed resItem triggering the conflict
 // there are cases where upgrading prevents the conflict
-// rc tends to uninstall the resolvable
-// phi tends to upgrade the resolvable
+// rc tends to uninstall the resItem
+// phi tends to upgrade the resItem
 // testcases: exercise-02conflict-08-test.xml, exercise-02conflict-09-test.xml
 
 typedef struct {
     ResolverContextPtr context;
-    CResolvableList upgrades;
+    CResItemList upgrades;
 } UpgradeCandidateInfo;
 
 
 static bool
-upgrade_candidates_cb (constResolvablePtr resolvable, constSpecPtr spec, void *data)
+upgrade_candidates_cb (constResItemPtr resItem, constSpecPtr spec, void *data)
 {
-//fprintf (stderr, "upgrade_candidates_cb(%s,%s)\n", resolvable->asString().c_str(), spec->asString().c_str());
+//fprintf (stderr, "upgrade_candidates_cb(%s,%s)\n", resItem->asString().c_str(), spec->asString().c_str());
     UpgradeCandidateInfo *info = (UpgradeCandidateInfo *)data;
-    if (info->context->getStatus (resolvable) == RESOLVABLE_STATUS_UNINSTALLED) {
-       info->upgrades.push_back (resolvable);
+    if (info->context->getStatus (resItem) == RESOLVABLE_STATUS_UNINSTALLED) {
+       info->upgrades.push_back (resItem);
     }
     return true;
 }
@@ -124,7 +124,7 @@ upgrade_candidates_cb (constResolvablePtr resolvable, constSpecPtr spec, void *d
 
 typedef struct {
     WorldPtr world;
-    constResolvablePtr conflicting_resolvable;
+    constResItemPtr conflicting_resItem;
     constDependencyPtr dep;
     ResolverContextPtr context;
     QueueItemList & new_items;
@@ -137,44 +137,44 @@ typedef struct {
 
 
 static bool
-conflict_process_cb (constResolvablePtr resolvable, constSpecPtr spec, void *data)
+conflict_process_cb (constResItemPtr resItem, constSpecPtr spec, void *data)
 {
     ConflictProcessInfo *info = (ConflictProcessInfo *)data;
-    ResolvableStatus status;
+    ResItemStatus status;
     string pkg_str, spec_str, msg;
     ResolverInfoPtr log_info;
 
-    if (getenv ("RC_SPEW")) fprintf (stderr, "conflict_process_cb (resolvable[%s], spec[%s], info [%s]\n", resolvable->asString().c_str(), spec->asString().c_str(), info->conflicting_resolvable->asString().c_str());
-    if (getenv ("RC_SPEW")) fprintf (stderr, "conflict_process_cb (resolvable equals spec: %s, info->dep [%s]\n", resolvable->equals(spec) ? "YES" : "NO", info->dep->asString().c_str());
+    if (getenv ("RC_SPEW")) fprintf (stderr, "conflict_process_cb (resItem[%s], spec[%s], info [%s]\n", resItem->asString().c_str(), spec->asString().c_str(), info->conflicting_resItem->asString().c_str());
+    if (getenv ("RC_SPEW")) fprintf (stderr, "conflict_process_cb (resItem equals spec: %s, info->dep [%s]\n", resItem->equals(spec) ? "YES" : "NO", info->dep->asString().c_str());
 
     /* We conflict with ourself.  For the purpose of installing ourself, we
      * just ignore it, but it's Debian's way of saying that one and only one
-     * resolvable with this provide may exist on the system at a time. */
+     * resItem with this provide may exist on the system at a time. */
 
-    if (info->conflicting_resolvable
-       && resolvable->equals (info->conflicting_resolvable)) {
+    if (info->conflicting_resItem
+       && resItem->equals (info->conflicting_resItem)) {
        return true;
     }
 
     /* FIXME: This should probably be a GVersion capability. */
-    /* Obsoletes don't apply to virtual provides, only the resolvables
+    /* Obsoletes don't apply to virtual provides, only the resItems
      * themselves.  A provide is "virtual" if it's not the same spec
-     * as the resolvable that's providing it.  This, of course, only
+     * as the resItem that's providing it.  This, of course, only
      * applies to RPM, since it's the only one with obsoletes right
      * now. */
 
     if (info->actually_an_obsolete
-       && !(resolvable->equals(spec)))
+       && !(resItem->equals(spec)))
     {
        return true;
     }
 
-    pkg_str = resolvable->asString();
+    pkg_str = resItem->asString();
     spec_str = spec->asString();
 
-    status = info->context->getStatus (resolvable);
+    status = info->context->getStatus (resItem);
 
-    if (getenv ("RC_SPEW")) fprintf (stderr, "conflict_process_cb (resolvable[%s]<%s>\n", resolvable->asString().c_str(), ResolverContext::toString(status).c_str());
+    if (getenv ("RC_SPEW")) fprintf (stderr, "conflict_process_cb (resItem[%s]<%s>\n", resItem->asString().c_str(), ResolverContext::toString(status).c_str());
 
     switch (status) {
        
@@ -185,27 +185,27 @@ conflict_process_cb (constResolvablePtr resolvable, constSpecPtr spec, void *dat
 
 #if PHI
        // maybe an upgrade can resolve the conflict ?
-       //        check if other resolvable is available which upgrades
+       //        check if other resItem is available which upgrades
 
        // find non-installed packages which provide the conflicting name
 
        UpgradeCandidateInfo upgrade_info;
        upgrade_info.context = info->context;
 
-       DependencyPtr maybe_upgrade_dep = new Dependency (resolvable->name(), Relation::Any, Kind::Package, new Channel (CHANNEL_TYPE_NONSYSTEM), -1);
-       info->world->foreachProvidingResolvable (maybe_upgrade_dep, upgrade_candidates_cb, (void *)&upgrade_info);
+       DependencyPtr maybe_upgrade_dep = new Dependency (resItem->name(), Relation::Any, Kind::Package, new Channel (CHANNEL_TYPE_NONSYSTEM), -1);
+       info->world->foreachProvidingResItem (maybe_upgrade_dep, upgrade_candidates_cb, (void *)&upgrade_info);
 
 #endif
 
-       uninstall = new QueueItemUninstall (info->world, resolvable, "conflict");
+       uninstall = new QueueItemUninstall (info->world, resItem, "conflict");
        uninstall->setDependency (info->dep);
 
        if (info->actually_an_obsolete) {
            uninstall->setDueToObsolete ();
-           log_info = new ResolverInfoObsoletes (resolvable, info->conflicting_resolvable);
+           log_info = new ResolverInfoObsoletes (resItem, info->conflicting_resItem);
        } else {
            uninstall->setDueToConflict ();
-           log_info = new ResolverInfoConflictsWith (resolvable, info->conflicting_resolvable);
+           log_info = new ResolverInfoConflictsWith (resItem, info->conflicting_resItem);
        }
 
        uninstall->addInfo (log_info);
@@ -219,16 +219,16 @@ conflict_process_cb (constResolvablePtr resolvable, constSpecPtr spec, void *dat
 #if PHI
        }
        else {
-           // there are upgrade candidates for the conflicting resolvable
-           // branch to: 1. uninstall, 2. upgrade (for each upgrading resolvable)
+           // there are upgrade candidates for the conflicting resItem
+           // branch to: 1. uninstall, 2. upgrade (for each upgrading resItem)
 
            QueueItemBranchPtr branch = new QueueItemBranch (info->world);
 
            branch->addItem (uninstall);                        // try uninstall
 
-           for (CResolvableList::const_iterator iter = upgrade_info.upgrades.begin(); iter != upgrade_info.upgrades.end(); iter++) {
+           for (CResItemList::const_iterator iter = upgrade_info.upgrades.begin(); iter != upgrade_info.upgrades.end(); iter++) {
                QueueItemInstallPtr upgrade = new QueueItemInstall (info->world, *iter);
-               upgrade->setUpgrades (resolvable);
+               upgrade->setUpgrades (resItem);
                branch->addItem (upgrade);                      // try upgrade
            }
            info->new_items.push_back (branch);
@@ -239,13 +239,13 @@ conflict_process_cb (constResolvablePtr resolvable, constSpecPtr spec, void *dat
     }
 
     case RESOLVABLE_STATUS_TO_BE_INSTALLED: {
-       msg = string ("A conflict over ") + info->dep_str + " (" + spec_str + ") requires the removal of the to-be-installed resolvable " + pkg_str;
+       msg = string ("A conflict over ") + info->dep_str + " (" + spec_str + ") requires the removal of the to-be-installed resItem " + pkg_str;
 
-       ResolverInfoMiscPtr misc_info = new ResolverInfoMisc (resolvable,RESOLVER_INFO_PRIORITY_VERBOSE, msg);
+       ResolverInfoMiscPtr misc_info = new ResolverInfoMisc (resItem,RESOLVER_INFO_PRIORITY_VERBOSE, msg);
 
        misc_info->flagAsError ();
-       if (info->conflicting_resolvable) {
-           misc_info->addRelatedResolvable (info->conflicting_resolvable);
+       if (info->conflicting_resItem) {
+           misc_info->addRelatedResItem (info->conflicting_resItem);
        }
        info->context->addInfo (misc_info);
 
@@ -253,7 +253,7 @@ conflict_process_cb (constResolvablePtr resolvable, constSpecPtr spec, void *dat
     }
 
     case RESOLVABLE_STATUS_UNINSTALLED: {
-       info->context->setStatus (resolvable, RESOLVABLE_STATUS_TO_BE_UNINSTALLED);
+       info->context->setStatus (resItem, RESOLVABLE_STATUS_TO_BE_UNINSTALLED);
        msg = string ("Marking ") + pkg_str + " as uninstallable due to conflicts over " + info->dep_str + " (" + spec_str + ")";
        if (!(info->pkg_str.empty())) {
            msg += " from ";
@@ -262,9 +262,9 @@ conflict_process_cb (constResolvablePtr resolvable, constSpecPtr spec, void *dat
 
        ResolverInfoMiscPtr misc_info = new ResolverInfoMisc (NULL, RESOLVER_INFO_PRIORITY_VERBOSE, msg);
 
-       misc_info->addRelatedResolvable (resolvable);
-       if (info->conflicting_resolvable) {
-           misc_info->addRelatedResolvable(info->conflicting_resolvable);
+       misc_info->addRelatedResItem (resItem);
+       if (info->conflicting_resItem) {
+           misc_info->addRelatedResItem(info->conflicting_resItem);
        }
        info->context->addInfo (misc_info);
 
@@ -289,15 +289,15 @@ QueueItemConflict::process (ResolverContextPtr context, QueueItemList & new_item
 {
     if (getenv ("RC_SPEW")) fprintf (stderr, "QueueItemConflict::process(%s)\n", this->asString().c_str());
 
-    ConflictProcessInfo info = { world(), _conflicting_resolvable, _dep, context, new_items, "", "", _actually_an_obsolete };
+    ConflictProcessInfo info = { world(), _conflicting_resItem, _dep, context, new_items, "", "", _actually_an_obsolete };
 
-    if (_conflicting_resolvable) {
-       info.pkg_str = _conflicting_resolvable->asString();
+    if (_conflicting_resItem) {
+       info.pkg_str = _conflicting_resItem->asString();
     }
 
     info.dep_str = _dep->relation().asString() + " " + ((constSpecPtr)_dep)->asString();
 
-    world()->foreachProvidingResolvable (_dep, conflict_process_cb, (void *)&info);
+    world()->foreachProvidingResItem (_dep, conflict_process_cb, (void *)&info);
                                        
 // FIXME: free self
 
@@ -310,7 +310,7 @@ QueueItemConflict::process (ResolverContextPtr context, QueueItemList & new_item
 QueueItemPtr
 QueueItemConflict::copy (void) const
 {
-    QueueItemConflictPtr new_conflict = new QueueItemConflict (world(), _dep, _conflicting_resolvable);
+    QueueItemConflictPtr new_conflict = new QueueItemConflict (world(), _dep, _conflicting_resItem);
     ((QueueItemPtr)new_conflict)->copy((constQueueItemPtr)this);
 
     // _actually_an_obsolete is not being copied !
index 095f1d8b7f9b8b69b7047a34065e1ae219ed2c94..0774a5eafbd991bbbecbf73bf5b5f0700069c477 100644 (file)
@@ -27,7 +27,7 @@
 #include <string.h>
 
 #include <zypp/solver/detail/QueueItemConflictPtr.h>
-#include <zypp/solver/detail/Resolvable.h>
+#include <zypp/solver/detail/ResItem.h>
 #include <zypp/solver/detail/Dependency.h>
 #include <zypp/solver/detail/Channel.h>
 
@@ -47,13 +47,13 @@ class QueueItemConflict : public QueueItem {
 
   private:
     constDependencyPtr _dep;
-    constResolvablePtr _conflicting_resolvable;
+    constResItemPtr _conflicting_resItem;
 
     bool _actually_an_obsolete;
 
   public:
 
-    QueueItemConflict (WorldPtr world, constDependencyPtr dep, constResolvablePtr resolvable);
+    QueueItemConflict (WorldPtr world, constDependencyPtr dep, constResItemPtr resItem);
     virtual ~QueueItemConflict();
 
     // ---------------------------------- I/O
index 8896a09ec0c2748c9c510ecf4739f91b50678b29..af2f811a258292b87a92f47216f3e91c0d6452c4 100644 (file)
@@ -27,7 +27,7 @@
 #include <string.h>
 
 #include <zypp/solver/detail/QueueItemGroupPtr.h>
-#include <zypp/solver/detail/Resolvable.h>
+#include <zypp/solver/detail/ResItem.h>
 #include <zypp/solver/detail/Dependency.h>
 #include <zypp/solver/detail/Channel.h>
 
index 04fc62cd88892db9b3b6f6ab9b37f6efa8464ce7..5e50ed86c8d4649794fc4d5f20f2728b3f6ca44b 100644 (file)
 #include <zypp/solver/detail/ResolverInfoConflictsWith.h>
 #include <zypp/solver/detail/ResolverInfoMisc.h>
 #include <zypp/solver/detail/ResolverInfoNeededBy.h>
-#include <zypp/solver/detail/Resolvable.h>
+#include <zypp/solver/detail/ResItem.h>
 #include <zypp/solver/detail/Version.h>
 #include <zypp/solver/detail/World.h>
-#include <zypp/solver/detail/ResolvableAndDependency.h>
+#include <zypp/solver/detail/ResItemAndDependency.h>
 
 ///////////////////////////////////////////////////////////////////
 namespace ZYPP {
@@ -56,7 +56,7 @@ string
 QueueItemInstall::toString ( const QueueItemInstall & item)
 {
     string ret = "[Install: ";
-    ret += item._resolvable->asString();
+    ret += item._resItem->asString();
     if (item._upgrades != NULL) {
        ret += ", Upgrades ";
        ret += item._upgrades->asString();
@@ -67,7 +67,7 @@ QueueItemInstall::toString ( const QueueItemInstall & item)
     }
     if (!item._needed_by.empty()) {
        ret += ", Needed by ";
-       ret += Resolvable::toString(item._needed_by);
+       ret += ResItem::toString(item._needed_by);
     }
     if (item._explicitly_requested) ret += ", Explicit !";
     ret += "]";
@@ -91,17 +91,17 @@ operator<<( ostream& os, const QueueItemInstall & item)
 
 //---------------------------------------------------------------------------
 
-QueueItemInstall::QueueItemInstall (WorldPtr world, constResolvablePtr resolvable)
+QueueItemInstall::QueueItemInstall (WorldPtr world, constResItemPtr resItem)
     : QueueItem (QUEUE_ITEM_TYPE_INSTALL, world)
-    , _resolvable (resolvable)
+    , _resItem (resItem)
     , _channel_priority (0)
     , _other_penalty (0)
     , _explicitly_requested (false)
 {
-    constResolvablePtr upgrades = world->findInstalledResolvable (resolvable);
-    if (getenv("RC_SPEW")) fprintf (stderr, "QueueItemInstall::QueueItemInstall(%s) upgrades %s\n", resolvable->asString().c_str(), upgrades!=NULL?upgrades->asString().c_str():"nothing");
+    constResItemPtr upgrades = world->findInstalledResItem (resItem);
+    if (getenv("RC_SPEW")) fprintf (stderr, "QueueItemInstall::QueueItemInstall(%s) upgrades %s\n", resItem->asString().c_str(), upgrades!=NULL?upgrades->asString().c_str():"nothing");
     if (upgrades
-       && ! (((constSpecPtr)upgrades)->equals (resolvable))) {
+       && ! (((constSpecPtr)upgrades)->equals (resItem))) {
         setUpgrades(upgrades);
     }
 }
@@ -116,19 +116,19 @@ QueueItemInstall::~QueueItemInstall()
 bool
 QueueItemInstall::isSatisfied (ResolverContextPtr context) const
 {
-    return context->resolvableIsPresent (_resolvable);
+    return context->resItemIsPresent (_resItem);
 }
 
 
 //---------------------------------------------------------------------------
 
-// Handle system resolvable's that conflict with us -> uninstall them
+// Handle system resItem's that conflict with us -> uninstall them
 
 static bool
-build_conflict_list (constResolvablePtr resolvable, constDependencyPtr dep, void *data)
+build_conflict_list (constResItemPtr resItem, constDependencyPtr dep, void *data)
 {
-    CResolvableList *rl = (CResolvableList *)data;
-    rl->push_front (resolvable);
+    CResItemList *rl = (CResItemList *)data;
+    rl->push_front (resItem);
     return true;
 }
 
@@ -137,26 +137,26 @@ QueueItemInstall::process (ResolverContextPtr context, QueueItemList & qil)
 {
     if (getenv ("RC_SPEW")) fprintf (stderr, "QueueItemInstall::process(%s)\n", this->asString().c_str());
 
-    constResolvablePtr resolvable = _resolvable;
-    string pkg_name = resolvable->asString();
+    constResItemPtr resItem = _resItem;
+    string pkg_name = resItem->asString();
     string msg;
-    ResolvableStatus status = context->getStatus (resolvable);
+    ResItemStatus status = context->getStatus (resItem);
 
     CDependencyList deps;
-    CResolvableList conflicts;
+    CResItemList conflicts;
 
-    /* If we are trying to upgrade resolvable A with resolvable B and they both have the
+    /* If we are trying to upgrade resItem A with resItem B and they both have the
        same version number, do nothing.  This shouldn't happen in general with
        red-carpet, but can come up with the installer & autopull. */
 
     if (_upgrades
-       && ((constSpecPtr)_resolvable)->equals (_upgrades)) {
+       && ((constSpecPtr)_resItem)->equals (_upgrades)) {
        ResolverInfoPtr info;
 
-       if (getenv ("RC_SPEW")) fprintf (stderr, "upgrades equal resolvable, skipping\n");
+       if (getenv ("RC_SPEW")) fprintf (stderr, "upgrades equal resItem, skipping\n");
 
        msg = string("Skipping ") + pkg_name + (": already installed");
-       info = new ResolverInfoMisc (_resolvable, RESOLVER_INFO_PRIORITY_VERBOSE, msg);
+       info = new ResolverInfoMisc (_resItem, RESOLVER_INFO_PRIORITY_VERBOSE, msg);
        context->addInfo (info);
        goto finished;
     }
@@ -166,10 +166,10 @@ QueueItemInstall::process (ResolverContextPtr context, QueueItemList & qil)
 
        if (getenv ("RC_SPEW")) fprintf (stderr, "still needed ");
 
-       for (CResolvableList::const_iterator iter = _needed_by.begin(); iter != _needed_by.end() && !still_needed; iter++) {
-           ResolvableStatus status = context->getStatus (*iter);
+       for (CResItemList::const_iterator iter = _needed_by.begin(); iter != _needed_by.end() && !still_needed; iter++) {
+           ResItemStatus status = context->getStatus (*iter);
            if (getenv ("RC_SPEW")) fprintf (stderr, "by: [status: %s] %s\n", ResolverContext::toString(status).c_str(), (*iter)->asString().c_str());
-           if (! resolvable_status_is_to_be_uninstalled (status)) {
+           if (! resItem_status_is_to_be_uninstalled (status)) {
                still_needed = true;
            }
        }
@@ -183,13 +183,13 @@ QueueItemInstall::process (ResolverContextPtr context, QueueItemList & qil)
        needed this. */
 
     if (context->verifying()
-       && resolvable_status_is_to_be_uninstalled (context->getStatus (resolvable))
+       && resItem_status_is_to_be_uninstalled (context->getStatus (resItem))
        && !_needed_by.empty()) {
 
        QueueItemUninstallPtr uninstall_item;
 
-       for (CResolvableList::const_iterator iter = _needed_by.begin(); iter != _needed_by.end(); iter++) {
-           uninstall_item = new QueueItemUninstall (world(), *iter, "uninstallable resolvable");
+       for (CResItemList::const_iterator iter = _needed_by.begin(); iter != _needed_by.end(); iter++) {
+           uninstall_item = new QueueItemUninstall (world(), *iter, "uninstallable resItem");
            qil.push_front (uninstall_item);
        }
        
@@ -198,20 +198,20 @@ QueueItemInstall::process (ResolverContextPtr context, QueueItemList & qil)
 
     if (_upgrades == NULL) {
 
-       if (getenv ("RC_SPEW")) fprintf (stderr, "simple install of %s\n", resolvable->asString(true).c_str());
+       if (getenv ("RC_SPEW")) fprintf (stderr, "simple install of %s\n", resItem->asString(true).c_str());
 
-       context->installResolvable (resolvable, context->verifying(), /* is_soft */ _other_penalty);
+       context->installResItem (resItem, context->verifying(), /* is_soft */ _other_penalty);
 
     } else {
 
        QueueItemUninstallPtr uninstall_item;
 
-       if (getenv ("RC_SPEW")) fprintf (stderr, "upgrade install of %s\n", resolvable->asString().c_str());
+       if (getenv ("RC_SPEW")) fprintf (stderr, "upgrade install of %s\n", resItem->asString().c_str());
 
-       context->upgradeResolvable (resolvable, _upgrades, context->verifying(), /* is_soft */ _other_penalty);
+       context->upgradeResItem (resItem, _upgrades, context->verifying(), /* is_soft */ _other_penalty);
 
        uninstall_item = new QueueItemUninstall (world(), _upgrades, "upgrade");
-       uninstall_item->setUpgradedTo (resolvable);
+       uninstall_item->setUpgradedTo (resItem);
 
        if (_explicitly_requested)
            uninstall_item->setExplicitlyRequested ();
@@ -219,13 +219,13 @@ QueueItemInstall::process (ResolverContextPtr context, QueueItemList & qil)
        qil.push_front (uninstall_item);
     }
 
-    /* Log which resolvable need this install */
+    /* Log which resItem need this install */
 
     if (!_needed_by.empty()) {
        ResolverInfoNeededByPtr info;
 
-       info = new ResolverInfoNeededBy (resolvable);
-       info->addRelatedResolvableList (_needed_by);
+       info = new ResolverInfoNeededBy (resItem);
+       info->addRelatedResItemList (_needed_by);
        context->addInfo (info);
     }
 
@@ -240,71 +240,71 @@ QueueItemInstall::process (ResolverContextPtr context, QueueItemList & qil)
        msg = string ("Installing ") + pkg_name;
     }
 
-    context->addInfoString (resolvable, RESOLVER_INFO_PRIORITY_VERBOSE, msg);
+    context->addInfoString (resItem, RESOLVER_INFO_PRIORITY_VERBOSE, msg);
 
     logInfo (context);
 
-    /* Construct require items for each of the resolvable's requires that is still unsatisfied. */
+    /* Construct require items for each of the resItem's requires that is still unsatisfied. */
 
-    deps = resolvable->requires();
+    deps = resItem->requires();
     for (CDependencyList::const_iterator iter = deps.begin(); iter != deps.end(); iter++) {
        constDependencyPtr dep = *iter;
        if (!context->requirementIsMet (dep, false)) {
            if (getenv("RC_SPEW")) fprintf (stderr, "this requires %s\n", dep->asString().c_str());
            QueueItemRequirePtr req_item = new QueueItemRequire (world(), dep);
-           req_item->addResolvable (resolvable);
+           req_item->addResItem (resItem);
            qil.push_front (req_item);
        }
     }
 
-    /* Construct conflict items for each of the resolvable's conflicts. */
+    /* Construct conflict items for each of the resItem's conflicts. */
 
-    deps = resolvable->conflicts();
+    deps = resItem->conflicts();
     for (CDependencyList::const_iterator iter = deps.begin(); iter != deps.end(); iter++) {
        constDependencyPtr dep = *iter;
        if (getenv("RC_SPEW")) fprintf (stderr, "this conflicts with '%s'\n", dep->asString().c_str());
-       QueueItemConflictPtr conflict_item = new QueueItemConflict (world(), dep, resolvable);
+       QueueItemConflictPtr conflict_item = new QueueItemConflict (world(), dep, resItem);
        qil.push_front (conflict_item);
     }
 
-    /* Construct conflict items for each of the resolvable's obsoletes. */
+    /* Construct conflict items for each of the resItem's obsoletes. */
 
-    deps = resolvable->obsoletes();
+    deps = resItem->obsoletes();
     for (CDependencyList::const_iterator iter = deps.begin(); iter != deps.end(); iter++) {
        constDependencyPtr dep = *iter;
        if (getenv("RC_SPEW")) fprintf (stderr, "this obsoletes %s\n", dep->asString().c_str());
-       QueueItemConflictPtr conflict_item = new QueueItemConflict (world(), dep, resolvable);
+       QueueItemConflictPtr conflict_item = new QueueItemConflict (world(), dep, resItem);
        conflict_item->setActuallyAnObsolete();
        qil.push_front (conflict_item);
     }
 
-    /* Construct uninstall items for system resolvable's that conflict with us. */
+    /* Construct uninstall items for system resItem's that conflict with us. */
 
-    deps = resolvable->provides();
+    deps = resItem->provides();
     for (CDependencyList::const_iterator iter = deps.begin(); iter != deps.end(); iter++) {
        constDependencyPtr dep = *iter;
-       world()->foreachConflictingResolvable (dep, build_conflict_list, &conflicts);
+       world()->foreachConflictingResItem (dep, build_conflict_list, &conflicts);
     }
 
-    for (CResolvableList::const_iterator iter = conflicts.begin(); iter != conflicts.end(); iter++) {
-       constResolvablePtr conflicting_resolvable = *iter;
+    for (CResItemList::const_iterator iter = conflicts.begin(); iter != conflicts.end(); iter++) {
+       constResItemPtr conflicting_resItem = *iter;
        ResolverInfoPtr log_info;
        QueueItemUninstallPtr uninstall_item;
 
        /* Check to see if we conflict with ourself and don't create
         * an uninstall item for it if we do.  This is Debian's way of
-        * saying that one and only one resolvable with this provide may
+        * saying that one and only one resItem with this provide may
         * exist on the system at a time.
         */
-       if (((constSpecPtr)conflicting_resolvable)->equals (resolvable)) {
+       if (((constSpecPtr)conflicting_resItem)->equals (resItem)) {
            continue;
        }
 
-       if (getenv("RC_SPEW")) fprintf (stderr, "because: '%s'\n", conflicting_resolvable->asString(true).c_str());
+       if (getenv("RC_SPEW")) fprintf (stderr, "because: '%s'\n", conflicting_resItem->asString(true).c_str());
 
-       uninstall_item = new QueueItemUninstall (world(), conflicting_resolvable, "conflict");
+       uninstall_item = new QueueItemUninstall (world(), conflicting_resItem, "conflict");
        uninstall_item->setDueToConflict ();
-       log_info = new ResolverInfoConflictsWith (conflicting_resolvable, resolvable);
+       log_info = new ResolverInfoConflictsWith (conflicting_resItem, resItem);
        uninstall_item->addInfo (log_info);
        qil.push_front (uninstall_item);
     }
@@ -319,12 +319,12 @@ QueueItemInstall::process (ResolverContextPtr context, QueueItemList & qil)
 QueueItemPtr
 QueueItemInstall::copy (void) const
 {
-    QueueItemInstallPtr new_install = new QueueItemInstall (world(), _resolvable);
+    QueueItemInstallPtr new_install = new QueueItemInstall (world(), _resItem);
     ((QueueItemPtr)new_install)->copy((constQueueItemPtr)this);
 
     new_install->_upgrades = _upgrades;
     new_install->_deps_satisfied_by_this_install = CDependencyList(_deps_satisfied_by_this_install.begin(), _deps_satisfied_by_this_install.end());
-    new_install->_needed_by = CResolvableList (_needed_by.begin(), _needed_by.end());
+    new_install->_needed_by = CResItemList (_needed_by.begin(), _needed_by.end());
     new_install->_channel_priority = _channel_priority;
     new_install->_other_penalty = _other_penalty;
     new_install->_explicitly_requested = _explicitly_requested;
@@ -340,7 +340,7 @@ QueueItemInstall::cmp (constQueueItemPtr item) const
     if (cmp != 0)
        return cmp;
     constQueueItemInstallPtr install = item;
-    return GVersion.compare (_resolvable, install->_resolvable);
+    return GVersion.compare (_resItem, install->_resItem);
 }
 
 //---------------------------------------------------------------------------
@@ -353,9 +353,9 @@ QueueItemInstall::addDependency (constDependencyPtr dep)
 
 
 void 
-QueueItemInstall::addNeededBy (constResolvablePtr resolvable)
+QueueItemInstall::addNeededBy (constResItemPtr resItem)
 {
-    _needed_by.push_front (resolvable);
+    _needed_by.push_front (resItem);
 }
 
 ///////////////////////////////////////////////////////////////////
index ee2362f2615c13b999b326d75c7bf6075055c87c..5f0ae5c378663f994c17ec5d1ea8f737f97fb86e 100644 (file)
@@ -27,7 +27,7 @@
 #include <string.h>
 
 #include <zypp/solver/detail/QueueItemInstallPtr.h>
-#include <zypp/solver/detail/Resolvable.h>
+#include <zypp/solver/detail/ResItem.h>
 #include <zypp/solver/detail/Dependency.h>
 #include <zypp/solver/detail/Channel.h>
 
@@ -46,10 +46,10 @@ class QueueItemInstall : public QueueItem {
     REP_BODY(QueueItemInstall);
 
   private:
-    constResolvablePtr _resolvable;
-    constResolvablePtr _upgrades;
+    constResItemPtr _resItem;
+    constResItemPtr _upgrades;
     CDependencyList _deps_satisfied_by_this_install;
-    CResolvableList _needed_by;
+    CResItemList _needed_by;
     int _channel_priority;
     int _other_penalty;
 
@@ -57,7 +57,7 @@ class QueueItemInstall : public QueueItem {
 
   public:
 
-    QueueItemInstall (WorldPtr world, constResolvablePtr resolvable);
+    QueueItemInstall (WorldPtr world, constResItemPtr resItem);
     virtual ~QueueItemInstall();
 
     // ---------------------------------- I/O
@@ -72,10 +72,10 @@ class QueueItemInstall : public QueueItem {
 
     // ---------------------------------- accessors
 
-    constResolvablePtr resolvable (void) const { return _resolvable; }
+    constResItemPtr resItem (void) const { return _resItem; }
 
-    constResolvablePtr upgrades (void) const { return _upgrades; }
-    void setUpgrades (constResolvablePtr upgrades) { _upgrades = upgrades; }
+    constResItemPtr upgrades (void) const { return _upgrades; }
+    void setUpgrades (constResItemPtr upgrades) { _upgrades = upgrades; }
 
     int channelPriority (void) const { return _channel_priority; }
     void setChannelPriority (int channel_priority) { _channel_priority = channel_priority; }
@@ -95,7 +95,7 @@ class QueueItemInstall : public QueueItem {
     virtual bool isSatisfied (ResolverContextPtr context) const;
 
     void addDependency (constDependencyPtr dep);
-    void addNeededBy (constResolvablePtr resolvable);
+    void addNeededBy (constResItemPtr resItem);
 
 };
 
index 4973c8d710c4869bc125387c942981ebcc81c890..2b123db6c95a6d84fa09515e00d50877f459a84b 100644 (file)
@@ -55,17 +55,17 @@ QueueItemRequire::toString ( const QueueItemRequire & item)
 {
     string ret = "[Require: ";
     ret += item._dep->asString();
-    if (item._requiring_resolvable != NULL) {
+    if (item._requiring_resItem != NULL) {
        ret += ", Required by ";
-       ret += item._requiring_resolvable->asString();
+       ret += item._requiring_resItem->asString();
     }
-    if (item._upgraded_resolvable != NULL) {
+    if (item._upgraded_resItem != NULL) {
        ret += ", Upgrades ";
-       ret += item._upgraded_resolvable->asString();
+       ret += item._upgraded_resItem->asString();
     }
-    if (item._lost_resolvable != NULL) {
+    if (item._lost_resItem != NULL) {
        ret += ", Lost ";
-       ret += item._lost_resolvable->asString();
+       ret += item._lost_resItem->asString();
     }
     if (item._remove_only) ret += ", Remove Only";
     if (item._is_child) ret += ", Child";
@@ -94,9 +94,9 @@ operator<<( ostream& os, const QueueItemRequire & item)
 QueueItemRequire::QueueItemRequire (WorldPtr world, constDependencyPtr dep)
     : QueueItem (QUEUE_ITEM_TYPE_REQUIRE, world)
     , _dep (dep)
-    , _requiring_resolvable (NULL)
-    , _upgraded_resolvable (NULL)
-    , _lost_resolvable (NULL)
+    , _requiring_resItem (NULL)
+    , _upgraded_resItem (NULL)
+    , _lost_resItem (NULL)
     , _remove_only (false)
     , _is_child (false)
 {
@@ -110,10 +110,10 @@ QueueItemRequire::~QueueItemRequire()
 //---------------------------------------------------------------------------
 
 void
-QueueItemRequire::addResolvable (constResolvablePtr resolvable)
+QueueItemRequire::addResItem (constResItemPtr resItem)
 {
-    assert (_requiring_resolvable == NULL);
-    _requiring_resolvable = resolvable;
+    assert (_requiring_resItem == NULL);
+    _requiring_resItem = resItem;
 }
 
 
@@ -122,40 +122,40 @@ QueueItemRequire::addResolvable (constResolvablePtr resolvable)
 typedef std::map <constSpecPtr, bool> UniqTable;
 
 typedef struct {
-    constResolvablePtr resolvable;
+    constResItemPtr resItem;
     constSpecPtr dep;
     ResolverContextPtr context;
     WorldPtr world;
-    CResolvableList providers;
+    CResItemList providers;
     UniqTable *uniq;
 } RequireProcessInfo;
 
 
 static bool
-require_process_cb (constResolvablePtr resolvable, constSpecPtr spec, void *data)
+require_process_cb (constResItemPtr resItem, constSpecPtr spec, void *data)
 {
     RequireProcessInfo *info = (RequireProcessInfo *)data;
-    ResolvableStatus status;
+    ResItemStatus status;
 
-    status = info->context->getStatus (resolvable);
-//fprintf (stderr, "require_process_cb(res: %s, spec %s, status %s)\n", resolvable->asString().c_str(), spec->asString().c_str(), ResolverContext::toString(status).c_str());
+    status = info->context->getStatus (resItem);
+//fprintf (stderr, "require_process_cb(res: %s, spec %s, status %s)\n", resItem->asString().c_str(), spec->asString().c_str(), ResolverContext::toString(status).c_str());
 //fprintf (stderr, "require_process_cb(info->dep: %s)\n", info->dep ? info->dep->asString().c_str() : "(null)");
-//fprintf (stderr, "require_process_cb(resolvableIsPossible -> %d)\n", info->context->resolvableIsPossible (resolvable));
-    /* info->dep is set for resolvable set childern only. If it is set
+//fprintf (stderr, "require_process_cb(resItemIsPossible -> %d)\n", info->context->resItemIsPossible (resItem));
+    /* info->dep is set for resItem set childern only. If it is set
        allow only exactly required version */
     if (info->dep != NULL
        && !info->dep->equals(spec)) {
        return true;
     }
 
-    if ((! resolvable_status_is_to_be_uninstalled (status))
-       && ! info->context->isParallelInstall (resolvable)
-       && info->uniq->find((constSpecPtr)resolvable) == info->uniq->end()
-       && info->context->resolvableIsPossible (resolvable)
-       && ! info->world->resolvableIsLocked (resolvable)) {
+    if ((! resItem_status_is_to_be_uninstalled (status))
+       && ! info->context->isParallelInstall (resItem)
+       && info->uniq->find((constSpecPtr)resItem) == info->uniq->end()
+       && info->context->resItemIsPossible (resItem)
+       && ! info->world->resItemIsLocked (resItem)) {
 
-       info->providers.push_front (resolvable);
-       (*(info->uniq))[resolvable] = true;
+       info->providers.push_front (resItem);
+       (*(info->uniq))[resItem] = true;
     }
 
     return true;
@@ -163,26 +163,26 @@ require_process_cb (constResolvablePtr resolvable, constSpecPtr spec, void *data
 
 
 static bool
-no_installable_providers_info_cb (constResolvablePtr resolvable, constSpecPtr spec, void *data)
+no_installable_providers_info_cb (constResItemPtr resItem, constSpecPtr spec, void *data)
 {
     RequireProcessInfo *info = (RequireProcessInfo *)data;
-    ResolvableStatus status;
+    ResItemStatus status;
     string msg_str;
 
-    status = info->context->getStatus (resolvable);
+    status = info->context->getStatus (resItem);
 
-    if (resolvable_status_is_to_be_uninstalled (status)) {
-       msg_str = resolvable->name() + " provides " + spec->asString() + ", but is scheduled to be uninstalled.";
-    } else if (info->context->isParallelInstall (resolvable)) {
-       msg_str = resolvable->name() + " provides " + spec->asString() + ", but another version of that resolvable is already installed.";
-    } else if (! info->context->resolvableIsPossible (resolvable)) {
-       msg_str = resolvable->name() + " provides " + spec->asString() + ", but it is uninstallable.  Try installing it on its own for more details.";
-    } else if (info->world->resolvableIsLocked (resolvable)) {
-       msg_str = resolvable->name() + " provides " + spec->asString() + ", but it is locked.";
+    if (resItem_status_is_to_be_uninstalled (status)) {
+       msg_str = resItem->name() + " provides " + spec->asString() + ", but is scheduled to be uninstalled.";
+    } else if (info->context->isParallelInstall (resItem)) {
+       msg_str = resItem->name() + " provides " + spec->asString() + ", but another version of that resItem is already installed.";
+    } else if (! info->context->resItemIsPossible (resItem)) {
+       msg_str = resItem->name() + " provides " + spec->asString() + ", but it is uninstallable.  Try installing it on its own for more details.";
+    } else if (info->world->resItemIsLocked (resItem)) {
+       msg_str = resItem->name() + " provides " + spec->asString() + ", but it is locked.";
     }
 
     if (!msg_str.empty()) {
-       info->context->addInfoString (info->resolvable, RESOLVER_INFO_PRIORITY_VERBOSE, msg_str);
+       info->context->addInfoString (info->resItem, RESOLVER_INFO_PRIORITY_VERBOSE, msg_str);
     }
     
     return true;
@@ -190,16 +190,16 @@ no_installable_providers_info_cb (constResolvablePtr resolvable, constSpecPtr sp
 
 
 static bool
-look_for_upgrades_cb (constResolvablePtr resolvable, void *data)
+look_for_upgrades_cb (constResItemPtr resItem, void *data)
 {
-    CResolvableList *rl = (CResolvableList *)data;
-    rl->push_front (resolvable);
+    CResItemList *rl = (CResItemList *)data;
+    rl->push_front (resItem);
     return true;
 }
 
 
 static bool
-codependent_resolvables (constResolvablePtr r1, constResolvablePtr r2)
+codependent_resItems (constResItemPtr r1, constResItemPtr r2)
 {
     string name1 = r1->name();
     string name2 = r2->name();
@@ -239,21 +239,21 @@ QueueItemRequire::process (ResolverContextPtr context, QueueItemList & new_items
 
     RequireProcessInfo info;
 
-    info.resolvable = _requiring_resolvable;
+    info.resItem = _requiring_resItem;
     info.dep = _is_child ? _dep : NULL;
     info.context = context;
     info.world = world();
-    info.uniq = new UniqTable();               //FIXME: op: g_hash_table_new (rc_resolvable_spec_hash, rc_resolvable_spec_equal);
+    info.uniq = new UniqTable();               //FIXME: op: g_hash_table_new (rc_resItem_spec_hash, rc_resItem_spec_equal);
 
     int num_providers = 0;
 
     if (! _remove_only) {
 
-       world()->foreachProvidingResolvable (_dep, require_process_cb, &info);
+       world()->foreachProvidingResItem (_dep, require_process_cb, &info);
        
        num_providers = info.providers.size();
 
-       if (getenv ("RC_SPEW")) fprintf (stderr, "requirement is met by %d resolvables\n", num_providers);
+       if (getenv ("RC_SPEW")) fprintf (stderr, "requirement is met by %d resItems\n", num_providers);
     }
 
     std::string msg;
@@ -266,61 +266,61 @@ QueueItemRequire::process (ResolverContextPtr context, QueueItemList & new_items
        QueueItemBranchPtr branch_item = NULL;
        bool explore_uninstall_branch = true;
 
-       if (_upgraded_resolvable == NULL) {
+       if (_upgraded_resItem == NULL) {
            ResolverInfoPtr err_info;
 
            msg = string ("There are no ") + (_remove_only ? "alternative installed" : "installable") + " providers of " + _dep->asString();
-           if (_requiring_resolvable != NULL) {
+           if (_requiring_resItem != NULL) {
                msg += " for ";
-               msg += _requiring_resolvable->asString();
+               msg += _requiring_resItem->asString();
            }
 
-           err_info = new ResolverInfoMisc (_requiring_resolvable, RESOLVER_INFO_PRIORITY_VERBOSE, msg);
+           err_info = new ResolverInfoMisc (_requiring_resItem, RESOLVER_INFO_PRIORITY_VERBOSE, msg);
 
            context->addInfo (err_info);
 
            // Maybe we can add some extra info on why none of the providers are suitable.
-           world()->foreachProvidingResolvable (_dep, no_installable_providers_info_cb, (void *)&info);
+           world()->foreachProvidingResItem (_dep, no_installable_providers_info_cb, (void *)&info);
        }
        
        // If this is an upgrade, we might be able to avoid removing stuff by upgrading it instead.
-       if (_upgraded_resolvable != NULL
-           && _requiring_resolvable != NULL) {
+       if (_upgraded_resItem != NULL
+           && _requiring_resItem != NULL) {
 
-           CResolvableList upgrade_list;
+           CResItemList upgrade_list;
 
-           world()->foreachUpgrade (_requiring_resolvable, new Channel(CHANNEL_TYPE_ANY), look_for_upgrades_cb, (void *)&upgrade_list);
+           world()->foreachUpgrade (_requiring_resItem, new Channel(CHANNEL_TYPE_ANY), look_for_upgrades_cb, (void *)&upgrade_list);
 
            if (!upgrade_list.empty()) {
                string label, req_str, up_str;
 
                branch_item = new QueueItemBranch (world());
 
-               req_str = _requiring_resolvable->asString();
-               up_str  = _upgraded_resolvable->asString();
+               req_str = _requiring_resItem->asString();
+               up_str  = _upgraded_resItem->asString();
 
                label = string ("for requiring ") + _dep->asString() + " for " + req_str + " when upgrading " + up_str;
                branch_item->setLabel (label);
 //fprintf (stderr, "Branching: %s\n", label.c_str());
-               for (CResolvableList::const_iterator iter = upgrade_list.begin(); iter != upgrade_list.end(); iter++) {
-                   constResolvablePtr upgrade_resolvable = *iter;
+               for (CResItemList::const_iterator iter = upgrade_list.begin(); iter != upgrade_list.end(); iter++) {
+                   constResItemPtr upgrade_resItem = *iter;
                    QueueItemInstallPtr install_item;
 
-                   if (context->resolvableIsPossible (upgrade_resolvable)) {
+                   if (context->resItemIsPossible (upgrade_resItem)) {
                    
-                       install_item = new QueueItemInstall (world(), upgrade_resolvable);
-                       install_item->setUpgrades (_requiring_resolvable);
+                       install_item = new QueueItemInstall (world(), upgrade_resItem);
+                       install_item->setUpgrades (_requiring_resItem);
                        branch_item->addItem (install_item);
 
-                       ResolverInfoNeededByPtr upgrade_info = new ResolverInfoNeededBy (upgrade_resolvable);
-                       upgrade_info->addRelatedResolvable (_upgraded_resolvable);
+                       ResolverInfoNeededByPtr upgrade_info = new ResolverInfoNeededBy (upgrade_resItem);
+                       upgrade_info->addRelatedResItem (_upgraded_resItem);
                        install_item->addInfo (upgrade_info);
 
-                       // If an upgrade resolvable has its requirements met, don't do the uninstall branch.
+                       // If an upgrade resItem has its requirements met, don't do the uninstall branch.
                        //   FIXME: should we also look at conflicts here?
 
                        if (explore_uninstall_branch) {
-                           CDependencyList requires = upgrade_resolvable->requires();
+                           CDependencyList requires = upgrade_resItem->requires();
                            CDependencyList::const_iterator iter = requires.begin();
                            for (; iter != requires.end(); iter++) {
                                constDependencyPtr req = *iter;
@@ -333,24 +333,24 @@ QueueItemRequire::process (ResolverContextPtr context, QueueItemList & new_items
                            }
                        }
                        
-                   } /* if (context->resolvableIsPossible ( ... */
+                   } /* if (context->resItemIsPossible ( ... */
                } /* for (iter = upgrade_list; ... */
            } /* if (upgrade_list) ... */
 
            if (!upgrade_list.empty()
                && branch_item->isEmpty ()) {
 
-               for (CResolvableList::const_iterator iter = upgrade_list.begin(); iter != upgrade_list.end(); iter++) {
+               for (CResItemList::const_iterator iter = upgrade_list.begin(); iter != upgrade_list.end(); iter++) {
                    string str;
                    string p1, p2;
 
-                   p1 = _requiring_resolvable->asString();
+                   p1 = _requiring_resItem->asString();
                    p2 = (*iter)->asString();
                    str = string ("Upgrade to ") + p2 + " to avoid removing " + p1 + " is not possible.";
 
                    ResolverInfoMiscPtr misc_info = new ResolverInfoMisc (NULL, RESOLVER_INFO_PRIORITY_VERBOSE, str);
-                   misc_info->addRelatedResolvable (_requiring_resolvable);
-                   misc_info->addRelatedResolvable (*iter);
+                   misc_info->addRelatedResItem (_requiring_resItem);
+                   misc_info->addRelatedResItem (*iter);
                    context->addInfo (misc_info);
 
                    explore_uninstall_branch = true;
@@ -358,17 +358,17 @@ QueueItemRequire::process (ResolverContextPtr context, QueueItemList & new_items
 
                //
                //  The exception: we always want to consider uninstalling
-               //  when the requirement has resulted from a resolvable losing
+               //  when the requirement has resulted from a resItem losing
                //  one of it's provides.
                
            } else if (!upgrade_list.empty()
                       && explore_uninstall_branch
-                      && codependent_resolvables (_requiring_resolvable, _upgraded_resolvable)
-                      && _lost_resolvable == NULL) {
+                      && codependent_resItems (_requiring_resItem, _upgraded_resItem)
+                      && _lost_resItem == NULL) {
                explore_uninstall_branch = false;
            }
 
-       } /* if (_upgrade_resolvable && _requiring_resolvable) ... */
+       } /* if (_upgrade_resItem && _requiring_resItem) ... */
 
        // We always consider uninstalling when in verification mode.
 
@@ -376,13 +376,13 @@ QueueItemRequire::process (ResolverContextPtr context, QueueItemList & new_items
            explore_uninstall_branch = true;
        }
 
-       if (explore_uninstall_branch && _requiring_resolvable) {
+       if (explore_uninstall_branch && _requiring_resItem) {
            ResolverInfoPtr log_info;
-           uninstall_item = new QueueItemUninstall (world(),_requiring_resolvable, "unsatisfied requirements");
+           uninstall_item = new QueueItemUninstall (world(),_requiring_resItem, "unsatisfied requirements");
            uninstall_item->setDependency (_dep);
            
-           if (_lost_resolvable) {
-               log_info = new ResolverInfoDependsOn (_requiring_resolvable, _lost_resolvable);
+           if (_lost_resItem) {
+               log_info = new ResolverInfoDependsOn (_requiring_resItem, _lost_resItem);
                uninstall_item->addInfo (log_info);
            }
            
@@ -406,32 +406,32 @@ QueueItemRequire::process (ResolverContextPtr context, QueueItemList & new_items
        
     } else if (num_providers == 1) {
 
-       if (getenv ("RC_SPEW")) fprintf (stderr, "Found exactly one resolvable, installing it.\n");
+       if (getenv ("RC_SPEW")) fprintf (stderr, "Found exactly one resItem, installing it.\n");
 
        QueueItemInstallPtr install_item = new QueueItemInstall (world(), info.providers.front());
        install_item->addDependency (_dep);
 
-       // The requiring resolvable could be NULL if the requirement was added as an extra dependency.
-       if (_requiring_resolvable) {
-           install_item->addNeededBy (_requiring_resolvable);
+       // The requiring resItem could be NULL if the requirement was added as an extra dependency.
+       if (_requiring_resItem) {
+           install_item->addNeededBy (_requiring_resItem);
        }
        new_items.push_front (install_item);
 
     } else if (num_providers > 1) {
 
-       if (getenv ("RC_SPEW")) fprintf (stderr, "Found more than one resolvable, branching.\n");
+       if (getenv ("RC_SPEW")) fprintf (stderr, "Found more than one resItem, branching.\n");
 
-//fprintf (stderr, "Found more than one resolvable, branching.\n");
+//fprintf (stderr, "Found more than one resItem, branching.\n");
        QueueItemBranchPtr branch_item = new QueueItemBranch (world());
 
-       for (CResolvableList::const_iterator iter = info.providers.begin(); iter != info.providers.end(); iter++) {
+       for (CResItemList::const_iterator iter = info.providers.begin(); iter != info.providers.end(); iter++) {
            QueueItemInstallPtr install_item = new QueueItemInstall (world(), *iter);
            install_item->addDependency (_dep);
            branch_item->addItem (install_item);
 
-           // The requiring resolvable could be NULL if the requirement was added as an extra dependency.
-           if (_requiring_resolvable) {
-               install_item->addNeededBy (_requiring_resolvable);
+           // The requiring resItem could be NULL if the requirement was added as an extra dependency.
+           if (_requiring_resItem) {
+               install_item->addNeededBy (_requiring_resItem);
            }
        }
 
@@ -454,8 +454,8 @@ QueueItemRequire::copy (void) const
     QueueItemRequirePtr new_require = new QueueItemRequire (world(), _dep);
     ((QueueItemPtr)new_require)->copy((constQueueItemPtr)this);
 
-    new_require->_requiring_resolvable = _requiring_resolvable;
-    new_require->_upgraded_resolvable  = _upgraded_resolvable;
+    new_require->_requiring_resItem = _requiring_resItem;
+    new_require->_upgraded_resItem  = _upgraded_resItem;
     new_require->_remove_only          = _remove_only;
 
     return new_require;
index ab2f17dc5b9c232928ba742107eb90761108f603..f31cb65deef34288fa67921a80ccd95cf9be5f99 100644 (file)
@@ -27,7 +27,7 @@
 #include <string.h>
 
 #include <zypp/solver/detail/QueueItemRequirePtr.h>
-#include <zypp/solver/detail/Resolvable.h>
+#include <zypp/solver/detail/ResItem.h>
 #include <zypp/solver/detail/Dependency.h>
 #include <zypp/solver/detail/Channel.h>
 
@@ -47,9 +47,9 @@ class QueueItemRequire : public QueueItem {
 
   private:
     constDependencyPtr _dep;
-    constResolvablePtr _requiring_resolvable;
-    constResolvablePtr _upgraded_resolvable;
-    constResolvablePtr _lost_resolvable;
+    constResItemPtr _requiring_resItem;
+    constResItemPtr _upgraded_resItem;
+    constResItemPtr _lost_resItem;
     bool _remove_only;
     bool _is_child;
 
@@ -73,8 +73,8 @@ class QueueItemRequire : public QueueItem {
     constDependencyPtr dependency (void) const { return _dep; }
 
     void setRemoveOnly (void) { _remove_only = true; }
-    void setUpgradedResolvable (constResolvablePtr upgraded_resolvable) { _upgraded_resolvable = upgraded_resolvable; }
-    void setLostResolvable (constResolvablePtr lost_resolvable) { _lost_resolvable = lost_resolvable; }
+    void setUpgradedResItem (constResItemPtr upgraded_resItem) { _upgraded_resItem = upgraded_resItem; }
+    void setLostResItem (constResItemPtr lost_resItem) { _lost_resItem = lost_resItem; }
 
     // ---------------------------------- methods
 
@@ -84,7 +84,7 @@ class QueueItemRequire : public QueueItem {
     virtual bool isRedundant (ResolverContextPtr context) const { return false; }
     virtual bool isSatisfied (ResolverContextPtr context) const { return false; }
 
-    void addResolvable (constResolvablePtr resolvable);
+    void addResItem (constResItemPtr resItem);
 
 
 };
index f2ecab03ce93f0455a2ca9ac45a767d47869750b..491ee9b319e1a31ad0fedaca52a80ca8dd6d07da 100644 (file)
@@ -49,7 +49,7 @@ QueueItemUninstall::toString ( const QueueItemUninstall & item)
 {
     string ret = "[Uninstall: ";
 
-    ret += item._resolvable->asString();
+    ret += item._resItem->asString();
     ret += " ("; ret += item._reason; ret += ")";
     if (item._dep_leading_to_uninstall != NULL) {
        ret += ", Triggered By ";
@@ -86,9 +86,9 @@ operator<<( ostream& os, const QueueItemUninstall & item)
 
 //---------------------------------------------------------------------------
 
-QueueItemUninstall::QueueItemUninstall (WorldPtr world, constResolvablePtr resolvable, const std::string & reason)
+QueueItemUninstall::QueueItemUninstall (WorldPtr world, constResItemPtr resItem, const std::string & reason)
     : QueueItem (QUEUE_ITEM_TYPE_UNINSTALL, world)
-    , _resolvable (resolvable)
+    , _resItem (resItem)
     , _reason (reason)
     , _dep_leading_to_uninstall (NULL)
     , _upgraded_to (NULL)
@@ -128,14 +128,14 @@ typedef struct {
 
 
 static bool
-unlink_check_cb (constResolvablePtr resolvable, constDependencyPtr dep, void *data)
+unlink_check_cb (constResItemPtr resItem, constDependencyPtr dep, void *data)
 {
     UnlinkCheckInfo *info = (UnlinkCheckInfo *)data;
 
     if (info->cancel_unlink)
        return true; 
 
-    if (! info->context->resolvableIsPresent (resolvable))
+    if (! info->context->resItemIsPresent (resItem))
        return true;
 
     if (info->context->requirementIsMet (dep, false))
@@ -149,31 +149,31 @@ unlink_check_cb (constResolvablePtr resolvable, constDependencyPtr dep, void *da
 typedef struct {
     WorldPtr world;
     ResolverContextPtr context;
-    constResolvablePtr uninstalled_resolvable;
-    constResolvablePtr upgraded_resolvable;
+    constResItemPtr uninstalled_resItem;
+    constResItemPtr upgraded_resItem;
     QueueItemList *require_items;
     bool remove_only;
 } UninstallProcessInfo;
 
 
 static bool
-uninstall_process_cb (constResolvablePtr resolvable, constDependencyPtr dep, void *data)
+uninstall_process_cb (constResItemPtr resItem, constDependencyPtr dep, void *data)
 {
     UninstallProcessInfo *info = (UninstallProcessInfo *)data;
 
-    if (! info->context->resolvableIsPresent (resolvable))
+    if (! info->context->resItemIsPresent (resItem))
        return true;
 
     if (info->context->requirementIsMet (dep, false))
        return true;
 
     QueueItemRequirePtr require_item = new QueueItemRequire (info->world, dep);
-    require_item->addResolvable (resolvable);
+    require_item->addResItem (resItem);
     if (info->remove_only) {
         require_item->setRemoveOnly ();
     }
-    require_item->setUpgradedResolvable (info->upgraded_resolvable);
-    require_item->setLostResolvable (info->uninstalled_resolvable);
+    require_item->setUpgradedResItem (info->upgraded_resItem);
+    require_item->setLostResItem (info->uninstalled_resItem);
 
     info->require_items->push_front (require_item);
 
@@ -184,19 +184,19 @@ uninstall_process_cb (constResolvablePtr resolvable, constDependencyPtr dep, voi
 bool
 QueueItemUninstall::process (ResolverContextPtr context, QueueItemList & qil)
 {
-    ResolvableStatus status;
+    ResItemStatus status;
     string pkg_str;
 
-    pkg_str = ((constSpecPtr)_resolvable)->asString();
+    pkg_str = ((constSpecPtr)_resItem)->asString();
 
-    status = context->getStatus (_resolvable);
+    status = context->getStatus (_resItem);
 
-    if (getenv ("RC_SPEW")) fprintf (stderr, "QueueItemUninstall::process(<%s>%s)%s\n", ResolverContext::toString(status).c_str(), _resolvable->asString().c_str(), _unlink ? "[unlink]" : "");
+    if (getenv ("RC_SPEW")) fprintf (stderr, "QueueItemUninstall::process(<%s>%s)%s\n", ResolverContext::toString(status).c_str(), _resItem->asString().c_str(), _unlink ? "[unlink]" : "");
 
-    /* In the case of an unlink, we only want to uninstall the resolvable if it is
+    /* In the case of an unlink, we only want to uninstall the resItem if it is
        being used by something else.  We can't really determine this with 100%
        accuracy, since some later queue item could cause something that requires
-       the resolvable to be uninstalled.  The alternative is to try to do something
+       the resItem to be uninstalled.  The alternative is to try to do something
        really clever... but I'm not clever enough to think of an algorithm that
         (1) Would do the right thing.
         (2) Is guaranteed to terminate. (!)
@@ -206,7 +206,7 @@ QueueItemUninstall::process (ResolverContextPtr context, QueueItemList & qil)
     if (_unlink) {
        bool unlink_cancelled = false;
 
-       /* If the resolvable is to-be-installed, obviously it is being use! */
+       /* If the resItem is to-be-installed, obviously it is being use! */
        if (status == RESOLVABLE_STATUS_TO_BE_INSTALLED) {
 
            unlink_cancelled = true;
@@ -214,40 +214,40 @@ QueueItemUninstall::process (ResolverContextPtr context, QueueItemList & qil)
        } else if (status == RESOLVABLE_STATUS_INSTALLED) {
            UnlinkCheckInfo info;
 
-           /* Flag the resolvable as to-be-uninstalled so that it won't
-              satisfy any other resolvable's deps during this check. */
-           context->setStatus (_resolvable, RESOLVABLE_STATUS_TO_BE_UNINSTALLED);
+           /* Flag the resItem as to-be-uninstalled so that it won't
+              satisfy any other resItem's deps during this check. */
+           context->setStatus (_resItem, RESOLVABLE_STATUS_TO_BE_UNINSTALLED);
 
            info.context = context;
            info.cancel_unlink = false;
 
-           CDependencyList provides = _resolvable->provides();
+           CDependencyList provides = _resItem->provides();
            for (CDependencyList::const_iterator iter = provides.begin(); iter != provides.end() && ! info.cancel_unlink; iter++) {
-               world()->foreachRequiringResolvable (*iter, unlink_check_cb, &info);
+               world()->foreachRequiringResItem (*iter, unlink_check_cb, &info);
            }
 
            /* Set the status back to normal. */
-           context->setStatus (_resolvable, status);
+           context->setStatus (_resItem, status);
 
            if (info.cancel_unlink)
                unlink_cancelled = true;
        }
 
        if (unlink_cancelled) {
-           string msg = pkg_str + " is required by other installed resolvables, so it won't be unlinked.";
-           context->addInfoString (_resolvable, RESOLVER_INFO_PRIORITY_VERBOSE, msg);
+           string msg = pkg_str + " is required by other installed resItems, so it won't be unlinked.";
+           context->addInfoString (_resItem, RESOLVER_INFO_PRIORITY_VERBOSE, msg);
            goto finished;
        }
     }
 
-    context->uninstallResolvable (_resolvable, _upgraded_to != NULL, _due_to_obsolete, _unlink);
+    context->uninstallResItem (_resItem, _upgraded_to != NULL, _due_to_obsolete, _unlink);
        
     if (status == RESOLVABLE_STATUS_INSTALLED) {
 
        if (! _explicitly_requested
-           && world()->resolvableIsLocked (_resolvable)) {
+           && world()->resItemIsLocked (_resItem)) {
            string msg = pkg_str + " is locked, and cannot be uninstalled.";
-           context->addErrorString (_resolvable, msg);
+           context->addErrorString (_resItem, msg);
            goto finished;
        }
 
@@ -257,22 +257,22 @@ QueueItemUninstall::process (ResolverContextPtr context, QueueItemList & qil)
            && !_due_to_conflict
            && !_due_to_obsolete)
        {
-           ResolverInfoPtr info = new ResolverInfoMissingReq (_resolvable, _dep_leading_to_uninstall);
+           ResolverInfoPtr info = new ResolverInfoMissingReq (_resItem, _dep_leading_to_uninstall);
            context->addInfo (info);
        }
 
-       CDependencyList provides = _resolvable->provides();
+       CDependencyList provides = _resItem->provides();
        for (CDependencyList::const_iterator iter = provides.begin(); iter != provides.end(); iter++) {
            UninstallProcessInfo info;
 
            info.world = world();
            info.context = context;
-           info.uninstalled_resolvable = _resolvable;
-           info.upgraded_resolvable = _upgraded_to;
+           info.uninstalled_resItem = _resItem;
+           info.upgraded_resItem = _upgraded_to;
            info.require_items = &qil;
            info.remove_only = _remove_only;
            
-           world()->foreachRequiringResolvable (*iter, uninstall_process_cb, &info);
+           world()->foreachRequiringResItem (*iter, uninstall_process_cb, &info);
        }
     }
 
@@ -292,18 +292,18 @@ QueueItemUninstall::cmp (constQueueItemPtr item) const
        return cmp;
 
     constQueueItemUninstallPtr uninstall = item;
-    return GVersion.compare (_resolvable, uninstall->_resolvable);
+    return GVersion.compare (_resItem, uninstall->_resItem);
 }
 
 
 QueueItemPtr
 QueueItemUninstall::copy (void) const
 {
-    QueueItemUninstallPtr new_uninstall = new QueueItemUninstall (world(), _resolvable, _reason);
+    QueueItemUninstallPtr new_uninstall = new QueueItemUninstall (world(), _resItem, _reason);
     ((QueueItemPtr)new_uninstall)->copy((constQueueItemPtr)this);
 
 
-    new_uninstall->_resolvable                = _resolvable;
+    new_uninstall->_resItem                = _resItem;
     new_uninstall->_dep_leading_to_uninstall  = _dep_leading_to_uninstall;
     new_uninstall->_upgraded_to               = _upgraded_to;
 
index 9bd735621df8d70874d6fc7606c3a0b89dfda037..13e9b4d104515d6a5056593ea7f3105ff0834f79 100644 (file)
@@ -27,7 +27,7 @@
 #include <string.h>
 
 #include <zypp/solver/detail/QueueItemUninstallPtr.h>
-#include <zypp/solver/detail/Resolvable.h>
+#include <zypp/solver/detail/ResItem.h>
 #include <zypp/solver/detail/Dependency.h>
 #include <zypp/solver/detail/Channel.h>
 
@@ -46,10 +46,10 @@ class QueueItemUninstall : public QueueItem {
     REP_BODY(QueueItemUninstall);
 
   private:
-    constResolvablePtr _resolvable;
+    constResItemPtr _resItem;
     const std::string _reason;
     constDependencyPtr _dep_leading_to_uninstall;
-    constResolvablePtr _upgraded_to;
+    constResItemPtr _upgraded_to;
 
     bool _explicitly_requested;
     bool _remove_only;
@@ -59,7 +59,7 @@ class QueueItemUninstall : public QueueItem {
 
   public:
 
-    QueueItemUninstall (WorldPtr world, constResolvablePtr resolvable, const std::string & reason);
+    QueueItemUninstall (WorldPtr world, constResItemPtr resItem, const std::string & reason);
     virtual ~QueueItemUninstall();
 
     // ---------------------------------- I/O
@@ -77,7 +77,7 @@ class QueueItemUninstall : public QueueItem {
     void setDependency (constDependencyPtr dep) { _dep_leading_to_uninstall = dep; }
     void setExplicitlyRequested (void) { _explicitly_requested = true; }
     void setRemoveOnly (void) { _remove_only = true; }
-    void setUpgradedTo (constResolvablePtr resolvable) { _upgraded_to = resolvable; }
+    void setUpgradedTo (constResItemPtr resItem) { _upgraded_to = resItem; }
     void setDueToConflict (void) { _due_to_conflict = true; }
     void setDueToObsolete (void) { _due_to_obsolete = true; }
     void setUnlink (void);
diff --git a/zypp/solver/detail/ResItem.cc b/zypp/solver/detail/ResItem.cc
new file mode 100644 (file)
index 0000000..f789952
--- /dev/null
@@ -0,0 +1,159 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* ResItem.cc
+ * Copyright (C) 2000-2002 Ximian, Inc.
+ * Copyright (C) 2005 SUSE Linux Products GmbH
+ *
+ * Definition of 'resItem'
+ *
+ * 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.
+ */
+
+#include <y2util/stringutil.h>
+
+#include <zypp/solver/detail/ResItem.h>
+
+///////////////////////////////////////////////////////////////////
+namespace ZYPP {
+//////////////////////////////////////////////////////////////////
+
+using namespace std;
+
+
+IMPL_DERIVED_POINTER(ResItem,Spec);
+
+//---------------------------------------------------------------------------
+
+string
+ResItem::asString ( bool full ) const
+{
+    return toString (*this, full);
+}
+
+
+string
+ResItem::toString ( const ResItem & resItem, bool full )
+{
+    string res;
+
+    res += Spec::toString(resItem);
+    if (!resItem.channel()->system()) {
+       res += "[";
+       res += (resItem.channel() == NULL) ? "(channel?)" : resItem.channel()->name();
+       res += "]";
+    }
+    if (!full) return res;
+
+    if (resItem.isInstalled()) res += "<installed>";
+    if (resItem.local()) res += "<local>";
+
+    res += "FileSize ";
+    res += stringutil::numstring (resItem.fileSize());
+    res += ", InstalledSize ";
+    res += stringutil::numstring (resItem.installedSize());
+
+    if (!resItem.requires().empty()) {
+       res += ", Requires: ";
+       res += Dependency::toString(resItem.requires());
+    }
+
+    if (!resItem.provides().empty()) {
+       res += ", Provides: ";
+       res += Dependency::toString(resItem.provides());
+    }
+    if (!resItem.conflicts().empty()) {
+       res += ", Conflicts: ";
+       res += Dependency::toString(resItem.conflicts());
+    }
+    if (!resItem.obsoletes().empty()) {
+       res += ", Obsoletes: ";
+       res += Dependency::toString(resItem.obsoletes());
+    }
+
+    if (!resItem.suggests().empty()) {
+       res += ", Suggests: ";
+       res += Dependency::toString(resItem.suggests());
+    }
+    if (!resItem.recommends().empty()) {
+       res += ", Recommends: ";
+       res += Dependency::toString(resItem.recommends());
+    }
+    if (!resItem.freshens().empty()) {
+       res += ", Freshens: ";
+       res += Dependency::toString(resItem.freshens());
+    }
+    return res;
+}
+
+
+string
+ResItem::toString ( const CResItemList & rl, bool full )
+{
+    string res("[");
+    for (CResItemList::const_iterator iter = rl.begin(); iter != rl.end(); iter++) {
+       if (iter != rl.begin()) res += ", ";
+       res += (*iter)->asString(full);
+    }
+    return res + "]";
+}
+
+
+ostream &
+ResItem::dumpOn( ostream & str ) const
+{
+    str << asString();
+    return str;
+}
+
+
+ostream&
+operator<<( ostream& os, const ResItem& edition)
+{
+    return os << edition.asString();
+}
+
+//---------------------------------------------------------------------------
+
+ResItem::ResItem (const Kind & kind, const string & name, int epoch, const string & version, const string & release, const Arch * arch)
+    :Spec (kind, name, epoch, version, release, arch)
+    , _channel (false)
+    , _installed (false)
+    , _local (false)
+    , _locked (false)
+    , _file_size (0)
+    , _installed_size (0)
+
+{
+}
+
+
+ResItem::~ResItem()
+{
+}
+
+//---------------------------------------------------------------------------
+
+bool
+ResItem::isInstalled () const
+{
+    if (_channel != NULL
+       && _channel->system()) {
+       return true;
+    }
+    return false;
+}
+
+///////////////////////////////////////////////////////////////////
+}; // namespace ZYPP
+///////////////////////////////////////////////////////////////////
diff --git a/zypp/solver/detail/ResItem.h b/zypp/solver/detail/ResItem.h
new file mode 100644 (file)
index 0000000..495e932
--- /dev/null
@@ -0,0 +1,150 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* ResItem.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 _ResItem_h
+#define _ResItem_h
+
+#include <list>
+#include <iosfwd>
+#include <string.h>
+#include <sys/types.h>
+
+#include <zypp/solver/detail/ResItemPtr.h>
+#include <zypp/solver/detail/StoreWorldPtr.h>
+#include <zypp/solver/detail/Dependency.h>
+#include <zypp/solver/detail/Channel.h>
+
+///////////////////////////////////////////////////////////////////
+namespace ZYPP {
+//////////////////////////////////////////////////////////////////
+
+typedef std::list<ResItemPtr> ResItemList;
+typedef std::list<constResItemPtr> CResItemList;
+
+typedef bool (*ResItemFn) (ResItemPtr r, void *data);
+typedef bool (*CResItemFn) (constResItemPtr r, void *data);
+typedef bool (*ResItemPairFn) (constResItemPtr r1, constResItemPtr r2, void *data);
+typedef bool (*ResItemAndSpecFn) (constResItemPtr r, constSpecPtr spec, void *data);
+typedef bool (*ResItemAndDepFn) (constResItemPtr r, constDependencyPtr dep, void *data);
+
+///////////////////////////////////////////////////////////////////
+//
+//     CLASS NAME : ResItem
+/**
+ *
+ **/
+
+class ResItem : public Spec {
+    REP_BODY(ResItem);
+
+  private:
+    constChannelPtr _channel;
+
+    bool _installed;
+    bool _local;
+    bool _locked;
+
+    size_t _file_size;
+    size_t _installed_size;
+
+    CDependencyList _requires;
+    CDependencyList _provides;
+    CDependencyList _conflicts;
+    CDependencyList _obsoletes;
+
+    CDependencyList _suggests;
+    CDependencyList _recommends;
+    CDependencyList _freshens;
+
+  protected:
+
+    // ---------------------------------- accessors
+
+    void setLocal (bool local) { _local = local; }
+
+  public:
+
+    ResItem(const Kind & kind, const std::string & name, int epoch = -1, const std::string & version = "", const std::string & release = "", const Arch * arch = Arch::Unknown);
+
+    ResItem(const XmlNodePtr node);
+
+    virtual ~ResItem();
+
+    // ---------------------------------- I/O
+
+    const XmlNodePtr asXmlNode (void) const;
+
+    static std::string toString ( const ResItem & res, bool full = false );
+
+    static std::string toString ( const CResItemList & reslist, bool full = false );
+
+    virtual std::ostream & dumpOn( std::ostream & str ) const;
+
+    friend std::ostream& operator<<( std::ostream & str, const ResItem & str);
+
+    std::string asString ( bool full = false ) const;
+
+    // ---------------------------------- accessors
+
+    constChannelPtr channel() const { return _channel; }
+    void setChannel (constChannelPtr channel) { _channel = channel; }
+
+    bool locked () const { return _locked; }
+    void setLocked (bool locked) { _locked = locked; }
+
+    bool isInstalled() const;                          // does *not* reflect _installed
+    void setInstalled (bool installed) { _installed = installed; }
+
+    bool local() const { return _local; }
+
+    size_t fileSize() const { return _file_size; }
+    void setFileSize (size_t file_size) { _file_size = file_size; }
+
+    size_t installedSize() const { return _installed_size; }
+    void setInstalledSize (size_t installed_size) { _installed_size = installed_size; }
+
+    const CDependencyList & requires() const { return _requires; }
+    void setRequires (const CDependencyList & requires) { _requires = requires; }
+
+    const CDependencyList & provides() const { return _provides; }
+    void setProvides (const CDependencyList & provides) { _provides = provides; }
+
+    const CDependencyList & conflicts() const { return _conflicts; }
+    void setConflicts (const CDependencyList & conflicts) { _conflicts = conflicts; }
+
+    const CDependencyList & obsoletes() const { return _obsoletes; }
+    void setObsoletes (const CDependencyList & obsoletes) { _obsoletes = obsoletes; }
+
+    const CDependencyList & suggests() const { return _suggests; }
+    void setSuggests (const CDependencyList & suggests) { _suggests = suggests; }
+
+    const CDependencyList & recommends() const { return _recommends; }
+    void setRecommends (const CDependencyList & recommends) { _recommends = recommends; }
+
+    const CDependencyList & freshens() const { return _freshens; }
+    void setFreshens (const CDependencyList & freshens) { _freshens = freshens; }
+
+};
+
+///////////////////////////////////////////////////////////////////
+}; // namespace ZYPP
+///////////////////////////////////////////////////////////////////
+
+#endif // _ResItem_h
diff --git a/zypp/solver/detail/ResItemAndDependency.cc b/zypp/solver/detail/ResItemAndDependency.cc
new file mode 100644 (file)
index 0000000..22532b6
--- /dev/null
@@ -0,0 +1,103 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* ResItemAndDependency.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.
+ */
+
+#include "config.h"
+
+#include <y2util/stringutil.h>
+
+#include <zypp/solver/detail/ResItemAndDependency.h>
+#include <zypp/solver/detail/debug.h>
+
+///////////////////////////////////////////////////////////////////
+namespace ZYPP {
+//////////////////////////////////////////////////////////////////
+
+using namespace std;
+
+IMPL_BASE_POINTER(ResItemAndDependency);
+
+//---------------------------------------------------------------------------
+
+ResItemAndDependency::ResItemAndDependency (constResItemPtr resItem, constDependencyPtr dependency)
+    : _resItem(resItem)
+    , _dependency(dependency)
+{
+}
+
+//---------------------------------------------------------------------------
+
+string
+ResItemAndDependency::asString (bool full) const
+{
+    return toString (*this, full);
+}
+
+
+string
+ResItemAndDependency::toString ( const ResItemAndDependency & r_and_d, bool full )
+{
+    string res ("{");
+    res += r_and_d._resItem->asString(full);
+    res += ", ";
+    res += r_and_d._dependency->asString();
+    res += "}";
+    return res;
+}
+
+
+ostream &
+ResItemAndDependency::dumpOn (ostream & str) const
+{
+    str << asString();
+    return str;
+}
+
+
+ostream &
+operator<< (ostream & os, const ResItemAndDependency & r_and_d)
+{
+    return os << r_and_d.asString();
+}
+
+//---------------------------------------------------------------------------
+
+/* This function also checks channels in addition to just dep relations */
+/* FIXME: rc_resItem_dep_verify_relation already checks the channel */
+
+bool
+ResItemAndDependency::verifyRelation (constDependencyPtr dep) const
+{
+#if PHI
+    // don't check the channel, thereby honoring conflicts from installed resItems to to-be-installed resItems
+    return dep->verifyRelation (_dependency);
+#else
+    if (!dep->verifyRelation (_dependency)) {
+       return false;
+    }
+    if (getenv ("SPEW_DEP")) fprintf (stderr, "ResItemAndDependency::verifyRelation _resItem->channel() %s, dep->channel() %s\n", _resItem->channel()->asString().c_str(), dep->channel()->asString().c_str());
+    return _resItem->channel()->equals (dep->channel());
+#endif
+}
+
+///////////////////////////////////////////////////////////////////
+}; // namespace ZYPP
+///////////////////////////////////////////////////////////////////
+
diff --git a/zypp/solver/detail/ResItemAndDependency.h b/zypp/solver/detail/ResItemAndDependency.h
new file mode 100644 (file)
index 0000000..15abff8
--- /dev/null
@@ -0,0 +1,85 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* ResItemAndDependency.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 _ResItemAndDependency_h
+#define _ResItemAndDependency_h
+
+#include <iosfwd>
+#include <string>
+#include <list>
+#include <map>
+
+#include <zypp/solver/detail/ResItemAndDependencyPtr.h>
+#include <zypp/solver/detail/ResItem.h>
+#include <zypp/solver/detail/Dependency.h>
+
+///////////////////////////////////////////////////////////////////
+namespace ZYPP {
+//////////////////////////////////////////////////////////////////
+
+typedef std::multimap<const std::string, constResItemPtr> ResItemTable;
+typedef std::multimap<const std::string, constResItemAndDependencyPtr> ResItemAndDependencyTable;
+
+#if PHI
+typedef std::list <constResItemAndDependencyPtr> CResItemAndDependencyList;
+#endif
+
+///////////////////////////////////////////////////////////////////
+//
+//     CLASS NAME : ResItemAndDependency
+
+class ResItemAndDependency: public CountedRep {
+    REP_BODY(ResItemAndDependency);
+
+  private:
+    constResItemPtr _resItem;
+    constDependencyPtr _dependency;
+
+  public:
+
+    ResItemAndDependency (constResItemPtr resItem, constDependencyPtr dependency);
+    ~ResItemAndDependency () {}
+
+    // ---------------------------------- I/O
+
+    static std::string toString (const ResItemAndDependency & r_and_d, bool full = false);
+
+    virtual std::ostream & dumpOn(std::ostream & str ) const;
+
+    friend std::ostream& operator<<(std::ostream&, const ResItemAndDependency & r_and_d);
+
+    std::string asString (bool full = false) const;
+
+    // ---------------------------------- accessors
+
+    constResItemPtr resItem() const { return _resItem; }
+    constDependencyPtr dependency() const { return _dependency; }
+
+    // ---------------------------------- methods
+
+    bool verifyRelation (constDependencyPtr dep) const;
+};
+    
+///////////////////////////////////////////////////////////////////
+}; // namespace ZYPP
+///////////////////////////////////////////////////////////////////
+
+#endif // _ResItemAndDependency_h
diff --git a/zypp/solver/detail/ResItemAndDependencyPtr.h b/zypp/solver/detail/ResItemAndDependencyPtr.h
new file mode 100644 (file)
index 0000000..5a64c6f
--- /dev/null
@@ -0,0 +1,41 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* ResItemAndDependencyPtr.h
+ *
+ * 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 _ResItemAndDependencyPtr_h
+#define _ResItemAndDependencyPtr_h
+
+#include <y2util/RepDef.h>
+#include <zypp/solver/detail/WorldPtr.h>
+
+///////////////////////////////////////////////////////////////////
+namespace ZYPP {
+//////////////////////////////////////////////////////////////////
+
+///////////////////////////////////////////////////////////////////
+//     CLASS NAME : ResItemAndDependencyPtr
+//     CLASS NAME : constResItemAndDependencyPtr
+///////////////////////////////////////////////////////////////////
+DEFINE_BASE_POINTER(ResItemAndDependency);
+
+///////////////////////////////////////////////////////////////////
+}; // namespace ZYPP
+///////////////////////////////////////////////////////////////////
+
+#endif // _ResItemAndDependencyPtr_h
diff --git a/zypp/solver/detail/ResItemPtr.h b/zypp/solver/detail/ResItemPtr.h
new file mode 100644 (file)
index 0000000..f42dca6
--- /dev/null
@@ -0,0 +1,41 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* ResItemPtr.h
+ *
+ * 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 _ResItemPtr_h
+#define _ResItemPtr_h
+
+#include <y2util/RepDef.h>
+#include <zypp/solver/detail/SpecPtr.h>
+
+///////////////////////////////////////////////////////////////////
+namespace ZYPP {
+///////////////////////////////////////////////////////////////////
+
+///////////////////////////////////////////////////////////////////
+//     CLASS NAME : ResItemPtr
+//     CLASS NAME : constResItemPtr
+///////////////////////////////////////////////////////////////////
+DEFINE_DERIVED_POINTER(ResItem,Spec);
+
+///////////////////////////////////////////////////////////////////
+}; // namespace ZYPP
+///////////////////////////////////////////////////////////////////
+
+#endif // _ResItemPtr_h
diff --git a/zypp/solver/detail/Resolvable.cc b/zypp/solver/detail/Resolvable.cc
deleted file mode 100644 (file)
index dc4969e..0000000
+++ /dev/null
@@ -1,159 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* Resolvable.cc
- * Copyright (C) 2000-2002 Ximian, Inc.
- * Copyright (C) 2005 SUSE Linux Products GmbH
- *
- * Definition of 'resolvable'
- *
- * 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.
- */
-
-#include <y2util/stringutil.h>
-
-#include <zypp/solver/detail/Resolvable.h>
-
-///////////////////////////////////////////////////////////////////
-namespace ZYPP {
-//////////////////////////////////////////////////////////////////
-
-using namespace std;
-
-
-IMPL_DERIVED_POINTER(Resolvable,Spec);
-
-//---------------------------------------------------------------------------
-
-string
-Resolvable::asString ( bool full ) const
-{
-    return toString (*this, full);
-}
-
-
-string
-Resolvable::toString ( const Resolvable & resolvable, bool full )
-{
-    string res;
-
-    res += Spec::toString(resolvable);
-    if (!resolvable.channel()->system()) {
-       res += "[";
-       res += (resolvable.channel() == NULL) ? "(channel?)" : resolvable.channel()->name();
-       res += "]";
-    }
-    if (!full) return res;
-
-    if (resolvable.isInstalled()) res += "<installed>";
-    if (resolvable.local()) res += "<local>";
-
-    res += "FileSize ";
-    res += stringutil::numstring (resolvable.fileSize());
-    res += ", InstalledSize ";
-    res += stringutil::numstring (resolvable.installedSize());
-
-    if (!resolvable.requires().empty()) {
-       res += ", Requires: ";
-       res += Dependency::toString(resolvable.requires());
-    }
-
-    if (!resolvable.provides().empty()) {
-       res += ", Provides: ";
-       res += Dependency::toString(resolvable.provides());
-    }
-    if (!resolvable.conflicts().empty()) {
-       res += ", Conflicts: ";
-       res += Dependency::toString(resolvable.conflicts());
-    }
-    if (!resolvable.obsoletes().empty()) {
-       res += ", Obsoletes: ";
-       res += Dependency::toString(resolvable.obsoletes());
-    }
-
-    if (!resolvable.suggests().empty()) {
-       res += ", Suggests: ";
-       res += Dependency::toString(resolvable.suggests());
-    }
-    if (!resolvable.recommends().empty()) {
-       res += ", Recommends: ";
-       res += Dependency::toString(resolvable.recommends());
-    }
-    if (!resolvable.freshens().empty()) {
-       res += ", Freshens: ";
-       res += Dependency::toString(resolvable.freshens());
-    }
-    return res;
-}
-
-
-string
-Resolvable::toString ( const CResolvableList & rl, bool full )
-{
-    string res("[");
-    for (CResolvableList::const_iterator iter = rl.begin(); iter != rl.end(); iter++) {
-       if (iter != rl.begin()) res += ", ";
-       res += (*iter)->asString(full);
-    }
-    return res + "]";
-}
-
-
-ostream &
-Resolvable::dumpOn( ostream & str ) const
-{
-    str << asString();
-    return str;
-}
-
-
-ostream&
-operator<<( ostream& os, const Resolvable& edition)
-{
-    return os << edition.asString();
-}
-
-//---------------------------------------------------------------------------
-
-Resolvable::Resolvable (const Kind & kind, const string & name, int epoch, const string & version, const string & release, const Arch * arch)
-    :Spec (kind, name, epoch, version, release, arch)
-    , _channel (false)
-    , _installed (false)
-    , _local (false)
-    , _locked (false)
-    , _file_size (0)
-    , _installed_size (0)
-
-{
-}
-
-
-Resolvable::~Resolvable()
-{
-}
-
-//---------------------------------------------------------------------------
-
-bool
-Resolvable::isInstalled () const
-{
-    if (_channel != NULL
-       && _channel->system()) {
-       return true;
-    }
-    return false;
-}
-
-///////////////////////////////////////////////////////////////////
-}; // namespace ZYPP
-///////////////////////////////////////////////////////////////////
diff --git a/zypp/solver/detail/Resolvable.h b/zypp/solver/detail/Resolvable.h
deleted file mode 100644 (file)
index ae5af7d..0000000
+++ /dev/null
@@ -1,150 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* Resolvable.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 _Resolvable_h
-#define _Resolvable_h
-
-#include <list>
-#include <iosfwd>
-#include <string.h>
-#include <sys/types.h>
-
-#include <zypp/solver/detail/ResolvablePtr.h>
-#include <zypp/solver/detail/StoreWorldPtr.h>
-#include <zypp/solver/detail/Dependency.h>
-#include <zypp/solver/detail/Channel.h>
-
-///////////////////////////////////////////////////////////////////
-namespace ZYPP {
-//////////////////////////////////////////////////////////////////
-
-typedef std::list<ResolvablePtr> ResolvableList;
-typedef std::list<constResolvablePtr> CResolvableList;
-
-typedef bool (*ResolvableFn) (ResolvablePtr r, void *data);
-typedef bool (*CResolvableFn) (constResolvablePtr r, void *data);
-typedef bool (*ResolvablePairFn) (constResolvablePtr r1, constResolvablePtr r2, void *data);
-typedef bool (*ResolvableAndSpecFn) (constResolvablePtr r, constSpecPtr spec, void *data);
-typedef bool (*ResolvableAndDepFn) (constResolvablePtr r, constDependencyPtr dep, void *data);
-
-///////////////////////////////////////////////////////////////////
-//
-//     CLASS NAME : Resolvable
-/**
- *
- **/
-
-class Resolvable : public Spec {
-    REP_BODY(Resolvable);
-
-  private:
-    constChannelPtr _channel;
-
-    bool _installed;
-    bool _local;
-    bool _locked;
-
-    size_t _file_size;
-    size_t _installed_size;
-
-    CDependencyList _requires;
-    CDependencyList _provides;
-    CDependencyList _conflicts;
-    CDependencyList _obsoletes;
-
-    CDependencyList _suggests;
-    CDependencyList _recommends;
-    CDependencyList _freshens;
-
-  protected:
-
-    // ---------------------------------- accessors
-
-    void setLocal (bool local) { _local = local; }
-
-  public:
-
-    Resolvable(const Kind & kind, const std::string & name, int epoch = -1, const std::string & version = "", const std::string & release = "", const Arch * arch = Arch::Unknown);
-
-    Resolvable(const XmlNodePtr node);
-
-    virtual ~Resolvable();
-
-    // ---------------------------------- I/O
-
-    const XmlNodePtr asXmlNode (void) const;
-
-    static std::string toString ( const Resolvable & res, bool full = false );
-
-    static std::string toString ( const CResolvableList & reslist, bool full = false );
-
-    virtual std::ostream & dumpOn( std::ostream & str ) const;
-
-    friend std::ostream& operator<<( std::ostream & str, const Resolvable & str);
-
-    std::string asString ( bool full = false ) const;
-
-    // ---------------------------------- accessors
-
-    constChannelPtr channel() const { return _channel; }
-    void setChannel (constChannelPtr channel) { _channel = channel; }
-
-    bool locked () const { return _locked; }
-    void setLocked (bool locked) { _locked = locked; }
-
-    bool isInstalled() const;                          // does *not* reflect _installed
-    void setInstalled (bool installed) { _installed = installed; }
-
-    bool local() const { return _local; }
-
-    size_t fileSize() const { return _file_size; }
-    void setFileSize (size_t file_size) { _file_size = file_size; }
-
-    size_t installedSize() const { return _installed_size; }
-    void setInstalledSize (size_t installed_size) { _installed_size = installed_size; }
-
-    const CDependencyList & requires() const { return _requires; }
-    void setRequires (const CDependencyList & requires) { _requires = requires; }
-
-    const CDependencyList & provides() const { return _provides; }
-    void setProvides (const CDependencyList & provides) { _provides = provides; }
-
-    const CDependencyList & conflicts() const { return _conflicts; }
-    void setConflicts (const CDependencyList & conflicts) { _conflicts = conflicts; }
-
-    const CDependencyList & obsoletes() const { return _obsoletes; }
-    void setObsoletes (const CDependencyList & obsoletes) { _obsoletes = obsoletes; }
-
-    const CDependencyList & suggests() const { return _suggests; }
-    void setSuggests (const CDependencyList & suggests) { _suggests = suggests; }
-
-    const CDependencyList & recommends() const { return _recommends; }
-    void setRecommends (const CDependencyList & recommends) { _recommends = recommends; }
-
-    const CDependencyList & freshens() const { return _freshens; }
-    void setFreshens (const CDependencyList & freshens) { _freshens = freshens; }
-
-};
-
-///////////////////////////////////////////////////////////////////
-}; // namespace ZYPP
-///////////////////////////////////////////////////////////////////
-
-#endif // _Resolvable_h
diff --git a/zypp/solver/detail/ResolvableAndDependency.cc b/zypp/solver/detail/ResolvableAndDependency.cc
deleted file mode 100644 (file)
index 26e2354..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ResolvableAndDependency.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.
- */
-
-#include "config.h"
-
-#include <y2util/stringutil.h>
-
-#include <zypp/solver/detail/ResolvableAndDependency.h>
-#include <zypp/solver/detail/debug.h>
-
-///////////////////////////////////////////////////////////////////
-namespace ZYPP {
-//////////////////////////////////////////////////////////////////
-
-using namespace std;
-
-IMPL_BASE_POINTER(ResolvableAndDependency);
-
-//---------------------------------------------------------------------------
-
-ResolvableAndDependency::ResolvableAndDependency (constResolvablePtr resolvable, constDependencyPtr dependency)
-    : _resolvable(resolvable)
-    , _dependency(dependency)
-{
-}
-
-//---------------------------------------------------------------------------
-
-string
-ResolvableAndDependency::asString (bool full) const
-{
-    return toString (*this, full);
-}
-
-
-string
-ResolvableAndDependency::toString ( const ResolvableAndDependency & r_and_d, bool full )
-{
-    string res ("{");
-    res += r_and_d._resolvable->asString(full);
-    res += ", ";
-    res += r_and_d._dependency->asString();
-    res += "}";
-    return res;
-}
-
-
-ostream &
-ResolvableAndDependency::dumpOn (ostream & str) const
-{
-    str << asString();
-    return str;
-}
-
-
-ostream &
-operator<< (ostream & os, const ResolvableAndDependency & r_and_d)
-{
-    return os << r_and_d.asString();
-}
-
-//---------------------------------------------------------------------------
-
-/* This function also checks channels in addition to just dep relations */
-/* FIXME: rc_resolvable_dep_verify_relation already checks the channel */
-
-bool
-ResolvableAndDependency::verifyRelation (constDependencyPtr dep) const
-{
-#if PHI
-    // don't check the channel, thereby honoring conflicts from installed resolvables to to-be-installed resolvables
-    return dep->verifyRelation (_dependency);
-#else
-    if (!dep->verifyRelation (_dependency)) {
-       return false;
-    }
-    if (getenv ("SPEW_DEP")) fprintf (stderr, "ResolvableAndDependency::verifyRelation _resolvable->channel() %s, dep->channel() %s\n", _resolvable->channel()->asString().c_str(), dep->channel()->asString().c_str());
-    return _resolvable->channel()->equals (dep->channel());
-#endif
-}
-
-///////////////////////////////////////////////////////////////////
-}; // namespace ZYPP
-///////////////////////////////////////////////////////////////////
-
diff --git a/zypp/solver/detail/ResolvableAndDependency.h b/zypp/solver/detail/ResolvableAndDependency.h
deleted file mode 100644 (file)
index b3097c4..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ResolvableAndDependency.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 _ResolvableAndDependency_h
-#define _ResolvableAndDependency_h
-
-#include <iosfwd>
-#include <string>
-#include <list>
-#include <map>
-
-#include <zypp/solver/detail/ResolvableAndDependencyPtr.h>
-#include <zypp/solver/detail/Resolvable.h>
-#include <zypp/solver/detail/Dependency.h>
-
-///////////////////////////////////////////////////////////////////
-namespace ZYPP {
-//////////////////////////////////////////////////////////////////
-
-typedef std::multimap<const std::string, constResolvablePtr> ResolvableTable;
-typedef std::multimap<const std::string, constResolvableAndDependencyPtr> ResolvableAndDependencyTable;
-
-#if PHI
-typedef std::list <constResolvableAndDependencyPtr> CResolvableAndDependencyList;
-#endif
-
-///////////////////////////////////////////////////////////////////
-//
-//     CLASS NAME : ResolvableAndDependency
-
-class ResolvableAndDependency: public CountedRep {
-    REP_BODY(ResolvableAndDependency);
-
-  private:
-    constResolvablePtr _resolvable;
-    constDependencyPtr _dependency;
-
-  public:
-
-    ResolvableAndDependency (constResolvablePtr resolvable, constDependencyPtr dependency);
-    ~ResolvableAndDependency () {}
-
-    // ---------------------------------- I/O
-
-    static std::string toString (const ResolvableAndDependency & r_and_d, bool full = false);
-
-    virtual std::ostream & dumpOn(std::ostream & str ) const;
-
-    friend std::ostream& operator<<(std::ostream&, const ResolvableAndDependency & r_and_d);
-
-    std::string asString (bool full = false) const;
-
-    // ---------------------------------- accessors
-
-    constResolvablePtr resolvable() const { return _resolvable; }
-    constDependencyPtr dependency() const { return _dependency; }
-
-    // ---------------------------------- methods
-
-    bool verifyRelation (constDependencyPtr dep) const;
-};
-    
-///////////////////////////////////////////////////////////////////
-}; // namespace ZYPP
-///////////////////////////////////////////////////////////////////
-
-#endif // _ResolvableAndDependency_h
diff --git a/zypp/solver/detail/ResolvableAndDependencyPtr.h b/zypp/solver/detail/ResolvableAndDependencyPtr.h
deleted file mode 100644 (file)
index 8489583..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ResolvableAndDependencyPtr.h
- *
- * 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 _ResolvableAndDependencyPtr_h
-#define _ResolvableAndDependencyPtr_h
-
-#include <y2util/RepDef.h>
-#include <zypp/solver/detail/WorldPtr.h>
-
-///////////////////////////////////////////////////////////////////
-namespace ZYPP {
-//////////////////////////////////////////////////////////////////
-
-///////////////////////////////////////////////////////////////////
-//     CLASS NAME : ResolvableAndDependencyPtr
-//     CLASS NAME : constResolvableAndDependencyPtr
-///////////////////////////////////////////////////////////////////
-DEFINE_BASE_POINTER(ResolvableAndDependency);
-
-///////////////////////////////////////////////////////////////////
-}; // namespace ZYPP
-///////////////////////////////////////////////////////////////////
-
-#endif // _ResolvableAndDependencyPtr_h
diff --git a/zypp/solver/detail/ResolvablePtr.h b/zypp/solver/detail/ResolvablePtr.h
deleted file mode 100644 (file)
index 0def628..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ResolvablePtr.h
- *
- * 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 _ResolvablePtr_h
-#define _ResolvablePtr_h
-
-#include <y2util/RepDef.h>
-#include <zypp/solver/detail/SpecPtr.h>
-
-///////////////////////////////////////////////////////////////////
-namespace ZYPP {
-///////////////////////////////////////////////////////////////////
-
-///////////////////////////////////////////////////////////////////
-//     CLASS NAME : ResolvablePtr
-//     CLASS NAME : constResolvablePtr
-///////////////////////////////////////////////////////////////////
-DEFINE_DERIVED_POINTER(Resolvable,Spec);
-
-///////////////////////////////////////////////////////////////////
-}; // namespace ZYPP
-///////////////////////////////////////////////////////////////////
-
-#endif // _ResolvablePtr_h
index 264677336b1db09183a5448f13ff7e22c054cd5f..c2ffc3b045b9fb77843553707d0b046f7a72150b 100644 (file)
@@ -22,7 +22,7 @@
 #include <zypp/solver/detail/Resolver.h>
 #include <zypp/solver/detail/ResolverContext.h>
 #include <zypp/solver/detail/ResolverQueue.h>
-#include <zypp/solver/detail/Resolvable.h>
+#include <zypp/solver/detail/ResItem.h>
 #include <zypp/solver/detail/Version.h>
 #include <zypp/solver/detail/World.h>
 #include <zypp/solver/detail/StoreWorld.h>
@@ -104,38 +104,38 @@ Resolver::addSubscribedChannel (constChannelPtr channel)
 }
 
 void
-Resolver::addResolvableToInstall (constResolvablePtr resolvable)
+Resolver::addResItemToInstall (constResItemPtr resItem)
 {
-    _resolvables_to_install.push_front (resolvable);
+    _resItems_to_install.push_front (resItem);
 }
 
 void
-Resolver::addResolvablesToInstallFromList (CResolvableList & rl)
+Resolver::addResItemsToInstallFromList (CResItemList & rl)
 {
-    for (CResolvableList::const_iterator iter = rl.begin(); iter != rl.end(); iter++) {
-       addResolvableToInstall (*iter);
+    for (CResItemList::const_iterator iter = rl.begin(); iter != rl.end(); iter++) {
+       addResItemToInstall (*iter);
     }
 }
 
 void
-Resolver::addResolvableToRemove (constResolvablePtr resolvable)
+Resolver::addResItemToRemove (constResItemPtr resItem)
 {
-    _resolvables_to_remove.push_front (resolvable);
+    _resItems_to_remove.push_front (resItem);
 }
 
 void
-Resolver::addResolvablesToRemoveFromList (CResolvableList & rl)
+Resolver::addResItemsToRemoveFromList (CResItemList & rl)
 {
-    for (CResolvableList::const_iterator iter = rl.begin(); iter != rl.end(); iter++) {
-       addResolvableToRemove (*iter);
+    for (CResItemList::const_iterator iter = rl.begin(); iter != rl.end(); iter++) {
+       addResItemToRemove (*iter);
     }
 }
 
 void
-Resolver::addResolvableToVerify (constResolvablePtr resolvable)
+Resolver::addResItemToVerify (constResItemPtr resItem)
 {
-    _resolvables_to_verify.push_front (resolvable);
-    _resolvables_to_verify.sort ();                    //(GCompareFunc) rc_resolvable_compare_name);
+    _resItems_to_verify.push_front (resItem);
+    _resItems_to_verify.sort ();                       //(GCompareFunc) rc_resItem_compare_name);
 }
 
 void
@@ -154,11 +154,11 @@ Resolver::addExtraConflict (constDependencyPtr dependency)
 //---------------------------------------------------------------------------
 
 static bool
-verify_system_cb (constResolvablePtr resolvable, void *data)
+verify_system_cb (constResItemPtr resItem, void *data)
 {
     Resolver *resolver  = (Resolver *)data;
 
-    resolver->addResolvableToVerify (resolvable);
+    resolver->addResItemToVerify (resItem);
 
     return true;
 }
@@ -168,7 +168,7 @@ void
 Resolver::verifySystem (void)
 {
     if (getenv ("RC_SPEW")) fprintf (stderr, "Resolver::verifySystem()\n");
-    world()->foreachResolvable (new Channel(CHANNEL_TYPE_SYSTEM), verify_system_cb, this);
+    world()->foreachResItem (new Channel(CHANNEL_TYPE_SYSTEM), verify_system_cb, this);
 
     _verifying = true;
 
@@ -180,11 +180,11 @@ Resolver::verifySystem (void)
       all but one of the duplicates.
     */
 
-    for (CResolvableList::const_iterator i0 = _resolvables_to_verify.begin(); i0 != _resolvables_to_verify.end();) {
-       CResolvableList::const_iterator i1 = i0;
+    for (CResItemList::const_iterator i0 = _resItems_to_verify.begin(); i0 != _resItems_to_verify.end();) {
+       CResItemList::const_iterator i1 = i0;
        i1++;
-       CResolvableList::const_iterator i2 = i1;
-       for (; i1 != _resolvables_to_verify.end()&& ! (*i0)->compareName (*i1); i1++) {
+       CResItemList::const_iterator i2 = i1;
+       for (; i1 != _resItems_to_verify.end()&& ! (*i0)->compareName (*i1); i1++) {
            //empty
        }
 
@@ -193,11 +193,11 @@ Resolver::verifySystem (void)
 
            branch_item = new QueueItemBranch(world());
 
-           for (CResolvableList::const_iterator i = i0; i != i1; i++) {
+           for (CResItemList::const_iterator i = i0; i != i1; i++) {
 
                QueueItemGroupPtr grp_item = new QueueItemGroup(world());
 
-               for (CResolvableList::const_iterator j = i0; j != i1; j++) {
+               for (CResItemList::const_iterator j = i0; j != i1; j++) {
                    constPackagePtr dup_pkg = *j;
                    QueueItemUninstallPtr uninstall_item;
 
@@ -234,15 +234,15 @@ Resolver::resolveDependencies (void)
 
     time_t t_start, t_now;
     bool extremely_noisy = getenv ("RC_SPEW") != NULL;
-    bool have_local_resolvables = false;
+    bool have_local_resItems = false;
 
     if (extremely_noisy) fprintf (stderr, "Resolver::resolveDependencies()\n");
 
     /* Walk through are list of to-be-installed packages and see if any of them are local. */
 
-    for (CResolvableList::const_iterator iter = _resolvables_to_install.begin(); iter != _resolvables_to_install.end(); iter++) {
+    for (CResItemList::const_iterator iter = _resItems_to_install.begin(); iter != _resItems_to_install.end(); iter++) {
        if ((*iter)->local()) {
-           have_local_resolvables = true;
+           have_local_resItems = true;
            break;
        }
     }
@@ -253,11 +253,11 @@ Resolver::resolveDependencies (void)
 
     ChannelPtr local_channel = NULL;
 
-    if (have_local_resolvables) {
+    if (have_local_resItems) {
        local_multiworld = new MultiWorld();
        local_world = new StoreWorld();
 
-       local_channel = new Channel ("", "Local Resolvables", "@local", "");
+       local_channel = new Channel ("", "Local ResItems", "@local", "");
 
        local_world->addChannel (local_channel);
 
@@ -288,26 +288,26 @@ Resolver::resolveDependencies (void)
     }
     _initial_items.clear();
 
-    for (CResolvableList::const_iterator iter = _resolvables_to_install.begin(); iter != _resolvables_to_install.end(); iter++) {
-       constResolvablePtr r = *iter;
+    for (CResItemList::const_iterator iter = _resItems_to_install.begin(); iter != _resItems_to_install.end(); iter++) {
+       constResItemPtr r = *iter;
 
        /* Add local packages to our dummy channel. */
        if (r->local()) {
            assert (local_channel != NULL);
-           ResolvablePtr r1 = ResolvablePtr::cast_away_const (r);
+           ResItemPtr r1 = ResItemPtr::cast_away_const (r);
            r1->setChannel (local_channel);
-           local_world->addResolvable (r);
+           local_world->addResItem (r);
        }
 
-       initial_queue->addResolvableToInstall (r);
+       initial_queue->addResItemToInstall (r);
     }
 
-    for (CResolvableList::const_iterator iter = _resolvables_to_remove.begin(); iter != _resolvables_to_remove.end(); iter++) {
-       initial_queue->addResolvableToRemove (*iter, true /* remove-only mode */);
+    for (CResItemList::const_iterator iter = _resItems_to_remove.begin(); iter != _resItems_to_remove.end(); iter++) {
+       initial_queue->addResItemToRemove (*iter, true /* remove-only mode */);
     }
 
-    for (CResolvableList::const_iterator iter = _resolvables_to_verify.begin(); iter != _resolvables_to_verify.end(); iter++) {
-       initial_queue->addResolvableToVerify (*iter);
+    for (CResItemList::const_iterator iter = _resItems_to_verify.begin(); iter != _resItems_to_verify.end(); iter++) {
+       initial_queue->addResItemToVerify (*iter);
     }
 
     for (CDependencyList::const_iterator iter = _extra_deps.begin(); iter != _extra_deps.end(); iter++) {
index 50aa6ff5a196caf1ff135963d955441b318329d2..9b69c0b4137fa3cc346bf55f0a4a6f94bb1abfc4 100644 (file)
@@ -28,7 +28,7 @@
 
 #include <zypp/solver/detail/ResolverPtr.h>
 #include <zypp/solver/detail/ResolverQueue.h>
-#include <zypp/solver/detail/Resolvable.h>
+#include <zypp/solver/detail/ResItem.h>
 #include <zypp/solver/detail/Dependency.h>
 #include <zypp/solver/detail/Channel.h>
 
@@ -54,9 +54,9 @@ class Resolver : public CountedRep {
     bool _verifying;
 
     QueueItemList _initial_items;
-    CResolvableList _resolvables_to_install;
-    CResolvableList _resolvables_to_remove;
-    CResolvableList _resolvables_to_verify;
+    CResItemList _resItems_to_install;
+    CResItemList _resItems_to_remove;
+    CResItemList _resItems_to_verify;
 
     CDependencyList _extra_deps;
     CDependencyList _extra_conflicts;
@@ -109,13 +109,13 @@ class Resolver : public CountedRep {
     void setCurrentChannel (constChannelPtr channel) { _current_channel = channel; }
     void addSubscribedChannel (constChannelPtr channel);
 
-    void addResolvableToInstall (constResolvablePtr resolvable);
-    void addResolvablesToInstallFromList (CResolvableList & rl);
+    void addResItemToInstall (constResItemPtr resItem);
+    void addResItemsToInstallFromList (CResItemList & rl);
 
-    void addResolvableToRemove (constResolvablePtr resolvable);
-    void addResolvablesToRemoveFromList (CResolvableList & rl);
+    void addResItemToRemove (constResItemPtr resItem);
+    void addResItemsToRemoveFromList (CResItemList & rl);
 
-    void addResolvableToVerify (constResolvablePtr resolvable);
+    void addResItemToVerify (constResItemPtr resItem);
 
     void addExtraDependency (constDependencyPtr dependency);
     void addExtraConflict (constDependencyPtr dependency);
index 93c600eca9edc8682b11e13b862c5abb6368a42f..8bac90182b4f0d950d20b662751f31e4b05a4b05 100644 (file)
@@ -38,7 +38,7 @@ IMPL_BASE_POINTER(ResolverContext);
 //---------------------------------------------------------------------------
 
 string
-ResolverContext::toString (const ResolvableStatus & status)
+ResolverContext::toString (const ResItemStatus & status)
 {
     string ret;
     switch (status) {
@@ -112,7 +112,7 @@ ResolverContext::ResolverContext (ResolverContextPtr parent)
     : _parent (parent)
     , _refs (0)
     , _world (NULL)
-    , _last_checked_resolvable (NULL)
+    , _last_checked_resItem (NULL)
     , _last_checked_status (RESOLVABLE_STATUS_UNKNOWN)
     , _download_size (0)
     , _install_size (0)
@@ -156,34 +156,34 @@ ResolverContext::world (void) const
 
 
 void
-ResolverContext::setStatus (constResolvablePtr resolvable, ResolvableStatus status)
+ResolverContext::setStatus (constResItemPtr resItem, ResItemStatus status)
 {
     if (_invalid) return;
 
-    ResolvableStatus old_status = getStatus (resolvable);
+    ResItemStatus old_status = getStatus (resItem);
 
     if (status != old_status) {
-       _status[resolvable] = status;
+       _status[resItem] = status;
     }
 
-    // Update our cache if we changed the status of the last checked resolvable.
+    // Update our cache if we changed the status of the last checked resItem.
 
-    if (_last_checked_resolvable == resolvable)
+    if (_last_checked_resItem == resItem)
        _last_checked_status = status;
 }
 
 
-ResolvableStatus
-ResolverContext::getStatus (constResolvablePtr resolvable)
+ResItemStatus
+ResolverContext::getStatus (constResItemPtr resItem)
 {
-    ResolvableStatus status = RESOLVABLE_STATUS_UNKNOWN;
+    ResItemStatus status = RESOLVABLE_STATUS_UNKNOWN;
 
-    // We often end up getting the status of the same resolvable several times
-    // in a row.  By caching the status of the last checked resolvable, we can
+    // We often end up getting the status of the same resItem several times
+    // in a row.  By caching the status of the last checked resItem, we can
     // in practice eliminate the need for any hash table lookups in about
     // 50% of our calls to get_status.
 
-    if (resolvable == _last_checked_resolvable)
+    if (resItem == _last_checked_resItem)
     {
        return _last_checked_status;
     }
@@ -192,7 +192,7 @@ ResolverContext::getStatus (constResolvablePtr resolvable)
 
     while (status == RESOLVABLE_STATUS_UNKNOWN
           && context != NULL) {
-       StatusTable::const_iterator pos = context->_status.find (resolvable);
+       StatusTable::const_iterator pos = context->_status.find (resItem);
        if (pos != context->_status.end()) {
            status = (*pos).second;
        }
@@ -200,10 +200,10 @@ ResolverContext::getStatus (constResolvablePtr resolvable)
     }
 
     if (status == RESOLVABLE_STATUS_UNKNOWN) {
-       status = resolvable->isInstalled() ? RESOLVABLE_STATUS_INSTALLED : RESOLVABLE_STATUS_UNINSTALLED;
+       status = resItem->isInstalled() ? RESOLVABLE_STATUS_INSTALLED : RESOLVABLE_STATUS_UNINSTALLED;
     }
 
-    _last_checked_resolvable = resolvable;
+    _last_checked_resItem = resItem;
     _last_checked_status = status;
 
     return status;
@@ -211,30 +211,30 @@ ResolverContext::getStatus (constResolvablePtr resolvable)
 
 
 bool
-ResolverContext::installResolvable (constResolvablePtr resolvable, bool is_soft, int other_penalty)
+ResolverContext::installResItem (constResItemPtr resItem, bool is_soft, int other_penalty)
 {
-    ResolvableStatus status, new_status;
+    ResItemStatus status, new_status;
     int priority;
     std::string msg;
 
-    status = getStatus (resolvable);
-    if (getenv ("RC_SPEW")) fprintf (stderr, "ResolverContext[%p]::installResolvable(<%s>%s)\n", this, ResolverContext::toString(status).c_str(), resolvable->asString().c_str());
+    status = getStatus (resItem);
+    if (getenv ("RC_SPEW")) fprintf (stderr, "ResolverContext[%p]::installResItem(<%s>%s)\n", this, ResolverContext::toString(status).c_str(), resItem->asString().c_str());
 
-    if (resolvable_status_is_to_be_uninstalled (status)
+    if (resItem_status_is_to_be_uninstalled (status)
        && status != RESOLVABLE_STATUS_TO_BE_UNINSTALLED_DUE_TO_UNLINK) {
-       msg = string ("Can't install ") + ((constSpecPtr)resolvable)->asString() + " since it is already marked as needing to be uninstalled";
+       msg = string ("Can't install ") + ((constSpecPtr)resItem)->asString() + " since it is already marked as needing to be uninstalled";
 
-       addErrorString (resolvable, msg);
+       addErrorString (resItem, msg);
        return false;
     }
 
-    if (resolvable_status_is_to_be_installed (status)) {
+    if (resItem_status_is_to_be_installed (status)) {
        return true;
     }
 
-    if (isParallelInstall (resolvable)) {
-       msg = string ("Can't install ") + ((constSpecPtr)resolvable)->asString() + ", since a resolvable of the same name is already marked as needing to be installed";
-       addErrorString (resolvable, msg);
+    if (isParallelInstall (resItem)) {
+       msg = string ("Can't install ") + ((constSpecPtr)resItem)->asString() + ", since a resItem of the same name is already marked as needing to be installed";
+       addErrorString (resItem, msg);
        return false;
     }
 
@@ -245,17 +245,17 @@ ResolverContext::installResolvable (constResolvablePtr resolvable, bool is_soft,
     else
        new_status = RESOLVABLE_STATUS_TO_BE_INSTALLED;
 
-    setStatus (resolvable, new_status);
+    setStatus (resItem, new_status);
 
     if (status == RESOLVABLE_STATUS_UNINSTALLED) {
        /* FIXME: Incomplete */
-       _download_size += resolvable->fileSize();
-       _install_size += resolvable->installedSize();
+       _download_size += resItem->fileSize();
+       _install_size += resItem->installedSize();
 
-       if (resolvable->local())
+       if (resItem->local())
            priority = 0;
        else {
-           priority = getChannelPriority (resolvable->channel ());
+           priority = getChannelPriority (resItem->channel ());
        }
 
        if (priority < _min_priority) _min_priority = priority;
@@ -270,35 +270,35 @@ ResolverContext::installResolvable (constResolvablePtr resolvable, bool is_soft,
 
 
 bool
-ResolverContext::upgradeResolvable (constResolvablePtr resolvable, constResolvablePtr old_resolvable, bool is_soft, int other_penalty)
+ResolverContext::upgradeResItem (constResItemPtr resItem, constResItemPtr old_resItem, bool is_soft, int other_penalty)
 {
-    ResolvableStatus status;
+    ResItemStatus status;
     int priority;
 
-    if (getenv ("RC_SPEW")) fprintf (stderr, "ResolverContext[%p]::upgradeResolvable(%s upgrades %s)\n", this, resolvable->asString().c_str(), old_resolvable->asString().c_str());
+    if (getenv ("RC_SPEW")) fprintf (stderr, "ResolverContext[%p]::upgradeResItem(%s upgrades %s)\n", this, resItem->asString().c_str(), old_resItem->asString().c_str());
 
-    status = getStatus (resolvable);
+    status = getStatus (resItem);
 
-    if (resolvable_status_is_to_be_uninstalled (status))
+    if (resItem_status_is_to_be_uninstalled (status))
        return false;
 
-    if (resolvable_status_is_to_be_installed (status))
+    if (resItem_status_is_to_be_installed (status))
        return true;
 
-    setStatus (resolvable, is_soft ? RESOLVABLE_STATUS_TO_BE_INSTALLED_SOFT : RESOLVABLE_STATUS_TO_BE_INSTALLED);
+    setStatus (resItem, is_soft ? RESOLVABLE_STATUS_TO_BE_INSTALLED_SOFT : RESOLVABLE_STATUS_TO_BE_INSTALLED);
 
     if (status == RESOLVABLE_STATUS_UNINSTALLED) {
       
-       _download_size += resolvable->fileSize();
+       _download_size += resItem->fileSize();
 
        // FIXME: Incomplete
        // We should change installed_size to reflect the difference in
        //   installed size between the old and new versions.
 
-       if (resolvable->local())
+       if (resItem->local())
            priority = 0;
        else {
-           priority = getChannelPriority (resolvable->channel());
+           priority = getChannelPriority (resItem->channel());
        }
 
        if (priority < _min_priority) _min_priority = priority;
@@ -312,32 +312,32 @@ ResolverContext::upgradeResolvable (constResolvablePtr resolvable, constResolvab
 
 
 bool
-ResolverContext::uninstallResolvable (constResolvablePtr resolvable, bool part_of_upgrade, bool due_to_obsolete, bool due_to_unlink)
+ResolverContext::uninstallResItem (constResItemPtr resItem, bool part_of_upgrade, bool due_to_obsolete, bool due_to_unlink)
 {
-    ResolvableStatus status, new_status;
+    ResItemStatus status, new_status;
     std::string msg;
 
-    if (getenv ("RC_SPEW")) fprintf (stderr, "ResolverContext[%p]::uninstallResolvable(%s %s %s %s)\n", this, resolvable->asString().c_str(), part_of_upgrade ? "part_of_upgrade" : "", due_to_obsolete ? "due_to_obsolete": "", due_to_unlink ? "due_to_unlink" : "");
+    if (getenv ("RC_SPEW")) fprintf (stderr, "ResolverContext[%p]::uninstallResItem(%s %s %s %s)\n", this, resItem->asString().c_str(), part_of_upgrade ? "part_of_upgrade" : "", due_to_obsolete ? "due_to_obsolete": "", due_to_unlink ? "due_to_unlink" : "");
 
     assert (! (due_to_obsolete && due_to_unlink));
 
-    status = getStatus (resolvable);
+    status = getStatus (resItem);
 
     if (status == RESOLVABLE_STATUS_TO_BE_INSTALLED) {
-       msg = ((constSpecPtr)resolvable)->asString() + " is scheduled to be installed, but this is not possible because of dependency problems.";
-       addErrorString (resolvable, msg);
+       msg = ((constSpecPtr)resItem)->asString() + " is scheduled to be installed, but this is not possible because of dependency problems.";
+       addErrorString (resItem, msg);
        return false;
     }
 
-    if (resolvable_status_is_to_be_uninstalled (status)
+    if (resItem_status_is_to_be_uninstalled (status)
        && status != RESOLVABLE_STATUS_TO_BE_UNINSTALLED_DUE_TO_UNLINK) {
        return true;
     }
     
     if (status == RESOLVABLE_STATUS_UNINSTALLED
        || status == RESOLVABLE_STATUS_TO_BE_UNINSTALLED_DUE_TO_UNLINK) {
-       msg = string ("Marking resolvable ") + ((constSpecPtr)resolvable)->asString() + " as uninstallable";
-       addInfoString (resolvable, RESOLVER_INFO_PRIORITY_VERBOSE, msg);
+       msg = string ("Marking resItem ") + ((constSpecPtr)resItem)->asString() + " as uninstallable";
+       addInfoString (resItem, RESOLVER_INFO_PRIORITY_VERBOSE, msg);
     }
 
 
@@ -345,7 +345,7 @@ ResolverContext::uninstallResolvable (constResolvablePtr resolvable, bool part_o
     else if (due_to_unlink)    new_status = RESOLVABLE_STATUS_TO_BE_UNINSTALLED_DUE_TO_UNLINK;
     else                       new_status = RESOLVABLE_STATUS_TO_BE_UNINSTALLED;
 
-    setStatus (resolvable, new_status);
+    setStatus (resItem, new_status);
     
     if (status == RESOLVABLE_STATUS_INSTALLED) {
        /* FIXME: incomplete */
@@ -356,29 +356,29 @@ ResolverContext::uninstallResolvable (constResolvablePtr resolvable, bool part_o
 
 
 bool
-ResolverContext::resolvableIsPresent (constResolvablePtr resolvable)
+ResolverContext::resItemIsPresent (constResItemPtr resItem)
 {
-    ResolvableStatus status;
+    ResItemStatus status;
 
-    status = getStatus (resolvable);
-//fprintf (stderr, "ResolverContext::resolvableIsPresent(<%s>%s)\n", ResolverContext::toString(status).c_str(), resolvable->asString().c_str());
+    status = getStatus (resItem);
+//fprintf (stderr, "ResolverContext::resItemIsPresent(<%s>%s)\n", ResolverContext::toString(status).c_str(), resItem->asString().c_str());
     if (status == RESOLVABLE_STATUS_UNKNOWN)
        return false;
 
-    return (status == RESOLVABLE_STATUS_INSTALLED) || resolvable_status_is_to_be_installed (status);
+    return (status == RESOLVABLE_STATUS_INSTALLED) || resItem_status_is_to_be_installed (status);
 }
 
 
 bool
-ResolverContext::resolvableIsAbsent (constResolvablePtr resolvable)
+ResolverContext::resItemIsAbsent (constResItemPtr resItem)
 {
-    ResolvableStatus status;
+    ResItemStatus status;
 
-    status = getStatus (resolvable);
+    status = getStatus (resItem);
     if (status == RESOLVABLE_STATUS_UNKNOWN)
        return false;
 
-    return status == RESOLVABLE_STATUS_UNINSTALLED || resolvable_status_is_to_be_uninstalled (status);
+    return status == RESOLVABLE_STATUS_UNINSTALLED || resItem_status_is_to_be_uninstalled (status);
 }
 
 
@@ -386,7 +386,7 @@ ResolverContext::resolvableIsAbsent (constResolvablePtr resolvable)
 // marked
 
 void
-ResolverContext::foreachMarkedResolvable (MarkedResolvableFn fn, void *data) const
+ResolverContext::foreachMarkedResItem (MarkedResItemFn fn, void *data) const
 {
     constResolverContextPtr context = this;
     while (context) {
@@ -402,19 +402,19 @@ ResolverContext::foreachMarkedResolvable (MarkedResolvableFn fn, void *data) con
 // collect
 
 static void
-marked_resolvable_collector (constResolvablePtr resolvable, ResolvableStatus status, void *data)
+marked_resItem_collector (constResItemPtr resItem, ResItemStatus status, void *data)
 {
-    CResolvableList *rl = (CResolvableList *)data;
-    rl->push_back (resolvable);
+    CResItemList *rl = (CResItemList *)data;
+    rl->push_back (resItem);
 }
 
 
-CResolvableList
-ResolverContext::getMarkedResolvables (void) const
+CResItemList
+ResolverContext::getMarkedResItems (void) const
 {
-    CResolvableList rl;
+    CResItemList rl;
 
-    foreachMarkedResolvable (marked_resolvable_collector, &rl);
+    foreachMarkedResItem (marked_resItem_collector, &rl);
 
     return rl;
 }
@@ -424,54 +424,54 @@ ResolverContext::getMarkedResolvables (void) const
 
 typedef struct {
     WorldPtr world;
-    MarkedResolvableFn fn;
-    CResolvableList *rl;
+    MarkedResItemFn fn;
+    CResItemList *rl;
     int count;
 } InstallInfo;
 
 static void
-install_pkg_cb (constResolvablePtr resolvable, ResolvableStatus status, void *data)
+install_pkg_cb (constResItemPtr resItem, ResItemStatus status, void *data)
 {
     InstallInfo *info = (InstallInfo *)data;
-    if (resolvable_status_is_to_be_installed (status)
-       && ! resolvable->isInstalled ()
-       && info->world->findInstalledResolvable (resolvable) == NULL) {
+    if (resItem_status_is_to_be_installed (status)
+       && ! resItem->isInstalled ()
+       && info->world->findInstalledResItem (resItem) == NULL) {
 
-       if (info->fn) info->fn (resolvable, status, info->rl);
+       if (info->fn) info->fn (resItem, status, info->rl);
        ++info->count;
     }
 }
 
 
 int
-ResolverContext::foreachInstall (MarkedResolvableFn fn, void *data) const
+ResolverContext::foreachInstall (MarkedResItemFn fn, void *data) const
 {
-    CResolvableList *rl = (CResolvableList *)data;
+    CResItemList *rl = (CResItemList *)data;
     InstallInfo info = { world(), fn, rl, 0 };
 
-    foreachMarkedResolvable (install_pkg_cb, (void *)&info);
+    foreachMarkedResItem (install_pkg_cb, (void *)&info);
 
     return info.count;
 }
 
 
 static void
-context_resolvable_collector (constResolvablePtr resolvable, ResolvableStatus status, void *data)
+context_resItem_collector (constResItemPtr resItem, ResItemStatus status, void *data)
 {
-    CResolvableList *rl = (CResolvableList *)data;
-    if (resolvable_status_is_to_be_installed (status)
-       || (resolvable_status_is_to_be_uninstalled (status) && resolvable->isInstalled ())) {
-       rl->push_front (resolvable);
+    CResItemList *rl = (CResItemList *)data;
+    if (resItem_status_is_to_be_installed (status)
+       || (resItem_status_is_to_be_uninstalled (status) && resItem->isInstalled ())) {
+       rl->push_front (resItem);
     } 
 }
 
 
-CResolvableList
+CResItemList
 ResolverContext::getInstalls (void) const
 {
-    CResolvableList rl;
+    CResItemList rl;
 
-    foreachInstall (context_resolvable_collector, (void *)&rl);
+    foreachInstall (context_resItem_collector, (void *)&rl);
 
     return rl;
 }
@@ -482,28 +482,28 @@ ResolverContext::getInstalls (void) const
 
 typedef struct {
     WorldPtr world;
-    MarkedResolvablePairFn fn;
+    MarkedResItemPairFn fn;
     void *data;
     ResolverContextPtr context;
     int count;
 } UpgradeInfo;
 
 static void
-upgrade_pkg_cb (constResolvablePtr resolvable, ResolvableStatus status, void *data)
+upgrade_pkg_cb (constResItemPtr resItem, ResItemStatus status, void *data)
 {
     UpgradeInfo *info = (UpgradeInfo *)data;
 
-    constResolvablePtr to_be_upgraded;
-    ResolvableStatus tbu_status;
+    constResItemPtr to_be_upgraded;
+    ResItemStatus tbu_status;
 
-    if (resolvable_status_is_to_be_installed (status)
-       && ! resolvable->isInstalled ()) {
+    if (resItem_status_is_to_be_installed (status)
+       && ! resItem->isInstalled ()) {
        
-       to_be_upgraded = info->world->findInstalledResolvable (resolvable);
+       to_be_upgraded = info->world->findInstalledResItem (resItem);
        if (to_be_upgraded) {
            tbu_status = info->context->getStatus (to_be_upgraded);
            if (info->fn) {
-               info->fn (resolvable, status, to_be_upgraded, tbu_status, info->data);
+               info->fn (resItem, status, to_be_upgraded, tbu_status, info->data);
            }
            ++info->count;
        }
@@ -512,30 +512,30 @@ upgrade_pkg_cb (constResolvablePtr resolvable, ResolvableStatus status, void *da
 
 
 int
-ResolverContext::foreachUpgrade (MarkedResolvablePairFn fn, void *data)
+ResolverContext::foreachUpgrade (MarkedResItemPairFn fn, void *data)
 {
     UpgradeInfo info = { world(), fn, data, this, 0 };
 
-    foreachMarkedResolvable (upgrade_pkg_cb, (void *)&info);
+    foreachMarkedResItem (upgrade_pkg_cb, (void *)&info);
 
     return info.count;
 }
 
 
 static void
-pair_resolvable_collector (constResolvablePtr resolvable, ResolvableStatus status, constResolvablePtr old, ResolvableStatus old_status, void *data)
+pair_resItem_collector (constResItemPtr resItem, ResItemStatus status, constResItemPtr old, ResItemStatus old_status, void *data)
 {
-    CResolvableList *rl = (CResolvableList *)data;
-    rl->push_back (resolvable);
+    CResItemList *rl = (CResItemList *)data;
+    rl->push_back (resItem);
 }
 
 
-CResolvableList
+CResItemList
 ResolverContext::getUpgrades (void)
 {
-    CResolvableList rl;
+    CResItemList rl;
 
-    foreachUpgrade (pair_resolvable_collector, (void *)&rl);
+    foreachUpgrade (pair_resItem_collector, (void *)&rl);
 
     return rl;
 }
@@ -544,60 +544,60 @@ ResolverContext::getUpgrades (void)
 //---------------------------------------------------------------------------
 // uninstall
 
-typedef std::map<std::string,constResolvablePtr> UpgradeTable;
+typedef std::map<std::string,constResItemPtr> UpgradeTable;
 
 typedef struct {
-    MarkedResolvableFn fn;
-    CResolvableList *rl;
+    MarkedResItemFn fn;
+    CResItemList *rl;
     UpgradeTable upgrade_hash;
     int count;
 } UninstallInfo;
 
 static void
-uninstall_pkg_cb (constResolvablePtr resolvable, ResolvableStatus status, void *data)
+uninstall_pkg_cb (constResItemPtr resItem, ResItemStatus status, void *data)
 {
     UninstallInfo *info = (UninstallInfo *)data;
 
-    UpgradeTable::const_iterator pos = info->upgrade_hash.find(resolvable->name());
+    UpgradeTable::const_iterator pos = info->upgrade_hash.find(resItem->name());
 
-    if (resolvable_status_is_to_be_uninstalled (status)
+    if (resItem_status_is_to_be_uninstalled (status)
        && pos == info->upgrade_hash.end()) {
        if (info->fn)
-           info->fn (resolvable, status, info->rl);
+           info->fn (resItem, status, info->rl);
        ++info->count;
     }
 }
 
 static void
-build_upgrade_hash_cb (constResolvablePtr resolvable_add, ResolvableStatus status_add, constResolvablePtr resolvable_del, ResolvableStatus status_del, void *data)
+build_upgrade_hash_cb (constResItemPtr resItem_add, ResItemStatus status_add, constResItemPtr resItem_del, ResItemStatus status_del, void *data)
 {
     UpgradeTable *upgrade_hash = (UpgradeTable *)data;
-    (*upgrade_hash)[resolvable_del->name()] = resolvable_del;
+    (*upgrade_hash)[resItem_del->name()] = resItem_del;
 }
 
 
 int
-ResolverContext::foreachUninstall (MarkedResolvableFn fn, void *data)
+ResolverContext::foreachUninstall (MarkedResItemFn fn, void *data)
 {
     UninstallInfo info;                // inits upgrade_hash
 
     info.fn = fn;
-    info.rl = (CResolvableList *)data;
+    info.rl = (CResItemList *)data;
     info.count = 0;
 
     foreachUpgrade (build_upgrade_hash_cb, (void *)&(info.upgrade_hash));
-    foreachMarkedResolvable (uninstall_pkg_cb, (void *)&info);
+    foreachMarkedResItem (uninstall_pkg_cb, (void *)&info);
 
     return info.count;
 }
 
 
-CResolvableList
+CResItemList
 ResolverContext::getUninstalls (void)
 {
-    CResolvableList rl;
+    CResItemList rl;
 
-    foreachUninstall (context_resolvable_collector, (void *)&rl);
+    foreachUninstall (context_resItem_collector, (void *)&rl);
 
     return rl;
 }
@@ -606,10 +606,10 @@ ResolverContext::getUninstalls (void)
 //---------------------------------------------------------------------------
 
 static void
-install_count_cb (constResolvablePtr resolvable, ResolvableStatus status, void *data)
+install_count_cb (constResItemPtr resItem, ResItemStatus status, void *data)
 {
     int *count = (int *)data;
-    if (! resolvable->isInstalled ()) {
+    if (! resItem->isInstalled ()) {
        ++*count;
     }
 }
@@ -626,10 +626,10 @@ ResolverContext::installCount (void) const
 
 
 static void
-uninstall_count_cb (constResolvablePtr resolvable, ResolvableStatus status, void *data)
+uninstall_count_cb (constResItemPtr resItem, ResItemStatus status, void *data)
 {
     int *count = (int *)data;
-    if (resolvable->isInstalled ()) {
+    if (resItem->isInstalled ()) {
        ++*count;
     }
 }
@@ -649,7 +649,7 @@ ResolverContext::uninstallCount (void)
 int
 ResolverContext::upgradeCount (void)
 {
-    return foreachUpgrade ((MarkedResolvablePairFn)NULL, (void *)NULL);
+    return foreachUpgrade ((MarkedResItemPairFn)NULL, (void *)NULL);
 }
 
 
@@ -678,18 +678,18 @@ ResolverContext::addInfo (ResolverInfoPtr info)
 
 
 void
-ResolverContext::addInfoString (constResolvablePtr resolvable, int priority, string msg)
+ResolverContext::addInfoString (constResItemPtr resItem, int priority, string msg)
 {
-//    if (getenv ("RC_SPEW")) fprintf (stderr, "ResolverContext::addInfoString(%s) %s\n", resolvable ? resolvable->asString().c_str() : "", msg.c_str());
-    ResolverInfoPtr info = new ResolverInfoMisc (resolvable, priority, msg);
+//    if (getenv ("RC_SPEW")) fprintf (stderr, "ResolverContext::addInfoString(%s) %s\n", resItem ? resItem->asString().c_str() : "", msg.c_str());
+    ResolverInfoPtr info = new ResolverInfoMisc (resItem, priority, msg);
     addInfo (info);
 }
 
 
 void
-ResolverContext::addErrorString (constResolvablePtr resolvable, string msg)
+ResolverContext::addErrorString (constResItemPtr resItem, string msg)
 {
-    ResolverInfoPtr info = new ResolverInfoMisc (resolvable, RESOLVER_INFO_PRIORITY_VERBOSE, msg);
+    ResolverInfoPtr info = new ResolverInfoMisc (resItem, RESOLVER_INFO_PRIORITY_VERBOSE, msg);
     info->flagAsError ();
     addInfo (info);
 }
@@ -698,45 +698,45 @@ ResolverContext::addErrorString (constResolvablePtr resolvable, string msg)
 //---------------------------------------------------------------------------
 // foreach info
 
-//  We call a resolvable mentioned by an error info an "error-resolvable".
-//  We call a resolvable mentioned by an important info an "important-resolvable".
+//  We call a resItem mentioned by an error info an "error-resItem".
+//  We call a resItem mentioned by an important info an "important-resItem".
 //
 //  The rules:
-//  (1) An info item that mentions an error-resolvable is important.
-//  (2) An info item is about an important-resolvable is important.
+//  (1) An info item that mentions an error-resItem is important.
+//  (2) An info item is about an important-resItem is important.
 
 static void
 mark_important_info (InfoList & il)
 {
-    CResolvableList error_list;                // FIXME, a map is faster
+    CResItemList error_list;           // FIXME, a map is faster
 
     bool did_something;
     int pass_num = 1;
 
-    /* First of all, store all error-resolvables in a list. */
+    /* First of all, store all error-resItems in a list. */
 
     for (InfoList::iterator iter = il.begin(); iter != il.end(); iter++) {
        if ((*iter) != NULL                                     // list items might be set to NULL
            && (*iter)->error ()) {
-           constResolvablePtr resolvable = (*iter)->resolvable();
-           if (resolvable != NULL) {
-               CResolvableList::iterator pos;
+           constResItemPtr resItem = (*iter)->resItem();
+           if (resItem != NULL) {
+               CResItemList::iterator pos;
                for (pos = error_list.begin(); pos != error_list.end(); pos++) {
-                   if (*pos == resolvable)
+                   if (*pos == resItem)
                        break;
                }
                if (pos == error_list.end()) {
-                   error_list.push_front (resolvable);
+                   error_list.push_front (resItem);
                }
            }
 
-           CResolvableList resolvables;
+           CResItemList resItems;
 
            constResolverInfoContainerPtr c = *iter;                    // check if it really is a container
-           if (c != NULL) resolvables = c->resolvables();
+           if (c != NULL) resItems = c->resItems();
 
-           for (CResolvableList::iterator res_iter = resolvables.begin(); res_iter != resolvables.end(); res_iter++) {
-               CResolvableList::iterator pos;
+           for (CResItemList::iterator res_iter = resItems.begin(); res_iter != resItems.end(); res_iter++) {
+               CResItemList::iterator pos;
                for (pos = error_list.begin(); pos != error_list.end(); pos++) {
                    if (*pos == *iter)
                        break;
@@ -748,7 +748,7 @@ mark_important_info (InfoList & il)
        }
     }
 
-    CResolvableList important_list;    // FIXME, hash is faster
+    CResItemList important_list;       // FIXME, hash is faster
 
     do {
        ++pass_num;
@@ -761,7 +761,7 @@ mark_important_info (InfoList & il)
                && (*iter)->important ()) {
                bool should_be_important = false;
 
-               for (CResolvableList::const_iterator res_iter = error_list.begin(); res_iter != error_list.end() && ! should_be_important; res_iter++) {
+               for (CResItemList::const_iterator res_iter = error_list.begin(); res_iter != error_list.end() && ! should_be_important; res_iter++) {
                    constResolverInfoContainerPtr c = *iter;
                    if (c != NULL                                       // check if it really is a container
                        && c->mentions (*res_iter)) {
@@ -769,7 +769,7 @@ mark_important_info (InfoList & il)
                    }
                }
 
-               for (CResolvableList::const_iterator res_iter = important_list.begin(); res_iter != important_list.end() && ! should_be_important; res_iter++) {
+               for (CResItemList::const_iterator res_iter = important_list.begin(); res_iter != important_list.end() && ! should_be_important; res_iter++) {
                    if ((*iter)->isAbout (*res_iter)) {
                        should_be_important = true;
                        break;
@@ -779,11 +779,11 @@ mark_important_info (InfoList & il)
                if (should_be_important) {
                    did_something = true;
                    (*iter)->flagAsImportant ();
-                   CResolvableList resolvables;
+                   CResItemList resItems;
                    constResolverInfoContainerPtr c = *iter;            // check if it really is a container
-                   if (c != NULL) resolvables = c->resolvables();
-                   for (CResolvableList::iterator res_iter = resolvables.begin(); res_iter != resolvables.end(); res_iter++) {
-                       CResolvableList::iterator pos;
+                   if (c != NULL) resItems = c->resItems();
+                   for (CResItemList::iterator res_iter = resItems.begin(); res_iter != resItems.end(); res_iter++) {
+                       CResItemList::iterator pos;
                        for (pos = important_list.begin(); pos != important_list.end(); pos++) {
                            if (*pos == *res_iter)
                                break;
@@ -802,7 +802,7 @@ mark_important_info (InfoList & il)
 
 
 void
-ResolverContext::foreachInfo (ResolvablePtr resolvable, int priority, ResolverInfoFn fn, void *data)
+ResolverContext::foreachInfo (ResItemPtr resItem, int priority, ResolverInfoFn fn, void *data)
 {
     InfoList info_list;
 
@@ -812,7 +812,7 @@ ResolverContext::foreachInfo (ResolvablePtr resolvable, int priority, ResolverIn
     // Assemble a list of copies of all of the info objects
     while (context != NULL) {
        for (InfoList::iterator iter = context->_log.begin(); iter != context->_log.end(); iter++) {
-           if ((resolvable == NULL || (*iter)->resolvable() == resolvable)
+           if ((resItem == NULL || (*iter)->resItem() == resItem)
                && (*iter)->priority() >= priority) {
                info_list.push_back ((*iter)->copy());
            }
@@ -873,19 +873,19 @@ ResolverContext::getInfo (void)
 // spew
 
 static void
-spew_pkg_cb (constResolvablePtr resolvable, ResolvableStatus status, void *unused)
+spew_pkg_cb (constResItemPtr resItem, ResItemStatus status, void *unused)
 {
-    printf ("  %s (%s)\n", resolvable->asString().c_str(), ResolverContext::toString(status).c_str());
+    printf ("  %s (%s)\n", resItem->asString().c_str(), ResolverContext::toString(status).c_str());
 }
 
 
 void
-spew_pkg2_cb (constResolvablePtr resolvable1, ResolvableStatus status1, constResolvablePtr resolvable2, ResolvableStatus status2, void *unused)
+spew_pkg2_cb (constResItemPtr resItem1, ResItemStatus status1, constResItemPtr resItem2, ResItemStatus status2, void *unused)
 {
     const char *s1, *s2;
 
-    s1 = resolvable1->asString().c_str();
-    s2 = resolvable2->asString().c_str();
+    s1 = resItem1->asString().c_str();
+    s2 = resItem2->asString().c_str();
 
     printf ("  %s (%s) => %s (%s)\n", s2, ResolverContext::toString(status2).c_str(), s1, ResolverContext::toString(status1).c_str());
 }
@@ -936,19 +936,19 @@ typedef struct {
 
 
 static bool
-requirement_met_cb (constResolvablePtr resolvable, constSpecPtr spec, void *data)
+requirement_met_cb (constResItemPtr resItem, constSpecPtr spec, void *data)
 {
     RequirementMetInfo *info = (RequirementMetInfo *)data;
 
-    // info->dep is set for resolvable set children. If it is set, query the
+    // info->dep is set for resItem set children. If it is set, query the
     //   exact version only.
     if ((info->dep == NULL || info->dep->equals(spec))
-       && info->context->resolvableIsPresent (resolvable))
+       && info->context->resItemIsPresent (resItem))
     {
        info->flag = true;
     }
 
-//fprintf (stderr, "requirement_met_cb(%s, %s) [info->dep %s] -> %s\n", resolvable->asString().c_str(), spec->asString().c_str(), info->dep != NULL ? info->dep->asString().c_str() : "(none)", info->flag ? "true" : "false");
+//fprintf (stderr, "requirement_met_cb(%s, %s) [info->dep %s] -> %s\n", resItem->asString().c_str(), spec->asString().c_str(), info->dep != NULL ? info->dep->asString().c_str() : "(none)", info->flag ? "true" : "false");
     return ! info->flag;
 }
 
@@ -962,7 +962,7 @@ ResolverContext::requirementIsMet (constDependencyPtr dependency, bool is_child)
     info.dep = is_child ? dependency : NULL;
     info.flag = false;
 
-    world()->foreachProvidingResolvable (dependency, requirement_met_cb, (void *)&info);
+    world()->foreachProvidingResItem (dependency, requirement_met_cb, (void *)&info);
 
     return info.flag;
 }
@@ -971,13 +971,13 @@ ResolverContext::requirementIsMet (constDependencyPtr dependency, bool is_child)
 //---------------------------------------------------------------------------
 
 static bool
-requirement_possible_cb (constResolvablePtr resolvable, constSpecPtr spec, void *data)
+requirement_possible_cb (constResItemPtr resItem, constSpecPtr spec, void *data)
 {
     RequirementMetInfo *info = (RequirementMetInfo *)data;
 
-    ResolvableStatus status = info->context->getStatus (resolvable);
+    ResItemStatus status = info->context->getStatus (resItem);
 
-    if (! resolvable_status_is_to_be_uninstalled (status)
+    if (! resItem_status_is_to_be_uninstalled (status)
        || status == RESOLVABLE_STATUS_TO_BE_UNINSTALLED_DUE_TO_UNLINK) {
        info->flag = true;
     }
@@ -994,16 +994,16 @@ ResolverContext::requirementIsPossible (constDependencyPtr dep)
     info.context = this;
     info.flag = false;
 
-    world()->foreachProvidingResolvable (dep, requirement_possible_cb, (void *)&info);
+    world()->foreachProvidingResItem (dep, requirement_possible_cb, (void *)&info);
     
     return info.flag;
 }
 
 
 bool
-ResolverContext::resolvableIsPossible (constResolvablePtr resolvable)
+ResolverContext::resItemIsPossible (constResItemPtr resItem)
 {
-    CDependencyList requires = resolvable->requires();
+    CDependencyList requires = resItem->requires();
     for (CDependencyList::iterator iter = requires.begin(); iter !=  requires.end(); iter++) {
            if (! requirementIsPossible (*iter)) {
                return false;
@@ -1021,25 +1021,25 @@ typedef struct {
 } DupNameCheckInfo;
 
 static void
-dup_name_check_cb (constResolvablePtr resolvable, ResolvableStatus status, void *data)
+dup_name_check_cb (constResItemPtr resItem, ResItemStatus status, void *data)
 {
     DupNameCheckInfo *info = (DupNameCheckInfo *)data;
     if (! info->flag
-       && resolvable_status_is_to_be_installed (status)
-       && info->spec->name() == resolvable->name()
-       && !info->spec->equals(resolvable)) {
+       && resItem_status_is_to_be_installed (status)
+       && info->spec->name() == resItem->name()
+       && !info->spec->equals(resItem)) {
        info->flag = true;
     }
 }
 
 bool
-ResolverContext::isParallelInstall (constResolvablePtr resolvable)
+ResolverContext::isParallelInstall (constResItemPtr resItem)
 {
     DupNameCheckInfo info;
 
-    info.spec = resolvable;
+    info.spec = resItem;
     info.flag = false;
-    foreachMarkedResolvable (dup_name_check_cb, (void *)&info);
+    foreachMarkedResItem (dup_name_check_cb, (void *)&info);
 
     return info.flag;
 }
index ed7dbeb9c1c1c16b3467671a2443bab9b0da097a..5065ef2bfeaf51e192acfb298075dc7cd4367ca9 100644 (file)
@@ -29,7 +29,7 @@
 
 #include <zypp/solver/detail/ResolverContextPtr.h>
 #include <zypp/solver/detail/ResolverInfo.h>
-#include <zypp/solver/detail/Resolvable.h>
+#include <zypp/solver/detail/ResItem.h>
 #include <zypp/solver/detail/Channel.h>
 
 ///////////////////////////////////////////////////////////////////
@@ -45,18 +45,18 @@ typedef enum {
     RESOLVABLE_STATUS_TO_BE_UNINSTALLED,
     RESOLVABLE_STATUS_TO_BE_UNINSTALLED_DUE_TO_OBSOLETE,
     RESOLVABLE_STATUS_TO_BE_UNINSTALLED_DUE_TO_UNLINK
-} ResolvableStatus;
+} ResItemStatus;
 
-#define resolvable_status_is_to_be_installed(x) (((x) == RESOLVABLE_STATUS_TO_BE_INSTALLED) || ((x) == RESOLVABLE_STATUS_TO_BE_INSTALLED_SOFT))
-#define resolvable_status_is_to_be_uninstalled(x) (((x) == RESOLVABLE_STATUS_TO_BE_UNINSTALLED) || ((x) == RESOLVABLE_STATUS_TO_BE_UNINSTALLED_DUE_TO_OBSOLETE) || ((x) == RESOLVABLE_STATUS_TO_BE_UNINSTALLED_DUE_TO_UNLINK))
+#define resItem_status_is_to_be_installed(x) (((x) == RESOLVABLE_STATUS_TO_BE_INSTALLED) || ((x) == RESOLVABLE_STATUS_TO_BE_INSTALLED_SOFT))
+#define resItem_status_is_to_be_uninstalled(x) (((x) == RESOLVABLE_STATUS_TO_BE_UNINSTALLED) || ((x) == RESOLVABLE_STATUS_TO_BE_UNINSTALLED_DUE_TO_OBSOLETE) || ((x) == RESOLVABLE_STATUS_TO_BE_UNINSTALLED_DUE_TO_UNLINK))
 
-typedef std::map<constResolvablePtr, ResolvableStatus> StatusTable;
+typedef std::map<constResItemPtr, ResItemStatus> StatusTable;
 typedef std::list<ResolverInfoPtr> InfoList;
 
 
 typedef void (*ResolverContextFn) (ResolverContextPtr ctx, void * data);
-typedef void (*MarkedResolvableFn) (constResolvablePtr res, ResolvableStatus status, void *data);
-typedef void (*MarkedResolvablePairFn) (constResolvablePtr res1, ResolvableStatus status1, constResolvablePtr res2, ResolvableStatus status2, void *data);
+typedef void (*MarkedResItemFn) (constResItemPtr res, ResItemStatus status, void *data);
+typedef void (*MarkedResItemPairFn) (constResItemPtr res1, ResItemStatus status1, constResItemPtr res2, ResItemStatus status2, void *data);
 
 
 ///////////////////////////////////////////////////////////////////
@@ -75,8 +75,8 @@ class ResolverContext : public CountedRep {
     StatusTable _status;
 
     // just a caching mechanism
-    constResolvablePtr _last_checked_resolvable;
-    ResolvableStatus _last_checked_status;
+    constResItemPtr _last_checked_resItem;
+    ResItemStatus _last_checked_status;
 
     InfoList _log;
     unsigned long long _download_size;
@@ -100,7 +100,7 @@ class ResolverContext : public CountedRep {
     friend std::ostream& operator<<(std::ostream&, const ResolverContext & context);
     std::string asString (void ) const;
 
-    static std::string toString (const ResolvableStatus & status);
+    static std::string toString (const ResItemStatus & status);
 
     // ---------------------------------- accessors
 
@@ -125,36 +125,36 @@ class ResolverContext : public CountedRep {
 
     // ---------------------------------- methods
 
-    ResolvableStatus getStatus (constResolvablePtr res);                       // non-const, because its caching
-    void setStatus (constResolvablePtr res, ResolvableStatus status);
+    ResItemStatus getStatus (constResItemPtr res);                     // non-const, because its caching
+    void setStatus (constResItemPtr res, ResItemStatus status);
 
-    bool installResolvable (constResolvablePtr resolvable, bool is_soft, int other_penalty);
-    bool upgradeResolvable (constResolvablePtr new_resolvable, constResolvablePtr old_resolvable, bool is_soft, int other_penalty);
-    bool uninstallResolvable (constResolvablePtr resolvable, bool part_of_upgrade, bool due_to_obsolete, bool due_to_unlink);
+    bool installResItem (constResItemPtr resItem, bool is_soft, int other_penalty);
+    bool upgradeResItem (constResItemPtr new_resItem, constResItemPtr old_resItem, bool is_soft, int other_penalty);
+    bool uninstallResItem (constResItemPtr resItem, bool part_of_upgrade, bool due_to_obsolete, bool due_to_unlink);
 
-    bool resolvableIsPresent (constResolvablePtr resolvable);
-    bool resolvableIsAbsent (constResolvablePtr resolvable);
+    bool resItemIsPresent (constResItemPtr resItem);
+    bool resItemIsAbsent (constResItemPtr resItem);
 
-    void foreachMarkedResolvable (MarkedResolvableFn fn, void *data) const;
-    CResolvableList getMarkedResolvables (void) const;
+    void foreachMarkedResItem (MarkedResItemFn fn, void *data) const;
+    CResItemList getMarkedResItems (void) const;
 
-    int foreachInstall (MarkedResolvableFn fn, void *data) const;
-    CResolvableList getInstalls (void) const;
+    int foreachInstall (MarkedResItemFn fn, void *data) const;
+    CResItemList getInstalls (void) const;
     int installCount (void) const;
 
-    int foreachUninstall (MarkedResolvableFn fn, void *data);                  // non-const, calls foreachUpgrade
-    CResolvableList getUninstalls (void);
+    int foreachUninstall (MarkedResItemFn fn, void *data);                     // non-const, calls foreachUpgrade
+    CResItemList getUninstalls (void);
     int uninstallCount (void);
 
-    int foreachUpgrade (MarkedResolvablePairFn fn, void *data);                        // non-const, calls getStatus
-    CResolvableList getUpgrades (void);
+    int foreachUpgrade (MarkedResItemPairFn fn, void *data);                   // non-const, calls getStatus
+    CResItemList getUpgrades (void);
     int upgradeCount (void);
 
     void addInfo (ResolverInfoPtr info);
-    void addInfoString (constResolvablePtr resolvable, int priority, std::string str);
-    void addErrorString (constResolvablePtr resolvable, std::string str);
+    void addInfoString (constResItemPtr resItem, int priority, std::string str);
+    void addErrorString (constResItemPtr resItem, std::string str);
 
-    void foreachInfo (ResolvablePtr resolvable, int priority, ResolverInfoFn fn, void *data);
+    void foreachInfo (ResItemPtr resItem, int priority, ResolverInfoFn fn, void *data);
     InfoList getInfo (void);
 
     void spew (void);
@@ -162,8 +162,8 @@ class ResolverContext : public CountedRep {
 
     bool requirementIsMet (constDependencyPtr dep, bool is_child);
     bool requirementIsPossible (constDependencyPtr dep);
-    bool resolvableIsPossible (constResolvablePtr resolvable);
-    bool isParallelInstall (constResolvablePtr resolvable);
+    bool resItemIsPossible (constResItemPtr resItem);
+    bool isParallelInstall (constResItemPtr resItem);
 
     int getChannelPriority (constChannelPtr channel) const;
 
index fa08cfdb7787ea32037c026d9d999a9b9cc71bac..7cadb199b32ff0fb9ca185b5204f093416ad8976 100644 (file)
@@ -96,8 +96,8 @@ ResolverInfo::toString ( const ResolverInfo & resolverinfo, bool full )
        res += info_type_to_string (resolverinfo._type);
        res += "> ";
     }
-    if (resolverinfo._resolvable != NULL) {
-       res += resolverinfo._resolvable->asString();
+    if (resolverinfo._resItem != NULL) {
+       res += resolverinfo._resItem->asString();
        res += ": ";
     }
 
@@ -124,9 +124,9 @@ operator<<( ostream& os, const ResolverInfo & resolver)
 
 //---------------------------------------------------------------------------
 
-ResolverInfo::ResolverInfo (ResolverInfoType type, constResolvablePtr resolvable, int priority)
+ResolverInfo::ResolverInfo (ResolverInfoType type, constResItemPtr resItem, int priority)
     : _type (type)
-    , _resolvable (resolvable)
+    , _resItem (resItem)
     , _priority (priority)
     , _error (false)
     , _important (false)
@@ -146,7 +146,7 @@ ResolverInfo::merge (ResolverInfoPtr to_be_merged)
     if (to_be_merged == NULL) return false;
 
     if (_type != to_be_merged->_type
-       || _resolvable != to_be_merged->_resolvable) {
+       || _resItem != to_be_merged->_resItem) {
        return false;
     }
 
@@ -164,7 +164,7 @@ ResolverInfo::copy (constResolverInfoPtr from)
 ResolverInfoPtr
 ResolverInfo::copy (void) const
 {
-    ResolverInfoPtr cpy = new ResolverInfo(_type, _resolvable, _priority);
+    ResolverInfoPtr cpy = new ResolverInfo(_type, _resItem, _priority);
 
     cpy->copy (this);
  
@@ -175,12 +175,12 @@ ResolverInfo::copy (void) const
 //---------------------------------------------------------------------------
 
 bool
-ResolverInfo::isAbout (constResolvablePtr resolvable) const
+ResolverInfo::isAbout (constResItemPtr resItem) const
 {
-    if (_resolvable == NULL)
+    if (_resItem == NULL)
        return false;
 
-    return _resolvable->name() == resolvable->name();
+    return _resItem->name() == resItem->name();
 }
 
 ///////////////////////////////////////////////////////////////////
index 3450505e54e38f7ca7f1c5ab8f84d15932b4ceb5..ed30c267a7c070265b1e0c8583aff971db44355c 100644 (file)
@@ -27,7 +27,7 @@
 #include <map>
 #include <string.h>
 #include <zypp/solver/detail/ResolverInfoPtr.h>
-#include <zypp/solver/detail/Resolvable.h>
+#include <zypp/solver/detail/ResItem.h>
 #include <zypp/solver/detail/Channel.h>
 
 ///////////////////////////////////////////////////////////////////
@@ -65,7 +65,7 @@ class ResolverInfo : public CountedRep {
   private:
 
     ResolverInfoType _type;
-    constResolvablePtr _resolvable;
+    constResItemPtr _resItem;
     int _priority;
 
     bool _error;
@@ -73,7 +73,7 @@ class ResolverInfo : public CountedRep {
 
   protected:
 
-    ResolverInfo (ResolverInfoType type, constResolvablePtr resolvable, int priority);
+    ResolverInfo (ResolverInfoType type, constResItemPtr resItem, int priority);
 
   public:
 
@@ -91,7 +91,7 @@ class ResolverInfo : public CountedRep {
     // ---------------------------------- accessors
 
     ResolverInfoType type (void) const { return _type; }
-    constResolvablePtr resolvable (void) const { return _resolvable; }
+    constResItemPtr resItem (void) const { return _resItem; }
     int priority (void) const { return _priority; }
 
     int error (void) const { return _error; }
@@ -104,7 +104,7 @@ class ResolverInfo : public CountedRep {
     bool merge (ResolverInfoPtr to_be_merged);
     virtual ResolverInfoPtr copy (void) const;
 
-    bool isAbout (constResolvablePtr resolvable) const;
+    bool isAbout (constResItemPtr resItem) const;
 };
  
 ///////////////////////////////////////////////////////////////////
index ce8af5969d4505b2fce1a02efab9960c1d046a27..277e9496d59d9d9d9d9b3812afe8345fee0d9726 100644 (file)
@@ -47,7 +47,7 @@ ResolverInfoChildOf::toString ( const ResolverInfoChildOf & child)
     string res = "<resolverinfochildof '";
 
     res += ResolverInfo::toString (child);
-    res += string ("part of ") + child.resolvablesToString(false);
+    res += string ("part of ") + child.resItemsToString(false);
     res += "'>";
 
     return res;
@@ -70,8 +70,8 @@ operator<<( ostream& os, const ResolverInfoChildOf & child)
 
 //---------------------------------------------------------------------------
 
-ResolverInfoChildOf::ResolverInfoChildOf (constResolvablePtr resolvable, constResolvablePtr dependency)
-    : ResolverInfoContainer (RESOLVER_INFO_TYPE_CHILD_OF, resolvable, RESOLVER_INFO_PRIORITY_USER, dependency)
+ResolverInfoChildOf::ResolverInfoChildOf (constResItemPtr resItem, constResItemPtr dependency)
+    : ResolverInfoContainer (RESOLVER_INFO_TYPE_CHILD_OF, resItem, RESOLVER_INFO_PRIORITY_USER, dependency)
 {
 }
 
@@ -86,7 +86,7 @@ ResolverInfoChildOf::~ResolverInfoChildOf ()
 ResolverInfoPtr
 ResolverInfoChildOf::copy (void) const
 {
-    ResolverInfoChildOfPtr cpy = new ResolverInfoChildOf(resolvable(), NULL);
+    ResolverInfoChildOfPtr cpy = new ResolverInfoChildOf(resItem(), NULL);
 
     ((ResolverInfoContainerPtr)cpy)->copy (this);
 
index 09af16b31faac0778f9762ea2bbf695201c64acf..01bc08b7cfdadf0031be22952c3b34fcff3cd889 100644 (file)
@@ -42,7 +42,7 @@ class ResolverInfoChildOf : public ResolverInfoContainer {
 
   public:
 
-    ResolverInfoChildOf (constResolvablePtr resolvable, constResolvablePtr dependency);
+    ResolverInfoChildOf (constResItemPtr resItem, constResItemPtr dependency);
     virtual ~ResolverInfoChildOf();
 
     // ---------------------------------- I/O
index 104824605921ba8ced8d1f973a21b8f02f768a14..64e0cdaeaa201756565b9e8ad262bd39943e4db8 100644 (file)
@@ -48,7 +48,7 @@ ResolverInfoConflictsWith::toString ( const ResolverInfoConflictsWith & with)
     string res;
 
     res += ResolverInfo::toString (with);
-    res += string ("conflicts with ") + with.resolvablesToString(false);
+    res += string ("conflicts with ") + with.resItemsToString(false);
 
     return res;
 }
@@ -70,8 +70,8 @@ operator<<( ostream& os, const ResolverInfoConflictsWith & with)
 
 //---------------------------------------------------------------------------
 
-ResolverInfoConflictsWith::ResolverInfoConflictsWith (constResolvablePtr resolvable, constResolvablePtr with)
-    : ResolverInfoContainer (RESOLVER_INFO_TYPE_CONFLICTS_WITH, resolvable, RESOLVER_INFO_PRIORITY_USER, with)
+ResolverInfoConflictsWith::ResolverInfoConflictsWith (constResItemPtr resItem, constResItemPtr with)
+    : ResolverInfoContainer (RESOLVER_INFO_TYPE_CONFLICTS_WITH, resItem, RESOLVER_INFO_PRIORITY_USER, with)
 {
 }
 
@@ -86,7 +86,7 @@ ResolverInfoConflictsWith::~ResolverInfoConflictsWith ()
 ResolverInfoPtr
 ResolverInfoConflictsWith::copy (void) const
 {
-    ResolverInfoConflictsWithPtr cpy = new ResolverInfoConflictsWith(resolvable(), NULL);
+    ResolverInfoConflictsWithPtr cpy = new ResolverInfoConflictsWith(resItem(), NULL);
 
     ((ResolverInfoContainerPtr)cpy)->copy (this);
 
index 206e5d86b001d5da458d45fff4d5b0a744a0cdab..815bfcb5370fb2f30fb104e25d0aef011a048311 100644 (file)
@@ -41,7 +41,7 @@ class ResolverInfoConflictsWith : public ResolverInfoContainer {
 
   public:
 
-    ResolverInfoConflictsWith (constResolvablePtr resolvable, constResolvablePtr with);
+    ResolverInfoConflictsWith (constResItemPtr resItem, constResItemPtr with);
     virtual ~ResolverInfoConflictsWith();
 
     // ---------------------------------- I/O
index 36fe31a6bd71407c2c6bbcad928dce16bf4674c9..43bf48ef91ed14819c6b8fb17bc27fb464488ee2 100644 (file)
@@ -47,8 +47,8 @@ ResolverInfoContainer::toString ( const ResolverInfoContainer & container )
     string res = "<resolverinfocontainer '";
 
     res += ResolverInfo::toString (container);
-    for (CResolvableList::const_iterator iter = container._resolvable_list.begin(); iter != container._resolvable_list.end(); iter++) {
-       if (iter != container._resolvable_list.begin()) res += ", ";
+    for (CResItemList::const_iterator iter = container._resItem_list.begin(); iter != container._resItem_list.end(); iter++) {
+       if (iter != container._resItem_list.begin()) res += ", ";
        res += ((constSpecPtr)(*iter))->asString();
     }
     res += "'>";
@@ -73,11 +73,11 @@ operator<<( ostream& os, const ResolverInfoContainer & container)
 
 //---------------------------------------------------------------------------
 
-ResolverInfoContainer::ResolverInfoContainer (ResolverInfoType type, constResolvablePtr resolvable, int priority, constResolvablePtr child)
-    : ResolverInfo (type, resolvable, priority)
+ResolverInfoContainer::ResolverInfoContainer (ResolverInfoType type, constResItemPtr resItem, int priority, constResItemPtr child)
+    : ResolverInfo (type, resItem, priority)
 {
     if (child != NULL)
-       _resolvable_list.push_back (child);
+       _resItem_list.push_back (child);
 }
 
 
@@ -95,18 +95,18 @@ ResolverInfoContainer::merge (ResolverInfoContainerPtr to_be_merged)
     res = ((ResolverInfoPtr)this)->merge ((ResolverInfoPtr)to_be_merged);
     if (!res) return res;
 
-    typedef std::map<constResolvablePtr, bool> SeenTable;
+    typedef std::map<constResItemPtr, bool> SeenTable;
     SeenTable seen_packages;
 
-    for (CResolvableList::const_iterator iter = _resolvable_list.begin(); iter != _resolvable_list.end(); iter++) {
+    for (CResItemList::const_iterator iter = _resItem_list.begin(); iter != _resItem_list.end(); iter++) {
        seen_packages[*iter] = true;
     }
 
-    CResolvableList rl = to_be_merged->resolvables();
-    for (CResolvableList::const_iterator iter = rl.begin(); iter != rl.end(); iter++) {
+    CResItemList rl = to_be_merged->resItems();
+    for (CResItemList::const_iterator iter = rl.begin(); iter != rl.end(); iter++) {
        SeenTable::const_iterator pos = seen_packages.find(*iter);
        if (pos == seen_packages.end()) {
-           _resolvable_list.push_front (*iter);
+           _resItem_list.push_front (*iter);
            seen_packages[*iter] = true;
        }
     }
@@ -120,8 +120,8 @@ ResolverInfoContainer::copy (constResolverInfoContainerPtr from)
 {
     ((ResolverInfoPtr)this)->copy(from);
 
-    for (CResolvableList::const_iterator iter = from->_resolvable_list.begin(); iter != from->_resolvable_list.end(); iter++) {
-       _resolvable_list.push_back (*iter);
+    for (CResItemList::const_iterator iter = from->_resItem_list.begin(); iter != from->_resItem_list.end(); iter++) {
+       _resItem_list.push_back (*iter);
     }
 }
 
@@ -129,7 +129,7 @@ ResolverInfoContainer::copy (constResolverInfoContainerPtr from)
 ResolverInfoPtr
 ResolverInfoContainer::copy (void) const
 {
-    ResolverInfoContainerPtr cpy = new ResolverInfoContainer(type(), resolvable(), priority());
+    ResolverInfoContainerPtr cpy = new ResolverInfoContainer(type(), resItem(), priority());
 
     cpy->copy (this);
 
@@ -139,16 +139,16 @@ ResolverInfoContainer::copy (void) const
 //---------------------------------------------------------------------------
 
 string
-ResolverInfoContainer::resolvablesToString (bool names_only) const
+ResolverInfoContainer::resItemsToString (bool names_only) const
 {
     string res;
 
-    if (_resolvable_list.empty())
+    if (_resItem_list.empty())
        return res;
 
     res += " [";
-    for (CResolvableList::const_iterator iter = _resolvable_list.begin(); iter != _resolvable_list.end(); iter++) {
-       if (iter != _resolvable_list.begin())
+    for (CResItemList::const_iterator iter = _resItem_list.begin(); iter != _resItem_list.end(); iter++) {
+       if (iter != _resItem_list.begin())
            res += ", ";
 
        res += (names_only ? (*iter)->name() : ((constSpecPtr)(*iter))->asString());
@@ -160,15 +160,15 @@ ResolverInfoContainer::resolvablesToString (bool names_only) const
 
 
 bool
-ResolverInfoContainer::mentions (constResolvablePtr resolvable) const
+ResolverInfoContainer::mentions (constResItemPtr resItem) const
 {
-    if (isAbout(resolvable))
+    if (isAbout(resItem))
        return true;
 
-    // Search resolvable_list for any mention of the resolvable.
+    // Search resItem_list for any mention of the resItem.
 
-    for (CResolvableList::const_iterator iter = _resolvable_list.begin(); iter != _resolvable_list.end(); iter++) {
-       if ((*iter)->name() == resolvable->name()) {
+    for (CResItemList::const_iterator iter = _resItem_list.begin(); iter != _resItem_list.end(); iter++) {
+       if ((*iter)->name() == resItem->name()) {
            return true;
        }
     }
@@ -178,19 +178,19 @@ ResolverInfoContainer::mentions (constResolvablePtr resolvable) const
 
 
 void
-ResolverInfoContainer::addRelatedResolvable (constResolvablePtr resolvable)
+ResolverInfoContainer::addRelatedResItem (constResItemPtr resItem)
 {
-    if (!mentions(resolvable)) {
-       _resolvable_list.push_front (resolvable);
+    if (!mentions(resItem)) {
+       _resItem_list.push_front (resItem);
     }
 }
 
 
 void
-ResolverInfoContainer::addRelatedResolvableList (const CResolvableList & resolvables)
+ResolverInfoContainer::addRelatedResItemList (const CResItemList & resItems)
 {
-    for (CResolvableList::const_iterator iter = resolvables.begin(); iter != resolvables.end(); iter++) {
-       _resolvable_list.push_front (*iter);
+    for (CResItemList::const_iterator iter = resItems.begin(); iter != resItems.end(); iter++) {
+       _resItem_list.push_front (*iter);
     }
 }
 
index 8519d678cc29172e6551f40b7be0963c6842fd74..021133fb809c4a80984ce0b3bdf0dfe01b807f51 100644 (file)
@@ -44,11 +44,11 @@ class ResolverInfoContainer : public ResolverInfo {
 
   private:
 
-    CResolvableList _resolvable_list;
+    CResItemList _resItem_list;
 
   protected:
 
-    ResolverInfoContainer (ResolverInfoType type, constResolvablePtr resolvable, int priority, constResolvablePtr child = NULL);
+    ResolverInfoContainer (ResolverInfoType type, constResItemPtr resItem, int priority, constResItemPtr child = NULL);
 
   public:
     virtual ~ResolverInfoContainer();
@@ -64,18 +64,18 @@ class ResolverInfoContainer : public ResolverInfo {
 
     // ---------------------------------- accessors
 
-    CResolvableList resolvables (void) const { return _resolvable_list; }
+    CResItemList resItems (void) const { return _resItem_list; }
 
     // ---------------------------------- methods
 
     virtual bool merge (ResolverInfoContainerPtr to_be_merged);
     virtual ResolverInfoPtr copy (void) const;
 
-    std::string resolvablesToString (bool names_only) const;
+    std::string resItemsToString (bool names_only) const;
 
-    bool mentions (constResolvablePtr resolvable) const;
-    void addRelatedResolvable (constResolvablePtr resolvable);
-    void addRelatedResolvableList (const CResolvableList & resolvables);
+    bool mentions (constResItemPtr resItem) const;
+    void addRelatedResItem (constResItemPtr resItem);
+    void addRelatedResItemList (const CResItemList & resItems);
 
 };
  
index e339d6231de384dad64035e84f5858527e15f1fb..3c2aa997961277588d6d442929ee2b6e931355ed 100644 (file)
@@ -48,7 +48,7 @@ ResolverInfoDependsOn::toString ( const ResolverInfoDependsOn & on)
     string res;
 
     res += ResolverInfo::toString (on);
-    res += string ("depended on ") + on.resolvablesToString(false);
+    res += string ("depended on ") + on.resItemsToString(false);
 
     return res;
 }
@@ -70,8 +70,8 @@ operator<<( ostream& os, const ResolverInfoDependsOn & on)
 
 //---------------------------------------------------------------------------
 
-ResolverInfoDependsOn::ResolverInfoDependsOn (constResolvablePtr resolvable, constResolvablePtr on)
-    : ResolverInfoContainer (RESOLVER_INFO_TYPE_DEPENDS_ON, resolvable, RESOLVER_INFO_PRIORITY_USER, on)
+ResolverInfoDependsOn::ResolverInfoDependsOn (constResItemPtr resItem, constResItemPtr on)
+    : ResolverInfoContainer (RESOLVER_INFO_TYPE_DEPENDS_ON, resItem, RESOLVER_INFO_PRIORITY_USER, on)
 {
 }
 
@@ -85,7 +85,7 @@ ResolverInfoDependsOn::~ResolverInfoDependsOn ()
 ResolverInfoPtr
 ResolverInfoDependsOn::copy (void) const
 {
-    ResolverInfoDependsOnPtr cpy = new ResolverInfoDependsOn(resolvable(), NULL);
+    ResolverInfoDependsOnPtr cpy = new ResolverInfoDependsOn(resItem(), NULL);
 
     ((ResolverInfoContainerPtr)cpy)->copy (this);
 
index e0dac8907224d68403c731cc2ab95a4c15bb41aa..a1f97df67b989ca895a1e00a39af3606051f2f7e 100644 (file)
@@ -42,7 +42,7 @@ class ResolverInfoDependsOn : public ResolverInfoContainer {
 
   public:
 
-    ResolverInfoDependsOn (constResolvablePtr resolvable, constResolvablePtr on);
+    ResolverInfoDependsOn (constResItemPtr resItem, constResItemPtr on);
     virtual ~ResolverInfoDependsOn();
 
     // ---------------------------------- I/O
index 71dfcce5306a34aeb15a50e3c6098f4071f5f0c2..ddc59f07380e6bcfd2588be4b7b3775985c02dcd 100644 (file)
@@ -52,7 +52,7 @@ ResolverInfoMisc::toString ( const ResolverInfoMisc & misc)
     res += ResolverInfo::toString (misc, false);
     res += "]";
 #endif
-    res += misc.resolvablesToString(false);
+    res += misc.resItemsToString(false);
     if (!misc._action.empty()) {
        res += string (", Action: ") + misc._action + "\n";
     }
@@ -80,8 +80,8 @@ operator<<( ostream& os, const ResolverInfoMisc & misc)
 
 //---------------------------------------------------------------------------
 
-ResolverInfoMisc::ResolverInfoMisc (constResolvablePtr resolvable, int priority, const string & msg)
-    : ResolverInfoContainer (RESOLVER_INFO_TYPE_MISC, resolvable, priority)
+ResolverInfoMisc::ResolverInfoMisc (constResItemPtr resItem, int priority, const string & msg)
+    : ResolverInfoContainer (RESOLVER_INFO_TYPE_MISC, resItem, priority)
     , _msg (msg)
 {
 }
@@ -115,7 +115,7 @@ ResolverInfoMisc::merge (ResolverInfoPtr info)
 ResolverInfoPtr
 ResolverInfoMisc::copy (void) const
 {
-    ResolverInfoMiscPtr cpy = new ResolverInfoMisc(resolvable(), priority(), _msg);
+    ResolverInfoMiscPtr cpy = new ResolverInfoMisc(resItem(), priority(), _msg);
 
     ((ResolverInfoContainerPtr)cpy)->copy (this);
 
index 7eb383eccfaed0ea64e2830c12fde1fa9abcf400..e1da94568a85722bf24d6f6704af3b25a75cc5d3 100644 (file)
@@ -46,7 +46,7 @@ class ResolverInfoMisc : public ResolverInfoContainer {
 
   public:
 
-    ResolverInfoMisc (constResolvablePtr resolvable, int priority, const std::string & msg);
+    ResolverInfoMisc (constResItemPtr resItem, int priority, const std::string & msg);
     virtual ~ResolverInfoMisc();
 
     // ---------------------------------- I/O
index b2cb79eaabf99e81102a76f46adcc1d2ee8d2722..5eadefd20230bd8451cb98416b6cc8c52c8e3195 100644 (file)
@@ -70,8 +70,8 @@ operator<<( ostream& os, const ResolverInfoMissingReq & missing)
 
 //---------------------------------------------------------------------------
 
-ResolverInfoMissingReq::ResolverInfoMissingReq (constResolvablePtr resolvable, constDependencyPtr missing_req)
-    : ResolverInfo (RESOLVER_INFO_TYPE_MISSING_REQ, resolvable, RESOLVER_INFO_PRIORITY_USER)
+ResolverInfoMissingReq::ResolverInfoMissingReq (constResItemPtr resItem, constDependencyPtr missing_req)
+    : ResolverInfo (RESOLVER_INFO_TYPE_MISSING_REQ, resItem, RESOLVER_INFO_PRIORITY_USER)
     , _missing_req (missing_req)
 {
 }
@@ -86,7 +86,7 @@ ResolverInfoMissingReq::~ResolverInfoMissingReq ()
 ResolverInfoPtr
 ResolverInfoMissingReq::copy (void) const
 {
-    ResolverInfoMissingReqPtr cpy = new ResolverInfoMissingReq(resolvable(), _missing_req);
+    ResolverInfoMissingReqPtr cpy = new ResolverInfoMissingReq(resItem(), _missing_req);
 
     ((ResolverInfoPtr)cpy)->copy (this);
 
index dd3e816e12a1dbb5adf36e4c066d39c7beada03e..f6c73bb317170df26f849bf4e0e7904c16f592a5 100644 (file)
@@ -43,7 +43,7 @@ class ResolverInfoMissingReq : public ResolverInfo {
 
   public:
 
-    ResolverInfoMissingReq (constResolvablePtr resolvable, constDependencyPtr missing_req);
+    ResolverInfoMissingReq (constResItemPtr resItem, constDependencyPtr missing_req);
     virtual ~ResolverInfoMissingReq();
 
     // ---------------------------------- I/O
index 23efd4e1d12cfb25fbb575ce4b59b5fbdecec30f..9ca25820b9a7ca2bfffda9f74de970c85a284d16 100644 (file)
@@ -48,7 +48,7 @@ ResolverInfoNeededBy::toString ( const ResolverInfoNeededBy & by)
     string res;
 
     res += ResolverInfo::toString (by, false);
-    res += string (" needed by ") + by.resolvablesToString(false);
+    res += string (" needed by ") + by.resItemsToString(false);
 
     return res;
 }
@@ -70,8 +70,8 @@ operator<<( ostream& os, const ResolverInfoNeededBy & by)
 
 //---------------------------------------------------------------------------
 
-ResolverInfoNeededBy::ResolverInfoNeededBy (constResolvablePtr resolvable)
-    : ResolverInfoContainer (RESOLVER_INFO_TYPE_NEEDED_BY, resolvable, RESOLVER_INFO_PRIORITY_USER, NULL)
+ResolverInfoNeededBy::ResolverInfoNeededBy (constResItemPtr resItem)
+    : ResolverInfoContainer (RESOLVER_INFO_TYPE_NEEDED_BY, resItem, RESOLVER_INFO_PRIORITY_USER, NULL)
 {
 }
 
@@ -85,7 +85,7 @@ ResolverInfoNeededBy::~ResolverInfoNeededBy ()
 ResolverInfoPtr
 ResolverInfoNeededBy::copy (void) const
 {
-    ResolverInfoNeededByPtr cpy = new ResolverInfoNeededBy(resolvable());
+    ResolverInfoNeededByPtr cpy = new ResolverInfoNeededBy(resItem());
 
     ((ResolverInfoContainerPtr)cpy)->copy (this);
 
index 47c419d49a7f2ce93dcbc539cf00730597ec4951..efcf5229cd28c6fbc8c7e52db275577f6612aa08 100644 (file)
@@ -41,7 +41,7 @@ class ResolverInfoNeededBy : public ResolverInfoContainer {
 
   public:
 
-    ResolverInfoNeededBy (constResolvablePtr resolvable);
+    ResolverInfoNeededBy (constResItemPtr resItem);
     virtual ~ResolverInfoNeededBy();
 
     // ---------------------------------- I/O
index f65dfed1fee42d7a0dac566703c906ac92fd841a..800e9b9b1a7ffb7da022595ce8f5c2ff65879fa2 100644 (file)
@@ -48,7 +48,7 @@ ResolverInfoObsoletes::toString ( const ResolverInfoObsoletes & obsoletes)
     string res;
 
     res += ResolverInfo::toString (obsoletes);
-    res += string ("replaced by ") + obsoletes.resolvablesToString(false);
+    res += string ("replaced by ") + obsoletes.resItemsToString(false);
 
     return res;
 }
@@ -70,8 +70,8 @@ operator<<( ostream& os, const ResolverInfoObsoletes & obsoletes)
 
 //---------------------------------------------------------------------------
 
-ResolverInfoObsoletes::ResolverInfoObsoletes (constResolvablePtr resolvable, constResolvablePtr obsoletes)
-    : ResolverInfoContainer (RESOLVER_INFO_TYPE_OBSOLETES, resolvable, RESOLVER_INFO_PRIORITY_USER, obsoletes)
+ResolverInfoObsoletes::ResolverInfoObsoletes (constResItemPtr resItem, constResItemPtr obsoletes)
+    : ResolverInfoContainer (RESOLVER_INFO_TYPE_OBSOLETES, resItem, RESOLVER_INFO_PRIORITY_USER, obsoletes)
 {
 }
 
@@ -85,7 +85,7 @@ ResolverInfoObsoletes::~ResolverInfoObsoletes ()
 ResolverInfoPtr
 ResolverInfoObsoletes::copy (void) const
 {
-    ResolverInfoObsoletesPtr cpy = new ResolverInfoObsoletes(resolvable(), NULL);
+    ResolverInfoObsoletesPtr cpy = new ResolverInfoObsoletes(resItem(), NULL);
 
     ((ResolverInfoContainerPtr)cpy)->copy (this);
 
index 4ecd0882269da6fbba087405002f6c2e8636f8f7..5ba83392702bac13cdb9cf6dfb3d4fac553c2f31 100644 (file)
@@ -42,7 +42,7 @@ class ResolverInfoObsoletes : public ResolverInfoContainer {
 
   public:
 
-    ResolverInfoObsoletes (constResolvablePtr resolvable, constResolvablePtr obsoletes);
+    ResolverInfoObsoletes (constResItemPtr resItem, constResItemPtr obsoletes);
     virtual ~ResolverInfoObsoletes();
 
     // ---------------------------------- I/O
index 69dfc59d80181796f7960281d37824d02c7fa179..8e0739b822cbd3139b754b16a477a8d24f862010 100644 (file)
@@ -97,16 +97,16 @@ ResolverQueue::~ResolverQueue()
 //---------------------------------------------------------------------------
 
 void
-ResolverQueue::addResolvableToInstall (constResolvablePtr resolvable)
+ResolverQueue::addResItemToInstall (constResItemPtr resItem)
 {
     QueueItemInstallPtr item;
 
-    if (_context->resolvableIsPresent (resolvable)) {
-       printf ("%s is already installed", ((constSpecPtr)resolvable)->asString().c_str());
+    if (_context->resItemIsPresent (resItem)) {
+       printf ("%s is already installed", ((constSpecPtr)resItem)->asString().c_str());
        return;
     }
 
-    item = new QueueItemInstall (_context->world(), resolvable);
+    item = new QueueItemInstall (_context->world(), resItem);
     item->setExplicitlyRequested ();
 
     addItem (item);
@@ -114,14 +114,14 @@ ResolverQueue::addResolvableToInstall (constResolvablePtr resolvable)
 
 
 void
-ResolverQueue::addResolvableToRemove (constResolvablePtr resolvable, bool remove_only_mode)
+ResolverQueue::addResItemToRemove (constResItemPtr resItem, bool remove_only_mode)
 {
     QueueItemUninstallPtr item;
 
-    if (_context->resolvableIsAbsent (resolvable))
+    if (_context->resItemIsAbsent (resItem))
        return;
 
-    item = new QueueItemUninstall (_context->world(), resolvable, "user request");
+    item = new QueueItemUninstall (_context->world(), resItem, "user request");
     if (remove_only_mode)
        item->setRemoveOnly ();
 
@@ -132,22 +132,22 @@ ResolverQueue::addResolvableToRemove (constResolvablePtr resolvable, bool remove
 
 
 void
-ResolverQueue::addResolvableToVerify (constResolvablePtr resolvable)
+ResolverQueue::addResItemToVerify (constResItemPtr resItem)
 {
     WorldPtr world;
     
     world = _context->world ();
 
-    CDependencyList requires = resolvable->requires();
+    CDependencyList requires = resItem->requires();
     for (CDependencyList::const_iterator iter = requires.begin(); iter != requires.end(); iter++) {
        QueueItemRequirePtr item = new QueueItemRequire (world, *iter);
-       item->addResolvable (resolvable);
+       item->addResItem (resItem);
        addItem (item);
     }
 
-    CDependencyList conflicts = resolvable->conflicts();
+    CDependencyList conflicts = resItem->conflicts();
     for (CDependencyList::const_iterator iter = conflicts.begin(); iter != conflicts.end(); iter++) {
-       QueueItemConflictPtr item = new QueueItemConflict (world, *iter, resolvable);
+       QueueItemConflictPtr item = new QueueItemConflict (world, *iter, resItem);
        addItem (item);
     }
 }
@@ -326,7 +326,7 @@ copy_queue_except_for_branch (ResolverQueuePtr queue, QueueItemPtr branch_item,
 
                /* Penalties are negative priorities */
                int penalty;
-               penalty = - queue->context()->getChannelPriority (install_item->resolvable()->channel());
+               penalty = - queue->context()->getChannelPriority (install_item->resItem()->channel());
                
                install_item->setOtherPenalty (penalty);
            }
@@ -363,9 +363,9 @@ ResolverQueue::splitFirstBranch (ResolverQueueList & new_queues, ResolverQueueLi
 
     /* 
        Check for deferrable items: if we have two install items where the to-be-installed
-       resolvables have the same name, then we will defer the lower-priority install if
+       resItems have the same name, then we will defer the lower-priority install if
        one of the following is true:
-       (1) Both resolvables have the same version
+       (1) Both resItems have the same version
        (2) The lower-priority channel is a previous version.
     */
 
@@ -377,8 +377,8 @@ ResolverQueue::splitFirstBranch (ResolverQueueList & new_queues, ResolverQueueLi
            QueueItemPtr item2 = *iter2;
 
            if (item->isInstall() && item2->isInstall()) {
-               constResolvablePtr r = ((QueueItemInstallPtr) item)->resolvable();
-               constResolvablePtr r2 = ((QueueItemInstallPtr) item2)->resolvable();
+               constResItemPtr r = ((QueueItemInstallPtr) item)->resItem();
+               constResItemPtr r2 = ((QueueItemInstallPtr) item2)->resItem();
                constChannelPtr channel = r->channel();
                constChannelPtr channel2 = r2->channel();
                int priority, priority2;
index 2764ae037a051fbacd818e878986383367dbb0c1..386ab2290d73ec74cb9cd0b2a66d5b032b8eed6c 100644 (file)
@@ -30,7 +30,7 @@
 #include <zypp/solver/detail/ResolverQueuePtr.h>
 #include <zypp/solver/detail/ResolverContextPtr.h>
 #include <zypp/solver/detail/QueueItem.h>
-#include <zypp/solver/detail/ResolvablePtr.h>
+#include <zypp/solver/detail/ResItemPtr.h>
 #include <zypp/solver/detail/DependencyPtr.h>
 
 ///////////////////////////////////////////////////////////////////
@@ -71,9 +71,9 @@ class ResolverQueue : public CountedRep {
     // ---------------------------------- methods
 
 
-    void addResolvableToInstall (constResolvablePtr resolvable);
-    void addResolvableToRemove (constResolvablePtr resolvable, bool remove_only_mode);
-    void addResolvableToVerify (constResolvablePtr resolvable);
+    void addResItemToInstall (constResItemPtr resItem);
+    void addResItemToRemove (constResItemPtr resItem, bool remove_only_mode);
+    void addResItemToVerify (constResItemPtr resItem);
     void addExtraDependency (constDependencyPtr dep);
     void addExtraConflict (constDependencyPtr dep);
     void addItem (QueueItemPtr item);
index f968163a9005efb3172738f63ffffe0c0ed839ea..ac8c5a14c975a6c264f96736ea762886654bbe6f 100644 (file)
@@ -133,7 +133,7 @@ Spec::copy (void) const
 
 #if 0
 xmlNode *
-rc_resolvable_spec_to_xml_node (RCResolvableSpec *spec)
+rc_resItem_spec_to_xml_node (RCResItemSpec *spec)
 {
     xmlNode *spec_node;
     char buffer[128];
index b51b37c819f84141541d896d68e2c2b5249dfc72..d7bd0864e3678070fc6188f8a5e5cea0af1129a1 100644 (file)
@@ -1,5 +1,5 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* Spec.h  resolvable specification: name + edition
+/* Spec.h  resItem specification: name + edition
  *
  * Copyright (C) 2000-2002 Ximian, Inc.
  * Copyright (C) 2005 SUSE Linux Products GmbH
@@ -41,7 +41,7 @@ namespace ZYPP {
 //
 //      CLASS NAME : Name
 /**
- * A resolvable name
+ * A resItem name
  **/
 
 class Name : public Ustring {
index 4ee8d49d0aec7e39c0a67806302f4e33be40a782..a0197ced4f1534e388a89cd8ac7d44ebaa70042a 100644 (file)
@@ -26,7 +26,7 @@
 #include <zypp/solver/detail/Version.h>
 #include <zypp/solver/detail/Packman.h>
 #include <zypp/solver/detail/StoreWorld.h>
-#include <zypp/solver/detail/ResolvableAndDependency.h>
+#include <zypp/solver/detail/ResItemAndDependency.h>
 #include <zypp/solver/detail/debug.h>
 
 ///////////////////////////////////////////////////////////////////
@@ -73,7 +73,7 @@ operator<< (ostream & os, const StoreWorld & storeworld)
 
 StoreWorld::StoreWorld (WorldType type)
     : World (type)
-    , _resolvable_kind(Kind::Unknown)
+    , _resItem_kind(Kind::Unknown)
 {
 }
 
@@ -86,138 +86,138 @@ StoreWorld::~StoreWorld()
 
 //---------------------------------------------------------------------------
 
-// Add/remove resolvables
+// Add/remove resItems
 
 bool
-StoreWorld::addResolvable (constResolvablePtr resolvable)
+StoreWorld::addResItem (constResItemPtr resItem)
 {
     ArchList compat_arch_list;
-    ResolvableAndDependencyPtr r_and_d;
+    ResItemAndDependencyPtr r_and_d;
     const char *package_name;
     constChannelPtr channel;
     int arch_score;
     bool actually_added_package = false;
 
-    if (resolvable == NULL) return false;
+    if (resItem == NULL) return false;
 
     compat_arch_list = Arch::System->getCompatList();
 //fprintf (stderr, "Arch::System '%s' -> %d compats\n", Arch::System->asString().c_str(), (int) compat_arch_list.size());
-    channel = resolvable->channel ();
+    channel = resItem->channel ();
 
-//    fprintf (stderr, "StoreWorld[%p]::addResolvable(%s) [%s]\n", this, ((constSpecPtr)resolvable)->asString().c_str(), channel?channel->name():"?");
+//    fprintf (stderr, "StoreWorld[%p]::addResItem(%s) [%s]\n", this, ((constSpecPtr)resItem)->asString().c_str(), channel?channel->name():"?");
 
-    arch_score = resolvable->arch()->getCompatScore(compat_arch_list);
+    arch_score = resItem->arch()->getCompatScore(compat_arch_list);
 
-    /* Before we do anything, check to make sure that a resolvable of the
+    /* Before we do anything, check to make sure that a resItem of the
        same name isn't already in that channel.  If there is a
        duplicate, we keep the one with the most recent version number
        and drop the other.
 
-       This check only applies to resolvables in a channel.  We have
+       This check only applies to resItems in a channel.  We have
        to allow for multiple installs.  Grrrr...
     */
 
-    if (!resolvable->isInstalled ()) {                 // its not a system package
+    if (!resItem->isInstalled ()) {                    // its not a system package
 
-       constResolvablePtr dup_res;
+       constResItemPtr dup_res;
        int dup_arch_score;
 
-       /* Filter out resolvables with totally incompatible arches */
+       /* Filter out resItems with totally incompatible arches */
        if (arch_score < 0) {
-           rc_debug (RC_DEBUG_LEVEL_DEBUG, "Ignoring resolvable with incompatible arch: Arch '%s', %s",  resolvable->arch()->asString().c_str(), resolvable->asString(true).c_str());
+           rc_debug (RC_DEBUG_LEVEL_DEBUG, "Ignoring resItem with incompatible arch: Arch '%s', %s",  resItem->arch()->asString().c_str(), resItem->asString(true).c_str());
            goto finished;
        }
 
-       package_name = resolvable->name().c_str();
-       dup_res = findResolvable (channel, package_name);
+       package_name = resItem->name().c_str();
+       dup_res = findResItem (channel, package_name);
 
        /* This shouldn't happen (and would be caught by the check
           below, because cmp will equal 0), but it never hurts to
           check and produce a more explicit warning message. */
 
-       if (resolvable == dup_res) {
-           rc_debug (RC_DEBUG_LEVEL_WARNING, "Ignoring re-add of resolvable '%s'", package_name);
+       if (resItem == dup_res) {
+           rc_debug (RC_DEBUG_LEVEL_WARNING, "Ignoring re-add of resItem '%s'", package_name);
            goto finished;
        }
 
        if (dup_res != NULL) {
            int cmp;
 
-           cmp = GVersion.compare (resolvable, dup_res);
-//fprintf (stderr, "res: %s, dup_res %s, cmp %d\n", resolvable->asString().c_str(), dup_res->asString().c_str(), cmp);
+           cmp = GVersion.compare (resItem, dup_res);
+//fprintf (stderr, "res: %s, dup_res %s, cmp %d\n", resItem->asString().c_str(), dup_res->asString().c_str(), cmp);
            dup_arch_score = dup_res->arch()->getCompatScore(compat_arch_list);
        
 
-           /* If the resolvable we are trying to add has a lower 
+           /* If the resItem we are trying to add has a lower 
               version number, just ignore it. */
 
            if (cmp < 0) {
-               rc_debug (RC_DEBUG_LEVEL_INFO, "Not adding resolvable '%s'.\n\tA newer version is already in the channel.", resolvable->asString().c_str());
+               rc_debug (RC_DEBUG_LEVEL_INFO, "Not adding resItem '%s'.\n\tA newer version is already in the channel.", resItem->asString().c_str());
                rc_debug (RC_DEBUG_LEVEL_INFO, "\t%s", dup_res->asString().c_str());
                goto finished;
            }
 
 
-           /* If the version numbers are equal, we ignore the resolvable to
+           /* If the version numbers are equal, we ignore the resItem to
               add if it has a less-preferable arch.  If both
-              resolvables have the same version # and arch, we favor the
-              first resolvable and just return. */
+              resItems have the same version # and arch, we favor the
+              first resItem and just return. */
 
            if (cmp == 0 && arch_score > dup_arch_score) {
-               rc_debug (RC_DEBUG_LEVEL_INFO, "Not adding resolvable '%s'.\n\tAnother resolvable with the same version but with a preferred arch is already in the channel.", resolvable->asString().c_str());
+               rc_debug (RC_DEBUG_LEVEL_INFO, "Not adding resItem '%s'.\n\tAnother resItem with the same version but with a preferred arch is already in the channel.", resItem->asString().c_str());
                rc_debug (RC_DEBUG_LEVEL_INFO, "\t%s", dup_res->asString().c_str());
                goto finished;
            }
 
 
-           /* Otherwise we throw out the old resolvable and proceed with
+           /* Otherwise we throw out the old resItem and proceed with
               adding the newer one. */
 
-           rc_debug (RC_DEBUG_LEVEL_INFO, "Replacing resolvable '%s'.\n\tAnother resolvable in the channel has the same name and a superior %s.",  dup_res->asString().c_str(), cmp ? "version" : "arch");
-           rc_debug (RC_DEBUG_LEVEL_INFO, "\t%s", resolvable->asString().c_str());
+           rc_debug (RC_DEBUG_LEVEL_INFO, "Replacing resItem '%s'.\n\tAnother resItem in the channel has the same name and a superior %s.",  dup_res->asString().c_str(), cmp ? "version" : "arch");
+           rc_debug (RC_DEBUG_LEVEL_INFO, "\t%s", resItem->asString().c_str());
 
-           removeResolvable (dup_res);
+           removeResItem (dup_res);
        }
     }
 
     actually_added_package = true;
 
     if (channel && !channel->hidden()) {
-       touchResolvableSequenceNumber ();
+       touchResItemSequenceNumber ();
     }
 
-    /* StoreWorld all of our resolvables in a hash by name. */
-    _resolvables_by_name.insert (ResolvableTable::value_type (resolvable->name(), resolvable));
+    /* StoreWorld all of our resItems in a hash by name. */
+    _resItems_by_name.insert (ResItemTable::value_type (resItem->name(), resItem));
 
-    /* StoreWorld all of the resolvable's provides in a hash by name. */
-    for (CDependencyList::const_iterator i = resolvable->provides().begin(); i != resolvable->provides().end(); i++) {
-       r_and_d = new ResolvableAndDependency (resolvable, *i);
+    /* StoreWorld all of the resItem's provides in a hash by name. */
+    for (CDependencyList::const_iterator i = resItem->provides().begin(); i != resItem->provides().end(); i++) {
+       r_and_d = new ResItemAndDependency (resItem, *i);
 
-       _provides_by_name.insert (ResolvableAndDependencyTable::value_type (r_and_d->dependency()->name(), r_and_d));
+       _provides_by_name.insert (ResItemAndDependencyTable::value_type (r_and_d->dependency()->name(), r_and_d));
     }
 
-    /* StoreWorld all of the resolvable's requires in a hash by name. */
+    /* StoreWorld all of the resItem's requires in a hash by name. */
 
-    for (CDependencyList::const_iterator i = resolvable->requires().begin(); i != resolvable->requires().end(); i++) {
-       r_and_d = new ResolvableAndDependency (resolvable, *i);
+    for (CDependencyList::const_iterator i = resItem->requires().begin(); i != resItem->requires().end(); i++) {
+       r_and_d = new ResItemAndDependency (resItem, *i);
 
-       _requires_by_name.insert (ResolvableAndDependencyTable::value_type (r_and_d->dependency()->name(), r_and_d));
+       _requires_by_name.insert (ResItemAndDependencyTable::value_type (r_and_d->dependency()->name(), r_and_d));
     }
 
     /* "Recommends" are treated as requirements. */
 #warning Recommends are treated as requirements
 
-    for (CDependencyList::const_iterator i = resolvable->recommends().begin(); i != resolvable->recommends().end(); i++) {
-       r_and_d = new ResolvableAndDependency (resolvable, *i);
+    for (CDependencyList::const_iterator i = resItem->recommends().begin(); i != resItem->recommends().end(); i++) {
+       r_and_d = new ResItemAndDependency (resItem, *i);
 
-       _requires_by_name.insert (ResolvableAndDependencyTable::value_type (r_and_d->dependency()->name(), r_and_d));
+       _requires_by_name.insert (ResItemAndDependencyTable::value_type (r_and_d->dependency()->name(), r_and_d));
     }
 
-    /* StoreWorld all of the resolvable's conflicts in a hash by name. */
+    /* StoreWorld all of the resItem's conflicts in a hash by name. */
 
-    for (CDependencyList::const_iterator i = resolvable->conflicts().begin(); i != resolvable->conflicts().end(); i++) {
-       r_and_d = new ResolvableAndDependency (resolvable, *i);
-       _conflicts_by_name.insert (ResolvableAndDependencyTable::value_type (r_and_d->dependency()->name(), r_and_d));
+    for (CDependencyList::const_iterator i = resItem->conflicts().begin(); i != resItem->conflicts().end(); i++) {
+       r_and_d = new ResItemAndDependency (resItem, *i);
+       _conflicts_by_name.insert (ResItemAndDependencyTable::value_type (r_and_d->dependency()->name(), r_and_d));
     }
     
  finished:
@@ -227,11 +227,11 @@ StoreWorld::addResolvable (constResolvablePtr resolvable)
 
 
 void
-StoreWorld::addResolvablesFromList (const CResolvableList & slist)
+StoreWorld::addResItemsFromList (const CResItemList & slist)
 {
-    for (CResolvableList::const_iterator i = slist.begin(); i != slist.end(); i++) {
-       if (!addResolvable (*i)) {
-           fprintf (stderr, "addResolvable failed\n");
+    for (CResItemList::const_iterator i = slist.begin(); i != slist.end(); i++) {
+       if (!addResItem (*i)) {
+           fprintf (stderr, "addResItem failed\n");
            break;
        }
     }
@@ -241,12 +241,12 @@ StoreWorld::addResolvablesFromList (const CResolvableList & slist)
 //---------------------------------------------------------------------------
 
 static void
-resolvable_table_remove (ResolvableTable & table, constResolvablePtr resolvable)
+resItem_table_remove (ResItemTable & table, constResItemPtr resItem)
 {
-    const string name = resolvable->name();
-    for (ResolvableTable::iterator pos = table.lower_bound(name); pos != table.upper_bound(name); pos++) {
-       constResolvablePtr res = pos->second;
-       if (res == resolvable) {
+    const string name = resItem->name();
+    for (ResItemTable::iterator pos = table.lower_bound(name); pos != table.upper_bound(name); pos++) {
+       constResItemPtr res = pos->second;
+       if (res == resItem) {
            table.erase (pos);
            break;
        }
@@ -256,14 +256,14 @@ resolvable_table_remove (ResolvableTable & table, constResolvablePtr resolvable)
 
 
 static void
-resolvable_and_dependency_table_remove (ResolvableAndDependencyTable & table, constResolvablePtr resolvable)
+resItem_and_dependency_table_remove (ResItemAndDependencyTable & table, constResItemPtr resItem)
 {
-    const string name = resolvable->name();
+    const string name = resItem->name();
 // FIXME: this is inefficient but lower_bound can't to strcasecmp :-(
-//    for (ResolvableAndDependencyTable::iterator pos = table.lower_bound(name); pos != table.upper_bound(name); pos++) {
-    for (ResolvableAndDependencyTable::iterator pos = table.begin(); pos != table.end(); pos++) {
-       constResolvableAndDependencyPtr r_and_d = pos->second;
-       if (r_and_d->resolvable() == resolvable) {
+//    for (ResItemAndDependencyTable::iterator pos = table.lower_bound(name); pos != table.upper_bound(name); pos++) {
+    for (ResItemAndDependencyTable::iterator pos = table.begin(); pos != table.end(); pos++) {
+       constResItemAndDependencyPtr r_and_d = pos->second;
+       if (r_and_d->resItem() == resItem) {
            table.erase (pos);
            break;
        }
@@ -272,29 +272,29 @@ resolvable_and_dependency_table_remove (ResolvableAndDependencyTable & table, co
 }
 
 void
-StoreWorld::removeResolvable (constResolvablePtr resolvable)
+StoreWorld::removeResItem (constResItemPtr resItem)
 {
-    if (getenv("RC_SPEW")) fprintf (stderr, "StoreWorld::removeResolvable (%s)\n", resolvable->asString().c_str());
+    if (getenv("RC_SPEW")) fprintf (stderr, "StoreWorld::removeResItem (%s)\n", resItem->asString().c_str());
 
-    constChannelPtr channel = resolvable->channel ();
+    constChannelPtr channel = resItem->channel ();
 
     if (! (channel && channel->hidden ()))
-       touchResolvableSequenceNumber ();
+       touchResItemSequenceNumber ();
 
-    resolvable_and_dependency_table_remove (_provides_by_name, resolvable);
-    resolvable_and_dependency_table_remove (_requires_by_name, resolvable);
-    resolvable_and_dependency_table_remove (_conflicts_by_name, resolvable);
+    resItem_and_dependency_table_remove (_provides_by_name, resItem);
+    resItem_and_dependency_table_remove (_requires_by_name, resItem);
+    resItem_and_dependency_table_remove (_conflicts_by_name, resItem);
 
-    resolvable_table_remove (_resolvables_by_name, resolvable);
+    resItem_table_remove (_resItems_by_name, resItem);
 
     return;
 }
 
 
 void
-StoreWorld::removeResolvables (constChannelPtr channel)
+StoreWorld::removeResItems (constChannelPtr channel)
 {
-       fprintf (stderr, "StoreWorld::removeResolvables(%s) not implemented\n", channel->asString().c_str());
+       fprintf (stderr, "StoreWorld::removeResItems(%s) not implemented\n", channel->asString().c_str());
 }
 
 
@@ -305,52 +305,52 @@ StoreWorld::clear ()
 }
 
 //---------------------------------------------------------------------------
-// Single resolvable queries
+// Single resItem queries
 
 static bool
-installed_version_cb (constResolvablePtr resolvable, void *data)
+installed_version_cb (constResItemPtr resItem, void *data)
 {
-    constResolvablePtr *installed = (constResolvablePtr *)data;
+    constResItemPtr *installed = (constResItemPtr *)data;
 
-    if (resolvable->isInstalled ()) {
-       *installed = resolvable;
+    if (resItem->isInstalled ()) {
+       *installed = resItem;
        return false;
     }
     return true;
 }
 
 
-constResolvablePtr
-StoreWorld::findInstalledResolvable (constResolvablePtr resolvable)
+constResItemPtr
+StoreWorld::findInstalledResItem (constResItemPtr resItem)
 {
-    constResolvablePtr installed;
+    constResItemPtr installed;
     sync ();
 
-    foreachResolvableByName (resolvable->name(), new Channel(CHANNEL_TYPE_ANY) /* is this right? */, installed_version_cb, &installed);
+    foreachResItemByName (resItem->name(), new Channel(CHANNEL_TYPE_ANY) /* is this right? */, installed_version_cb, &installed);
 
     return installed;
 }
 
 
 //
-// findResolvable 
+// findResItem 
 // @channel: A non-wildcard #Channel.
-// @name: The name of a resolvable.
+// @name: The name of a resItem.
 //
-// Searches the world for a resolvable in the specified channel
+// Searches the world for a resItem in the specified channel
 // with the specified name.  @channel must be an actual
 // channel, not a wildcard.
 //
-// Return value: The matching resolvable, or %NULL if no such
-// resolvable exists.
+// Return value: The matching resItem, or %NULL if no such
+// resItem exists.
 //
 
-constResolvablePtr
-StoreWorld::findResolvable (constChannelPtr channel, const char *name) const
+constResItemPtr
+StoreWorld::findResItem (constChannelPtr channel, const char *name) const
 {
     syncConditional (channel);
-    for (ResolvableTable::const_iterator pos = _resolvables_by_name.lower_bound(name); pos != _resolvables_by_name.upper_bound(name); pos++) {
-       constResolvablePtr res = pos->second;
+    for (ResItemTable::const_iterator pos = _resItems_by_name.lower_bound(name); pos != _resItems_by_name.upper_bound(name); pos++) {
+       constResItemPtr res = pos->second;
        if (res->channel() == channel) {
            return res;
        }
@@ -359,47 +359,47 @@ StoreWorld::findResolvable (constChannelPtr channel, const char *name) const
 }
 
 
-constResolvablePtr
-StoreWorld::findResolvableWithConstraint (constChannelPtr channel, const char *name, constDependencyPtr constraint, bool is_and) const
+constResItemPtr
+StoreWorld::findResItemWithConstraint (constChannelPtr channel, const char *name, constDependencyPtr constraint, bool is_and) const
 {
-       fprintf (stderr, "StoreWorld::findResolvableWithConstraint() not implemented\n");
+       fprintf (stderr, "StoreWorld::findResItemWithConstraint() not implemented\n");
     return 0;
 }
 
 
 ChannelPtr
-StoreWorld::guessResolvableChannel (constResolvablePtr resolvable) const
+StoreWorld::guessResItemChannel (constResItemPtr resItem) const
 {
-       fprintf (stderr, "StoreWorld::guessResolvableChannel(%s) not implemented\n", ((constSpecPtr)resolvable)->asString().c_str());
+       fprintf (stderr, "StoreWorld::guessResItemChannel(%s) not implemented\n", ((constSpecPtr)resItem)->asString().c_str());
     return 0;
 }
 
 
 //-----------------------------------------------------------------------------
-// foreach resolvable
+// foreach resItem
 
 typedef struct {
     ChannelPtr channel;
-    CResolvableFn callback;
+    CResItemFn callback;
     void *data;
     int count;
     bool short_circuit;
-} ForeachResolvableInfo;
+} ForeachResItemInfo;
 
 
 static void
-foreach_resolvable_cb (const string &name, constResolvablePtr resolvable, void *data)
+foreach_resItem_cb (const string &name, constResItemPtr resItem, void *data)
 {
-    ForeachResolvableInfo *info = (ForeachResolvableInfo *)data;
+    ForeachResItemInfo *info = (ForeachResItemInfo *)data;
 
     if (info->short_circuit)
        return;
 
-    /* FIXME: we should filter out dup uninstalled resolvables. */
+    /* FIXME: we should filter out dup uninstalled resItems. */
 
-    if (resolvable && info->channel->equals(resolvable->channel ())) {
+    if (resItem && info->channel->equals(resItem->channel ())) {
        if (info->callback) {
-           if (! info->callback (resolvable, info->data))
+           if (! info->callback (resItem, info->data))
                info->short_circuit = true;
        }
        ++info->count;
@@ -408,18 +408,18 @@ foreach_resolvable_cb (const string &name, constResolvablePtr resolvable, void *
 
 
 int
-StoreWorld::foreachResolvable (ChannelPtr channel, CResolvableFn fn, void *data)
+StoreWorld::foreachResItem (ChannelPtr channel, CResItemFn fn, void *data)
 {
-    return foreachResolvableByName ("", channel, fn, data);
+    return foreachResItemByName ("", channel, fn, data);
 }
 
 
 int
-StoreWorld::foreachResolvableByName (const std::string & name, ChannelPtr channel, CResolvableFn fn, void *data)
+StoreWorld::foreachResItemByName (const std::string & name, ChannelPtr channel, CResItemFn fn, void *data)
 {
     if (name.empty()) {
 
-       ForeachResolvableInfo info;
+       ForeachResItemInfo info;
 
        info.channel = channel;
        info.callback = fn;
@@ -427,32 +427,32 @@ StoreWorld::foreachResolvableByName (const std::string & name, ChannelPtr channe
        info.count = 0;
        info.short_circuit = false;
 
-       for (ResolvableTable::const_iterator iter = _resolvables_by_name.begin(); iter != _resolvables_by_name.end(); iter++) {
-           foreach_resolvable_cb (iter->first, iter->second, (void *)&info);
+       for (ResItemTable::const_iterator iter = _resItems_by_name.begin(); iter != _resItems_by_name.end(); iter++) {
+           foreach_resItem_cb (iter->first, iter->second, (void *)&info);
        }
 
        return info.short_circuit ? -1 : info.count;
     }
 
        
-    ResolvableTable installed;                 // FIXME: <Spec, Resolvable> rc_resolvable_spec_equal
+    ResItemTable installed;                    // FIXME: <Spec, resItem> rc_resItem_spec_equal
     int count = 0;
 
-    for (ResolvableTable::const_iterator iter = _resolvables_by_name.lower_bound(name); iter != _resolvables_by_name.upper_bound(name); iter++) {
-       constResolvablePtr resolvable = iter->second;
-       if (resolvable->isInstalled()) {
-           const string str = ((constSpecPtr)resolvable)->asString();
-           installed.insert (ResolvableTable::value_type(str,resolvable));
+    for (ResItemTable::const_iterator iter = _resItems_by_name.lower_bound(name); iter != _resItems_by_name.upper_bound(name); iter++) {
+       constResItemPtr resItem = iter->second;
+       if (resItem->isInstalled()) {
+           const string str = ((constSpecPtr)resItem)->asString();
+           installed.insert (ResItemTable::value_type(str,resItem));
        }
     }    
 
-    for (ResolvableTable::const_iterator iter = _resolvables_by_name.lower_bound(name); iter != _resolvables_by_name.upper_bound(name); iter++) {
-       constResolvablePtr resolvable = iter->second;
-       if (channel->equals (resolvable->channel())) {
-           if (resolvable->isInstalled()
-               || installed.find(((constSpecPtr)resolvable)->asString()) == installed.end()) {
+    for (ResItemTable::const_iterator iter = _resItems_by_name.lower_bound(name); iter != _resItems_by_name.upper_bound(name); iter++) {
+       constResItemPtr resItem = iter->second;
+       if (channel->equals (resItem->channel())) {
+           if (resItem->isInstalled()
+               || installed.find(((constSpecPtr)resItem)->asString()) == installed.end()) {
                if (fn) {
-                   if (! fn(resolvable, data)) {
+                   if (! fn(resItem, data)) {
                        count = -1;
                        goto finished;
                    }
@@ -469,46 +469,46 @@ finished:
 
 
 int
-StoreWorld::foreachResolvableByMatch (constMatchPtr match, CResolvableFn fn, void *data)
+StoreWorld::foreachResItemByMatch (constMatchPtr match, CResItemFn fn, void *data)
 {
-       fprintf (stderr, "StoreWorld::foreachResolvableByMatch () not implemented\n");
+       fprintf (stderr, "StoreWorld::foreachResItemByMatch () not implemented\n");
     return 0;
 }
 
 
 //-----------------------------------------------------------------------------
-// iterater over resolvables with dependency
+// iterater over resItems with dependency
 
-typedef std::map<constSpecPtr, constResolvableAndDependencyPtr> InstalledTable;
+typedef std::map<constSpecPtr, constResItemAndDependencyPtr> InstalledTable;
 
 int
-StoreWorld::foreachProvidingResolvable (constDependencyPtr dep, ResolvableAndSpecFn fn, void *data)
+StoreWorld::foreachProvidingResItem (constDependencyPtr dep, ResItemAndSpecFn fn, void *data)
 {
     int count = 0;
     InstalledTable installed;
-//fprintf (stderr, "StoreWorld::foreachProvidingResolvable(%s)\n", dep->asString().c_str());
-    for (ResolvableAndDependencyTable::const_iterator iter = _provides_by_name.lower_bound(dep->name()); iter != _provides_by_name.upper_bound(dep->name()); iter++) {
-       constResolvableAndDependencyPtr r_and_d = iter->second;
-       constResolvablePtr res = r_and_d->resolvable();
-//fprintf (stderr, "StoreWorld::foreachProvidingResolvable(): %s\n", res->asString(true).c_str());
+//fprintf (stderr, "StoreWorld::foreachProvidingResItem(%s)\n", dep->asString().c_str());
+    for (ResItemAndDependencyTable::const_iterator iter = _provides_by_name.lower_bound(dep->name()); iter != _provides_by_name.upper_bound(dep->name()); iter++) {
+       constResItemAndDependencyPtr r_and_d = iter->second;
+       constResItemPtr res = r_and_d->resItem();
+//fprintf (stderr, "StoreWorld::foreachProvidingResItem(): %s\n", res->asString(true).c_str());
        if (res != NULL && res->isInstalled ()) {
            installed[res] = r_and_d;
        }
     }
 
-    for (ResolvableAndDependencyTable::const_iterator iter = _provides_by_name.lower_bound(dep->name()); iter != _provides_by_name.upper_bound(dep->name()); iter++) {
-       constResolvableAndDependencyPtr r_and_d = iter->second;
+    for (ResItemAndDependencyTable::const_iterator iter = _provides_by_name.lower_bound(dep->name()); iter != _provides_by_name.upper_bound(dep->name()); iter++) {
+       constResItemAndDependencyPtr r_and_d = iter->second;
 
        if (r_and_d && r_and_d->verifyRelation (dep)) {
-//fprintf (stderr, "found: %s\n", r_and_d->resolvable()->asString(true).c_str());
-           /* If we have multiple identical resolvables in RCWorld,
-              we want to only include the resolvable that is installed and
+//fprintf (stderr, "found: %s\n", r_and_d->resItem()->asString(true).c_str());
+           /* If we have multiple identical resItems in RCWorld,
+              we want to only include the resItem that is installed and
               skip the rest. */
-           if (r_and_d->resolvable()->isInstalled()
-               || installed.find(r_and_d->resolvable()) == installed.end()) {
+           if (r_and_d->resItem()->isInstalled()
+               || installed.find(r_and_d->resItem()) == installed.end()) {
 
                if (fn) {
-                   if (! fn(r_and_d->resolvable(), r_and_d->dependency(), data)) {
+                   if (! fn(r_and_d->resItem(), r_and_d->dependency(), data)) {
                        count = -1;
                        goto finished;
                    }
@@ -524,32 +524,32 @@ StoreWorld::foreachProvidingResolvable (constDependencyPtr dep, ResolvableAndSpe
 }
 
 int
-StoreWorld::foreachRequiringResolvable (constDependencyPtr dep, ResolvableAndDepFn fn, void *data)
+StoreWorld::foreachRequiringResItem (constDependencyPtr dep, ResItemAndDepFn fn, void *data)
 {
     int count = 0;
     InstalledTable installed;
 
 
-    for (ResolvableAndDependencyTable::const_iterator iter = _requires_by_name.lower_bound(dep->name()); iter != _requires_by_name.upper_bound(dep->name()); iter++) {
-       constResolvableAndDependencyPtr r_and_d = iter->second;
-       constResolvablePtr res = r_and_d->resolvable();
+    for (ResItemAndDependencyTable::const_iterator iter = _requires_by_name.lower_bound(dep->name()); iter != _requires_by_name.upper_bound(dep->name()); iter++) {
+       constResItemAndDependencyPtr r_and_d = iter->second;
+       constResItemPtr res = r_and_d->resItem();
        if (res != NULL && res->isInstalled ()) {
 //fprintf (stderr, "is installed: %s\n", res->asString(true).c_str());
            installed[res] = r_and_d;
        }
     }
 
-    for (ResolvableAndDependencyTable::const_iterator iter = _requires_by_name.lower_bound(dep->name()); iter != _requires_by_name.upper_bound(dep->name()); iter++) {
-       constResolvableAndDependencyPtr r_and_d = iter->second;
+    for (ResItemAndDependencyTable::const_iterator iter = _requires_by_name.lower_bound(dep->name()); iter != _requires_by_name.upper_bound(dep->name()); iter++) {
+       constResItemAndDependencyPtr r_and_d = iter->second;
 
        if (r_and_d && r_and_d->dependency()->verifyRelation (dep)) {
 
            /* Skip dups if one of them in installed. */
-           if (r_and_d->resolvable()->isInstalled()
-               || installed.find(r_and_d->resolvable()) == installed.end()) {
+           if (r_and_d->resItem()->isInstalled()
+               || installed.find(r_and_d->resItem()) == installed.end()) {
 
                if (fn) {
-                   if (! fn(r_and_d->resolvable(), r_and_d->dependency(), data)) {
+                   if (! fn(r_and_d->resItem(), r_and_d->dependency(), data)) {
                        count = -1;
                        goto finished;
                    }
@@ -566,33 +566,33 @@ StoreWorld::foreachRequiringResolvable (constDependencyPtr dep, ResolvableAndDep
 
 
 int
-StoreWorld::foreachConflictingResolvable (constDependencyPtr dep, ResolvableAndDepFn fn, void *data)
+StoreWorld::foreachConflictingResItem (constDependencyPtr dep, ResItemAndDepFn fn, void *data)
 {
     int count = 0;
     InstalledTable installed;
-//fprintf (stderr, "StoreWorld::foreachConflictingResolvable (%s)\n", dep->name().c_str());
-    for (ResolvableAndDependencyTable::const_iterator iter = _conflicts_by_name.lower_bound(dep->name()); iter != _conflicts_by_name.upper_bound(dep->name()); iter++) {
-       constResolvableAndDependencyPtr r_and_d = iter->second;
-       constResolvablePtr res = r_and_d->resolvable();
+//fprintf (stderr, "StoreWorld::foreachConflictingResItem (%s)\n", dep->name().c_str());
+    for (ResItemAndDependencyTable::const_iterator iter = _conflicts_by_name.lower_bound(dep->name()); iter != _conflicts_by_name.upper_bound(dep->name()); iter++) {
+       constResItemAndDependencyPtr r_and_d = iter->second;
+       constResItemPtr res = r_and_d->resItem();
 //fprintf (stderr, "==> %s\n", res->asString().c_str());
        if (res != NULL && res->isInstalled ()) {
            installed[res] = r_and_d;
        }
     }
 
-    for (ResolvableAndDependencyTable::const_iterator iter = _conflicts_by_name.lower_bound(dep->name()); iter != _conflicts_by_name.upper_bound(dep->name()); iter++) {
-       constResolvableAndDependencyPtr r_and_d = iter->second;
+    for (ResItemAndDependencyTable::const_iterator iter = _conflicts_by_name.lower_bound(dep->name()); iter != _conflicts_by_name.upper_bound(dep->name()); iter++) {
+       constResItemAndDependencyPtr r_and_d = iter->second;
 
        if (r_and_d)
 //fprintf (stderr, "==> %s verify %s ? %s\n", r_and_d->asString().c_str(), dep->asString().c_str(), r_and_d->verifyRelation (dep) ? "Y" : "N");
        if (r_and_d && r_and_d->verifyRelation (dep)) {
 
            /* Skip dups if one of them in installed. */
-           if (r_and_d->resolvable()->isInstalled()
-               || installed.find(r_and_d->resolvable()) == installed.end()) {
+           if (r_and_d->resItem()->isInstalled()
+               || installed.find(r_and_d->resItem()) == installed.end()) {
 
                if (fn) {
-                   if (! fn(r_and_d->resolvable(), r_and_d->dependency(), data)) {
+                   if (! fn(r_and_d->resItem(), r_and_d->dependency(), data)) {
                        count = -1;
                        goto finished;
                    }
@@ -631,7 +631,7 @@ StoreWorld::removeChannel (constChannelPtr channel)
        || ! containsChannel (channel))
        return;
 
-    removeResolvables (channel);
+    removeResItems (channel);
 
     for (ChannelList::iterator iter = _channels.begin(); iter != _channels.end(); iter++) {
        if ((*iter)->equals (channel)) {
index 3a705a387a63d12bd331b3c3b6abe8dd295a28f0..edb173a6d7b956b67df7671d4b493e99eb2dc638 100644 (file)
 #include <map>
 
 #include <zypp/solver/detail/StoreWorldPtr.h>
-#include <zypp/solver/detail/ResolvableAndDependency.h>
+#include <zypp/solver/detail/ResItemAndDependency.h>
 #include <zypp/solver/detail/PackmanPtr.h>
 #include <zypp/solver/detail/World.h>
-#include <zypp/solver/detail/Resolvable.h>
+#include <zypp/solver/detail/ResItem.h>
 #include <zypp/solver/detail/Match.h>
 
 ///////////////////////////////////////////////////////////////////
@@ -50,13 +50,13 @@ class StoreWorld : public World {
 
     int _freeze_count;
 
-    ResolvableTable _resolvables_by_name;
-    ResolvableAndDependencyTable _provides_by_name;
-    ResolvableAndDependencyTable _requires_by_name;
-    ResolvableAndDependencyTable _conflicts_by_name;
+    ResItemTable _resItems_by_name;
+    ResItemAndDependencyTable _provides_by_name;
+    ResItemAndDependencyTable _requires_by_name;
+    ResItemAndDependencyTable _conflicts_by_name;
 
     PackmanPtr _packman;
-    Kind _resolvable_kind;
+    Kind _resItem_kind;
 
     ChannelList _channels;
 
@@ -81,25 +81,25 @@ class StoreWorld : public World {
 
     // ---------------------------------- methods
 
-    // Add/remove resolvables
+    // Add/remove resItems
 
-    bool addResolvable (constResolvablePtr resolvable);
-    void addResolvablesFromList (const CResolvableList & slist);
-    void removeResolvable (constResolvablePtr resolvable);
-    void removeResolvables (constChannelPtr channel);
+    bool addResItem (constResItemPtr resItem);
+    void addResItemsFromList (const CResItemList & slist);
+    void removeResItem (constResItemPtr resItem);
+    void removeResItems (constChannelPtr channel);
     void clear ();
 
-    // Iterate over resolvables
+    // Iterate over resItems
 
-    virtual int foreachResolvable (ChannelPtr channel, CResolvableFn fn, void *data);
-    virtual int foreachResolvableByName (const std::string & name, ChannelPtr channel, CResolvableFn fn, void *data);
-    virtual int foreachResolvableByMatch (constMatchPtr match, CResolvableFn fn, void *data);
+    virtual int foreachResItem (ChannelPtr channel, CResItemFn fn, void *data);
+    virtual int foreachResItemByName (const std::string & name, ChannelPtr channel, CResItemFn fn, void *data);
+    virtual int foreachResItemByMatch (constMatchPtr match, CResItemFn fn, void *data);
 
     // Iterate across provides or requirement
 
-    virtual int foreachProvidingResolvable (constDependencyPtr dep, ResolvableAndSpecFn fn, void *data);
-    virtual int foreachRequiringResolvable (constDependencyPtr dep, ResolvableAndDepFn fn, void *data);
-    virtual int foreachConflictingResolvable (constDependencyPtr dep, ResolvableAndDepFn fn, void *data);
+    virtual int foreachProvidingResItem (constDependencyPtr dep, ResItemAndSpecFn fn, void *data);
+    virtual int foreachRequiringResItem (constDependencyPtr dep, ResItemAndDepFn fn, void *data);
+    virtual int foreachConflictingResItem (constDependencyPtr dep, ResItemAndDepFn fn, void *data);
 
     // Channels
 
@@ -114,12 +114,12 @@ class StoreWorld : public World {
 
     virtual int foreachChannel (ChannelFn fn, void *data) const;
 
-    // Single resolvable queries
+    // Single resItem queries
 
-    virtual constResolvablePtr findInstalledResolvable (constResolvablePtr resolvable);
-    virtual constResolvablePtr findResolvable (constChannelPtr channel, const char *name) const;
-    virtual constResolvablePtr findResolvableWithConstraint (constChannelPtr channel, const char *name, constDependencyPtr constraint, bool is_and) const;
-    virtual ChannelPtr guessResolvableChannel (constResolvablePtr resolvable) const;
+    virtual constResItemPtr findInstalledResItem (constResItemPtr resItem);
+    virtual constResItemPtr findResItem (constChannelPtr channel, const char *name) const;
+    virtual constResItemPtr findResItemWithConstraint (constChannelPtr channel, const char *name, constDependencyPtr constraint, bool is_and) const;
+    virtual ChannelPtr guessResItemChannel (constResItemPtr resItem) const;
 
 };
     
index 159eea89063e92bebe43b6a8b9484341cb0cc58d..c3d815fe15f14f546c5c3ed4eab814b1f1c4c8f4 100644 (file)
@@ -93,11 +93,11 @@ add_channel_cb (ChannelPtr channel, bool subscribed, void *data)
 
 
 static bool
-add_resolvable_cb (constResolvablePtr res, void *data)
+add_resItem_cb (constResItemPtr res, void *data)
 {
     UndumpWorld *undump = (UndumpWorld *)data;
 
-    undump->addResolvable (res);
+    undump->addResItem (res);
 
     return true;
 }
@@ -118,7 +118,7 @@ void
 UndumpWorld::load (const char *filename)
 {
     if (filename) {
-       extract_packages_from_undump_file (filename, add_channel_cb, add_resolvable_cb, add_lock_cb, (void *)this);
+       extract_packages_from_undump_file (filename, add_channel_cb, add_resItem_cb, add_lock_cb, (void *)this);
     }
 }
 
index 64c0b97767163412020c0516c39c487bdfa6ec16..c61e1245566d1432a0da09d0e29daa38c6260063 100644 (file)
@@ -196,10 +196,10 @@ World::isSubscribed (constChannelPtr channel) const
 
 
 //---------------------------------------------------------------------------
-// Resolvable Locks
+// ResItem Locks
 
 typedef struct {
-    constResolvablePtr resolvable;
+    constResItemPtr resItem;
     WorldPtr world;
     bool is_locked;
 } IsLockedInfo;
@@ -210,7 +210,7 @@ is_locked_cb (constMatchPtr match, void *data)
 {
     IsLockedInfo *info = (IsLockedInfo *)data;
 
-    if (match->test (info->resolvable, info->world)) {
+    if (match->test (info->resItem, info->world)) {
        info->is_locked = true;
        return false;
     }
@@ -220,11 +220,11 @@ is_locked_cb (constMatchPtr match, void *data)
 
 
 bool
-World::resolvableIsLocked (constResolvablePtr resolvable)
+World::resItemIsLocked (constResItemPtr resItem)
 {
     IsLockedInfo info;
 
-    info.resolvable = resolvable;
+    info.resItem = resItem;
     info.world = this;
     info.is_locked = false;
 
@@ -238,14 +238,14 @@ World::resolvableIsLocked (constResolvablePtr resolvable)
 // Transacting
 
 bool
-World::canTransactResolvable (constResolvablePtr resolvable)
+World::canTransactResItem (constResItemPtr resItem)
 {
-  if (getenv("FIXME"))      fprintf (stderr, "World::canTransactResolvable() not implemented\n");
+  if (getenv("FIXME"))      fprintf (stderr, "World::canTransactResItem() not implemented\n");
   return false;
 }
 
 bool
-World::transact (const ResolvableList & installResolvables, const ResolvableList & remove_resolvables, int flags)
+World::transact (const ResItemList & installResItems, const ResItemList & remove_resItems, int flags)
 {
   if (getenv("FIXME"))      fprintf (stderr, "World::transact() not implemented\n");
   return false;
@@ -297,29 +297,29 @@ World::setRefreshFunction (WorldRefreshFn refresh_fn)
 // Upgrades
 
 typedef struct  {
-    constResolvablePtr original_resolvable;
-    CResolvableFn fn;
+    constResItemPtr original_resItem;
+    CResItemFn fn;
     void *data;
     int count;
     WorldPtr world;
 } ForeachUpgradeInfo;
 
 static bool
-foreach_upgrade_cb (constResolvablePtr resolvable, void *data)
+foreach_upgrade_cb (constResItemPtr resItem, void *data)
 {
     ForeachUpgradeInfo *info = (ForeachUpgradeInfo *)data;
     int cmp;
 
-    cmp = GVersion.compare (info->original_resolvable, resolvable);
+    cmp = GVersion.compare (info->original_resItem, resItem);
 
     if (cmp >= 0)                              // original is already better
        return true;
 
-    if (info->world->resolvableIsLocked (resolvable))
+    if (info->world->resItemIsLocked (resItem))
        return true;
 
     if (info->fn)
-       info->fn (resolvable, info->data);
+       info->fn (resItem, info->data);
     ++info->count;
 
     return true;
@@ -328,34 +328,34 @@ foreach_upgrade_cb (constResolvablePtr resolvable, void *data)
 
 // rc_world_foreach_upgrade:
 // @world: An #RCWorld.
-// @resolvable: An #RCResolvable.
+// @resItem: An #RCResItem.
 // @channel: An #RCChannel or channel wildcard.
 // @fn: A callback function.
 // @user_data: Pointer passed to the callback function.
 //
-// Searchs @world for all resolvables whose channel matches
-// @channel and that are an upgrade for @resolvable.
-// (To be precise, an upgrade is a resolvable with the same
-// name as @resolvable but with a greater version number.)
+// Searchs @world for all resItems whose channel matches
+// @channel and that are an upgrade for @resItem.
+// (To be precise, an upgrade is a resItem with the same
+// name as @resItem but with a greater version number.)
 //
-// Return value: The number of matching resolvables
+// Return value: The number of matching resItems
 // that the callback functions was invoked on, or
 // -1 in the case of an error.
 
 int
-World::foreachUpgrade (constResolvablePtr resolvable, ChannelPtr channel, CResolvableFn fn, void *data)
+World::foreachUpgrade (constResItemPtr resItem, ChannelPtr channel, CResItemFn fn, void *data)
 {
     ForeachUpgradeInfo info;
 
     syncConditional (channel);
 
-    info.original_resolvable = resolvable;
+    info.original_resItem = resItem;
     info.fn = fn;
     info.data = data;
     info.count = 0;
     info.world = this;
 
-    foreachResolvableByName (resolvable->name(), channel, foreach_upgrade_cb, (void *)&info);
+    foreachResItemByName (resItem->name(), channel, foreach_upgrade_cb, (void *)&info);
 
     return info.count;
 }
@@ -364,17 +364,17 @@ World::foreachUpgrade (constResolvablePtr resolvable, ChannelPtr channel, CResol
 
 typedef struct {
     WorldPtr world;
-    constResolvablePtr system_resolvable;
-    CResolvableList best_upgrades;
+    constResItemPtr system_resItem;
+    CResItemList best_upgrades;
     bool subscribed_only;
-    ResolvablePairFn fn;
+    ResItemPairFn fn;
     void *data;
     int count;
 } SystemUpgradeInfo;
 
 
 static bool
-foreach_system_upgrade_cb (constResolvablePtr upgrade, void *data)
+foreach_system_upgrade_cb (constResItemPtr upgrade, void *data)
 {
     SystemUpgradeInfo *info = (SystemUpgradeInfo *)data;
     constChannelPtr channel = upgrade->channel();
@@ -385,7 +385,7 @@ foreach_system_upgrade_cb (constResolvablePtr upgrade, void *data)
            return true;
     }
 
-    if (info->world->resolvableIsLocked (upgrade))
+    if (info->world->resItemIsLocked (upgrade))
        return true;
 
     if (info->best_upgrades.empty()) {
@@ -393,12 +393,12 @@ foreach_system_upgrade_cb (constResolvablePtr upgrade, void *data)
     }
     else {
        /* All the versions are equal, so picking the first is fine */
-       constResolvablePtr best_up = info->best_upgrades.front();
+       constResItemPtr best_up = info->best_upgrades.front();
 
        cmp = GVersion.compare (best_up, upgrade);
 
        if (cmp <= 0) {
-           /* We have a new best resolvable... */
+           /* We have a new best resItem... */
            info->best_upgrades.pop_front();
            info->best_upgrades.push_back (upgrade);
        }
@@ -409,22 +409,22 @@ foreach_system_upgrade_cb (constResolvablePtr upgrade, void *data)
 
 
 static void
-foreach_system_resolvable_cb (const string & name, constResolvablePtr resolvable, SystemUpgradeInfo *info)
+foreach_system_resItem_cb (const string & name, constResItemPtr resItem, SystemUpgradeInfo *info)
 {
-    info->system_resolvable = resolvable;
+    info->system_resItem = resItem;
     info->best_upgrades.clear();
 
-    /* If the resolvable is excluded, skip it. */
-    if (info->world->resolvableIsLocked (info->system_resolvable))
+    /* If the resItem is excluded, skip it. */
+    if (info->world->resItemIsLocked (info->system_resItem))
        return;
 
-    info->world->foreachUpgrade (info->system_resolvable, new Channel (CHANNEL_TYPE_NONSYSTEM), foreach_system_upgrade_cb, info);
+    info->world->foreachUpgrade (info->system_resItem, new Channel (CHANNEL_TYPE_NONSYSTEM), foreach_system_upgrade_cb, info);
 
-    for (CResolvableList::const_iterator iter = info->best_upgrades.begin(); iter != info->best_upgrades.end(); iter++) {
-       constResolvablePtr upgrade = *iter;
+    for (CResItemList::const_iterator iter = info->best_upgrades.begin(); iter != info->best_upgrades.end(); iter++) {
+       constResItemPtr upgrade = *iter;
 
        if (info->fn)
-           info->fn (info->system_resolvable, upgrade, info->data);
+           info->fn (info->system_resItem, upgrade, info->data);
 
        ++info->count;
     }
@@ -432,21 +432,21 @@ foreach_system_resolvable_cb (const string & name, constResolvablePtr resolvable
     info->best_upgrades.clear();
 }
 
-typedef map<const string,constResolvablePtr> UniqueTable;
+typedef map<const string,constResItemPtr> UniqueTable;
 
 static bool
-build_unique_table_cb (constResolvablePtr resolvable, void *data)
+build_unique_table_cb (constResItemPtr resItem, void *data)
 {
     UniqueTable *unique_table = (UniqueTable *)data;
 
-    UniqueTable::const_iterator pos = unique_table->find (resolvable->name());
+    UniqueTable::const_iterator pos = unique_table->find (resItem->name());
 
     if (pos != unique_table->end()) {
-       if (GVersion.compare (resolvable, pos->second) <= 0)
+       if (GVersion.compare (resItem, pos->second) <= 0)
            return true;
     }
 
-    (*unique_table)[resolvable->name()] = resolvable;
+    (*unique_table)[resItem->name()] = resItem;
 
     return true;
 }
@@ -459,23 +459,23 @@ build_unique_table_cb (constResolvablePtr resolvable, void *data)
  * @fn: A callback function.
  * @user_data: Pointer to be passed to the callback function.
  *
- * Iterates across all system resolvables in @world for which there
- * exists an upgrade, and passes both the original resolvable and
- * the upgrade resolvable to the callback function.
+ * Iterates across all system resItems in @world for which there
+ * exists an upgrade, and passes both the original resItem and
+ * the upgrade resItem to the callback function.
  *
- * Return value: The number of matching resolvables that the callback
+ * Return value: The number of matching resItems that the callback
  * function was invoked on, or -1 in case of an error.
  **/
 
 int
-World::foreachSystemUpgrade (bool subscribed_only, ResolvablePairFn fn, void *data)
+World::foreachSystemUpgrade (bool subscribed_only, ResItemPairFn fn, void *data)
 {
     SystemUpgradeInfo info;
     UniqueTable unique_table;
 
-    /* rc_world_foreach_resolvable calls rc_world_sync */
+    /* rc_world_foreach_resItem calls rc_world_sync */
 
-    foreachResolvable (new Channel (CHANNEL_TYPE_SYSTEM), build_unique_table_cb, &unique_table);
+    foreachResItem (new Channel (CHANNEL_TYPE_SYSTEM), build_unique_table_cb, &unique_table);
 
     info.world = this;
     info.subscribed_only = subscribed_only;
@@ -484,7 +484,7 @@ World::foreachSystemUpgrade (bool subscribed_only, ResolvablePairFn fn, void *da
     info.count = 0;
 
     for (UniqueTable::const_iterator iter = unique_table.begin(); iter != unique_table.end(); iter++) {
-       foreach_system_resolvable_cb (iter->first, iter->second, &info);
+       foreach_system_resItem_cb (iter->first, iter->second, &info);
     }
 
     return info.count;
@@ -492,14 +492,14 @@ World::foreachSystemUpgrade (bool subscribed_only, ResolvablePairFn fn, void *da
 
 
 PackageUpdateList
-World::getUpgrades (constResolvablePtr resolvable, constChannelPtr channel)
+World::getUpgrades (constResItemPtr resItem, constChannelPtr channel)
 {
     fprintf (stderr, "World::getUpgrades not implemented\n");
   return PackageUpdateList();
 }
 
-constResolvablePtr
-World::getBestUpgrade (constResolvablePtr resolvable, bool subscribed_only)
+constResItemPtr
+World::getBestUpgrade (constResItemPtr resItem, bool subscribed_only)
 {
     fprintf (stderr, "World::getBestUpgrade not implemented\n");
   return 0;
index f030615be868f1aadf668c40a40b2a1150e9762c..63f686fbb4b7c299edb577b1b5dee56475da5b59 100644 (file)
@@ -28,7 +28,7 @@
 
 #include <zypp/solver/detail/WorldPtr.h>
 #include <zypp/solver/detail/MultiWorldPtr.h>
-#include <zypp/solver/detail/Resolvable.h>
+#include <zypp/solver/detail/ResItem.h>
 #include <zypp/solver/detail/Channel.h>
 #include <zypp/solver/detail/Match.h>
 #include <zypp/solver/detail/Pending.h>
@@ -64,8 +64,8 @@ typedef PackmanPtr    (*WorldPackmanFn) (constWorldPtr world, const Kind & kind);
 typedef void           (*WorldSpewFn)    (constWorldPtr world, FILE *out);
 typedef constWorldPtr  (*WorldDupFn)     (constWorldPtr world);
 
-typedef bool           (*WorldCanTransactResolvableFn) (constWorldPtr world, constResolvablePtr resolvable);
-typedef bool           (*WorldTransactFn) (constWorldPtr world, const ResolvableList & install_resolvables, const ResolvableList & remove_resolvables, int flags);
+typedef bool           (*WorldCanTransactResItemFn) (constWorldPtr world, constResItemPtr resItem);
+typedef bool           (*WorldTransactFn) (constWorldPtr world, const ResItemList & install_resItems, const ResItemList & remove_resItems, int flags);
 
 typedef bool           (*WorldGetSubscribedFn) (const World *world, constChannelPtr channel);
 typedef void           (*WorldSetSubscribedFn) (World *world, ChannelPtr channel, bool subs_status);
@@ -77,9 +77,9 @@ typedef void          (*WorldAddLockFn) (constWorldPtr world, constMatchPtr lock);
 typedef void           (*WorldRemoveLockFn) (constWorldPtr world, constMatchPtr lock);
 typedef void           (*WorldClearLockFn) (constWorldPtr world);
 
-typedef int            (*WorldForeachResolvableFn) (constWorldPtr world, const char *name, constChannelPtr channel, ResolvableFn callback, void *user_data);
-typedef int            (*WorldForeachPackageSpecFn) (constWorldPtr world, constDependencyPtr dep, ResolvableAndSpecFn callback, void *user_data);
-typedef int            (*WorldForeachPackageDepFn) (constWorldPtr world, constDependencyPtr dep, ResolvableAndDepFn callback, void *user_data);
+typedef int            (*WorldForeachResItemFn) (constWorldPtr world, const char *name, constChannelPtr channel, ResItemFn callback, void *user_data);
+typedef int            (*WorldForeachPackageSpecFn) (constWorldPtr world, constDependencyPtr dep, ResItemAndSpecFn callback, void *user_data);
+typedef int            (*WorldForeachPackageDepFn) (constWorldPtr world, constDependencyPtr dep, ResItemAndDepFn callback, void *user_data);
 
 typedef void           (*WorldSerializeFn) (constWorldPtr world, constXmlNodePtr root);
 typedef void           (*WorldUnserializeFn) (constWorldPtr world, constXmlNodePtr node);
@@ -101,7 +101,7 @@ class World : public CountedRep {
     /* The sequence numbers gets incremented every
        time the RCWorld is changed. */
 
-    unsigned int _seq_no_resolvables;
+    unsigned int _seq_no_resItems;
     unsigned int _seq_no_channels;
     unsigned int _seq_no_subscriptions;
     unsigned int _seq_no_locks;
@@ -148,12 +148,12 @@ class World : public CountedRep {
     bool isMultiWorld () const { return _type == MULTI_WORLD; }
     bool isServiceWorld () const { return _type == SERVICE_WORLD; }
 
-    unsigned int resolvableSequenceNumber (void) const { return _seq_no_resolvables; }
+    unsigned int resItemSequenceNumber (void) const { return _seq_no_resItems; }
     unsigned int channelSequenceNumber (void) const { return _seq_no_channels; }
     unsigned int subscriptionSequenceNumber (void) const { return _seq_no_subscriptions; }
     unsigned int lockSequenceNumber (void) const { return _seq_no_locks; }
 
-    void touchResolvableSequenceNumber (void) { _seq_no_resolvables++; }
+    void touchResItemSequenceNumber (void) { _seq_no_resItems++; }
     void touchChannelSequenceNumber (void) { _seq_no_channels++; }
     void touchSubscriptionSequenceNumber (void) { _seq_no_subscriptions++; }
     void touchLockSequenceNumber (void) { _seq_no_locks++; }
@@ -189,7 +189,7 @@ class World : public CountedRep {
     virtual ChannelPtr getChannelByAlias (const char *alias) const = 0;
     virtual ChannelPtr getChannelById (const char *channel_id) const = 0;
 
-    // Resolvable Locks
+    // ResItem Locks
 
     virtual int foreachLock (MatchFn fn, void *data) const;
 
@@ -197,42 +197,42 @@ class World : public CountedRep {
     void removeLock (constMatchPtr lock);
     void clearLocks ();
 
-    bool resolvableIsLocked (constResolvablePtr resolvable);
+    bool resItemIsLocked (constResItemPtr resItem);
 
-    // Single resolvable queries
+    // Single resItem queries
 
-    virtual constResolvablePtr findInstalledResolvable (constResolvablePtr resolvable) = 0;
-    virtual constResolvablePtr findResolvable (constChannelPtr channel, const char *name) const = 0;
-    virtual constResolvablePtr findResolvableWithConstraint (constChannelPtr channel, const char *name, constDependencyPtr constraint, bool is_and) const = 0;
-    virtual ChannelPtr guessResolvableChannel (constResolvablePtr resolvable) const = 0;
+    virtual constResItemPtr findInstalledResItem (constResItemPtr resItem) = 0;
+    virtual constResItemPtr findResItem (constChannelPtr channel, const char *name) const = 0;
+    virtual constResItemPtr findResItemWithConstraint (constChannelPtr channel, const char *name, constDependencyPtr constraint, bool is_and) const = 0;
+    virtual ChannelPtr guessResItemChannel (constResItemPtr resItem) const = 0;
 
-    // Iterate across resolvables
+    // Iterate across resItems
 
-    virtual int foreachResolvable (ChannelPtr channel, CResolvableFn fn, void *data) = 0;
-    virtual int foreachResolvableByName (const std::string & name, ChannelPtr channel, CResolvableFn fn, void *user_data) = 0;
-    virtual int foreachResolvableByMatch (constMatchPtr match, CResolvableFn fn, void *user_data) = 0;
+    virtual int foreachResItem (ChannelPtr channel, CResItemFn fn, void *data) = 0;
+    virtual int foreachResItemByName (const std::string & name, ChannelPtr channel, CResItemFn fn, void *user_data) = 0;
+    virtual int foreachResItemByMatch (constMatchPtr match, CResItemFn fn, void *user_data) = 0;
 
     // Iterate across provides or requirement
 
-    virtual int foreachProvidingResolvable (constDependencyPtr dep, ResolvableAndSpecFn fn, void *user_data) = 0;
-    virtual int foreachRequiringResolvable (constDependencyPtr dep, ResolvableAndDepFn fn, void *user_data) = 0;
-    virtual int foreachConflictingResolvable (constDependencyPtr dep, ResolvableAndDepFn fn, void *user_data) = 0;
+    virtual int foreachProvidingResItem (constDependencyPtr dep, ResItemAndSpecFn fn, void *user_data) = 0;
+    virtual int foreachRequiringResItem (constDependencyPtr dep, ResItemAndDepFn fn, void *user_data) = 0;
+    virtual int foreachConflictingResItem (constDependencyPtr dep, ResItemAndDepFn fn, void *user_data) = 0;
 
     // upgrades
 
-    int foreachUpgrade (constResolvablePtr resolvable, ChannelPtr channel, CResolvableFn fn, void *data);
-    PackageUpdateList getUpgrades (constResolvablePtr resolvable, constChannelPtr channel);
-    constResolvablePtr getBestUpgrade (constResolvablePtr resolvable, bool subscribed_only);
-    int foreachSystemUpgrade (bool subscribed_only, ResolvablePairFn fn, void *data);
+    int foreachUpgrade (constResItemPtr resItem, ChannelPtr channel, CResItemFn fn, void *data);
+    PackageUpdateList getUpgrades (constResItemPtr resItem, constChannelPtr channel);
+    constResItemPtr getBestUpgrade (constResItemPtr resItem, bool subscribed_only);
+    int foreachSystemUpgrade (bool subscribed_only, ResItemPairFn fn, void *data);
 
     // provider
 
-    bool getSingleProvider (constDependencyPtr dep, constChannelPtr channel, constResolvablePtr *resolvable);
+    bool getSingleProvider (constDependencyPtr dep, constChannelPtr channel, constResItemPtr *resItem);
 
     // Transacting
 
-    bool  canTransactResolvable (constResolvablePtr resolvable);
-    bool  transact (const ResolvableList & installResolvables, const ResolvableList & remove_resolvables, int flags);
+    bool  canTransactResItem (constResItemPtr resItem);
+    bool  transact (const ResItemList & installResItems, const ResItemList & remove_resItems, int flags);
 
     // XML serialization
 
index f6026848dc7cb1b465a5cfc318c0c8c476516181..b5ab00bd0440295f8f7e046bb560bc8d5f626312 100644 (file)
@@ -731,14 +731,14 @@ XmlParser::dependencyEnd(const char *name)
 /* ------ */
 
 
-static RCResolvableDep *
-rc_xml_node_to_resolvable_dep_internal (const xmlNode *node)
+static RCResItemDep *
+rc_xml_node_to_resItem_dep_internal (const xmlNode *node)
 {
     gchar *name = NULL, *version = NULL, *release = NULL;
     gboolean has_epoch = false;
     guint32 epoch = 0;
-    RCResolvableRelation relation;
-    RCResolvableDep *dep;
+    RCResItemRelation relation;
+    RCResItemDep *dep;
     
     gchar *tmp;
 
@@ -749,7 +749,7 @@ rc_xml_node_to_resolvable_dep_internal (const xmlNode *node)
     name = xml_get_prop (node, "name");
     tmp = xml_get_prop (node, "op");
     if (tmp) {
-       relation = rc_resolvable_relation_from_string (tmp);
+       relation = rc_resItem_relation_from_string (tmp);
        
        has_epoch = xml_get_guint32_value (node, "epoch", &epoch);
 
@@ -760,7 +760,7 @@ rc_xml_node_to_resolvable_dep_internal (const xmlNode *node)
     }
 
     /* FIXME: should get channel from XML */
-    dep = rc_resolvable_dep_new (name, has_epoch, epoch, version, release,
+    dep = rc_resItem_dep_new (name, has_epoch, epoch, version, release,
                                 relation, RC_TYPE_RESOLVABLE, RC_CHANNEL_ANY,
                                 false, false);
 
@@ -770,18 +770,18 @@ rc_xml_node_to_resolvable_dep_internal (const xmlNode *node)
     g_free (release);
 
     return dep;
-} /* rc_xml_node_to_resolvable_dep_internal */
+} /* rc_xml_node_to_resItem_dep_internal */
 
-RCResolvableDep *
-rc_xml_node_to_resolvable_dep (const xmlNode *node)
+RCResItemDep *
+rc_xml_node_to_resItem_dep (const xmlNode *node)
 {
-    RCResolvableDep *dep = NULL;
+    RCResItemDep *dep = NULL;
 
     if (!g_strcasecmp (node->name, "dep")) {
-       dep = rc_xml_node_to_resolvable_dep_internal (node);
+       dep = rc_xml_node_to_resItem_dep_internal (node);
        return (dep);
     } else if (!g_strcasecmp (node->name, "or")) {
-       RCResolvableDepSList *or_dep_slist = NULL;
+       RCResItemDepSList *or_dep_slist = NULL;
        RCDepOr *or;
        xmlNode *iter = node->xmlChildrenNode;
 
@@ -789,7 +789,7 @@ rc_xml_node_to_resolvable_dep (const xmlNode *node)
            if (iter->type == XML_ELEMENT_NODE) {
                or_dep_slist = g_slist_append(
                    or_dep_slist,
-                   rc_xml_node_to_resolvable_dep_internal (iter));
+                   rc_xml_node_to_resItem_dep_internal (iter));
            }
 
            iter = iter->next;
@@ -800,7 +800,7 @@ rc_xml_node_to_resolvable_dep (const xmlNode *node)
     }
 
     return (dep);
-} /* rc_xml_node_to_resolvable_dep */
+} /* rc_xml_node_to_resItem_dep */
 
 /* ------ */
 
index 3f50e88e36fd89a98c96bf88a085ea9aae49f431..be742e33592a70336c050490898651f8720a75b7 100644 (file)
@@ -37,7 +37,7 @@ using namespace std;
 
 
 int
-extract_packages_from_xml_node (XmlNodePtr node, ChannelPtr channel, CResolvableFn callback, void *data)
+extract_packages_from_xml_node (XmlNodePtr node, ChannelPtr channel, CResItemFn callback, void *data)
 {
     PackagePtr package;
     int count = 0;
@@ -77,7 +77,7 @@ extract_packages_from_xml_node (XmlNodePtr node, ChannelPtr channel, CResolvable
 
 
 int 
-extract_packages_from_helix_buffer (const char *buf, size_t len, ChannelPtr channel, CResolvableFn callback, void *data)
+extract_packages_from_helix_buffer (const char *buf, size_t len, ChannelPtr channel, CResItemFn callback, void *data)
 {
     unsigned int count = 0;
     PackageList packages;
@@ -109,7 +109,7 @@ extract_packages_from_helix_buffer (const char *buf, size_t len, ChannelPtr chan
 
 
 int
-extract_packages_from_helix_file (const string & filename, ChannelPtr channel, CResolvableFn callback, void *data)
+extract_packages_from_helix_file (const string & filename, ChannelPtr channel, CResItemFn callback, void *data)
 {
     Buffer *buf;
     int count;
@@ -130,7 +130,7 @@ extract_packages_from_helix_file (const string & filename, ChannelPtr channel, C
 
 
 int
-extract_packages_from_undump_buffer (const char *buf, size_t len, ChannelAndSubscribedFn channel_callback, CResolvableFn resolvable_callback, MatchFn lock_callback, void *data)
+extract_packages_from_undump_buffer (const char *buf, size_t len, ChannelAndSubscribedFn channel_callback, CResItemFn resItem_callback, MatchFn lock_callback, void *data)
 {
     xmlDoc *doc;
     XmlNodePtr dump_node;
@@ -184,7 +184,7 @@ extract_packages_from_undump_buffer (const char *buf, size_t len, ChannelAndSubs
                channel_callback (system_channel, false, data);
            }
            
-           subcount = extract_packages_from_xml_node (channel_node, system_channel, resolvable_callback, data);
+           subcount = extract_packages_from_xml_node (channel_node, system_channel, resItem_callback, data);
 
            if (subcount < 0) {
                /* Do something clever */
@@ -203,9 +203,9 @@ extract_packages_from_undump_buffer (const char *buf, size_t len, ChannelAndSubs
                channel_callback (current_channel, subscribed != 0, data);
            }
 
-           if (resolvable_callback) {
+           if (resItem_callback) {
                int subcount;
-               subcount = extract_packages_from_xml_node (channel_node, current_channel, resolvable_callback, data);
+               subcount = extract_packages_from_xml_node (channel_node, current_channel, resItem_callback, data);
                if (subcount < 0) {
                    /* FIXME: do something clever */
                    fprintf (stderr, "No packages found\n");
@@ -225,7 +225,7 @@ extract_packages_from_undump_buffer (const char *buf, size_t len, ChannelAndSubs
 
 
 int
-extract_packages_from_undump_file (const string & filename, ChannelAndSubscribedFn channel_callback, CResolvableFn resolvable_callback, MatchFn lock_callback, void *data)
+extract_packages_from_undump_file (const string & filename, ChannelAndSubscribedFn channel_callback, CResItemFn resItem_callback, MatchFn lock_callback, void *data)
 {
     Buffer *buf;
     int count;
@@ -237,7 +237,7 @@ extract_packages_from_undump_file (const string & filename, ChannelAndSubscribed
     if (buf == NULL)
        return -1;
 
-    count = extract_packages_from_undump_buffer ((const char *)(buf->data), buf->size, channel_callback, resolvable_callback, lock_callback, data);
+    count = extract_packages_from_undump_buffer ((const char *)(buf->data), buf->size, channel_callback, resItem_callback, lock_callback, data);
 
     buffer_unmap_file (buf);
 
@@ -247,13 +247,13 @@ extract_packages_from_undump_file (const string & filename, ChannelAndSubscribed
 #if 0
 /* ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** */
 
-static ResolvablePtr
+static ResItemPtr
 fill_debian_package (const char *buf, const char *url_prefix, int *off)
 {
     const char *ibuf;
     RCPackageUpdate *up = NULL;
-    ResolvablePtr r;
-    ResolvableList requires, provides, conflicts, suggests, recommends;
+    ResItemPtr r;
+    ResItemList requires, provides, conflicts, suggests, recommends;
 
     up = rc_package_update_new ();
 
@@ -323,7 +323,7 @@ fill_debian_package (const char *buf, const char *url_prefix, int *off)
        }
 
        if (!strncmp (key, "package", strlen ("package"))) {
-           rc_resolvable_spec_set_name (RC_RESOLVABLE_SPEC (pkg), value->str);
+           rc_resItem_spec_set_name (RC_RESOLVABLE_SPEC (pkg), value->str);
        } else if (!strncmp (key, "installed-size",
                             strlen ("installed-size"))) {
            up->installed_size = strtoul (value->str, NULL, 10) * 1024;
@@ -347,7 +347,7 @@ fill_debian_package (const char *buf, const char *url_prefix, int *off)
                pkg->description = g_strconcat (newline + 1, "\n", NULL);
            }
        } else if (!strncmp (key, "version", strlen ("version"))) {
-           RCResolvableSpec *spec = RC_RESOLVABLE_SPEC (pkg);
+           RCResItemSpec *spec = RC_RESOLVABLE_SPEC (pkg);
            rc_version_parse (value->str, spec);
        } else if (!strncmp (key, "section", strlen ("section"))) {
            pkg->section = rc_debman_section_to_package_section (value->str);
@@ -387,7 +387,7 @@ fill_debian_package (const char *buf, const char *url_prefix, int *off)
        } else if (!strncmp (key, "md5sum", strlen ("md5sum"))) {
            up->md5sum = strdup (value->str);
        } else if (!strncmp (key, "architecture", strlen ("architecture"))) {
-           rc_resolvable_spec_set_arch (RC_RESOLVABLE_SPEC (pkg), rc_arch_from_string (value->str));
+           rc_resItem_spec_set_arch (RC_RESOLVABLE_SPEC (pkg), rc_arch_from_string (value->str));
        }
 
        g_string_free (value, true);
@@ -395,25 +395,25 @@ fill_debian_package (const char *buf, const char *url_prefix, int *off)
 
     up->importance = RC_IMPORTANCE_SUGGESTED;
     up->description = strdup ("Upstream Debian release");
-    rc_resolvable_spec_copy (rc_package_update_get_spec(up), RC_RESOLVABLE_SPEC (pkg));
+    rc_resItem_spec_copy (rc_package_update_get_spec(up), RC_RESOLVABLE_SPEC (pkg));
     rc_package_add_update (pkg, up);
 
     r = RC_RESOLVABLE (pkg);
 
     /* Make sure to provide myself, for the dep code! */
-    provides = g_slist_append (provides, rc_resolvable_dep_new_from_spec
+    provides = g_slist_append (provides, rc_resItem_dep_new_from_spec
                               (RC_RESOLVABLE_SPEC (pkg),
                                RC_RELATION_EQUAL,
                                RC_TYPE_PACKAGE,
-                               rc_resolvable_get_channel (r),
+                               rc_resItem_get_channel (r),
                                false, false));
 
-    rc_resolvable_set_requires  (r, requires);
-    rc_resolvable_set_provides  (r, provides);
-    rc_resolvable_set_conflicts (r, conflicts);
-    rc_resolvable_set_obsoletes (r, NULL);
-    rc_resolvable_set_suggests  (r, suggests);
-    rc_resolvable_set_recommends(r, recommends);
+    rc_resItem_set_requires  (r, requires);
+    rc_resItem_set_provides  (r, provides);
+    rc_resItem_set_conflicts (r, conflicts);
+    rc_resItem_set_obsoletes (r, NULL);
+    rc_resItem_set_suggests  (r, suggests);
+    rc_resItem_set_recommends(r, recommends);
     /* returns the number of characters we processed */
     return ibuf - buf;
 }
@@ -421,7 +421,7 @@ fill_debian_package (const char *buf, const char *url_prefix, int *off)
 #endif
 
 int 
-extract_packages_from_debian_buffer (const char *buf, size_t len, ChannelPtr channel, CResolvableFn callback, void *data)
+extract_packages_from_debian_buffer (const char *buf, size_t len, ChannelPtr channel, CResItemFn callback, void *data)
 {
     const char *pos;
     int count = 0;
@@ -433,14 +433,14 @@ extract_packages_from_debian_buffer (const char *buf, size_t len, ChannelPtr cha
        int off;
 
        /* All debian packages "have" epochs */
-       ResolvablePtr resolvable = fill_debian_package (iter, channel->getFilePath (), &off);
+       ResItemPtr resItem = fill_debian_package (iter, channel->getFilePath (), &off);
 
-       resolvable->setEpoch (0);
-       resolvable->setArch (Arch::Noarch);
-       resolvable->setChannel (channel);
+       resItem->setEpoch (0);
+       resItem->setArch (Arch::Noarch);
+       resItem->setChannel (channel);
 
        if (callback)
-           callback (resolvable, data);
+           callback (resItem, data);
 
        ++count;
 
@@ -452,7 +452,7 @@ extract_packages_from_debian_buffer (const char *buf, size_t len, ChannelPtr cha
 
 
 int
-extract_packages_from_debian_file (const string & filename, ChannelPtr channel, CResolvableFn callback, void *data)
+extract_packages_from_debian_file (const string & filename, ChannelPtr channel, CResItemFn callback, void *data)
 {
     Buffer *buf;
     int count;
@@ -515,7 +515,7 @@ extract_yum_package (const guint8 *data, size_t len,
     rc_rpmman_depends_fill (rpmman, h, p, true);
 
     pu = rc_package_update_new ();
-    rc_resolvable_spec_copy (rc_package_update_get_spec (pu), RC_RESOLVABLE_SPEC (p));
+    rc_resItem_spec_copy (rc_package_update_get_spec (pu), RC_RESOLVABLE_SPEC (p));
     pu->importance = RC_IMPORTANCE_SUGGESTED;
     pu->description = strdup ("No information available.");
     pu->package_url = url;
@@ -532,7 +532,7 @@ int
 extract_packages_from_aptrpm_buffer (const guint8 *data, size_t len,
                                        RCPackman *packman,
                                        ChannelPtr channel,
-                                       CResolvableFn callback,
+                                       CResItemFn callback,
                                        void * user_data)
 {
 #ifndef ENABLE_RPM
@@ -545,7 +545,7 @@ extract_packages_from_aptrpm_buffer (const guint8 *data, size_t len,
     const int hdrmagic_len = 8;
     const char *hdrmagic;
     const guint8 *cur_ptr;
-    RCResolvableSpec *spec;
+    RCResItemSpec *spec;
 
 
     g_return_val_if_fail (packman != NULL, -1);
@@ -609,10 +609,10 @@ extract_packages_from_aptrpm_buffer (const guint8 *data, size_t len,
        rc_rpmman_read_header (rpmman, h, p);
        rc_rpmman_depends_fill (rpmman, h, p, true);
 
-       rc_resolvable_set_channel (RC_RESOLVABLE (p), channel);
+       rc_resItem_set_channel (RC_RESOLVABLE (p), channel);
 
        pu = rc_package_update_new ();
-       rc_resolvable_spec_copy (rc_package_update_get_spec (pu), RC_RESOLVABLE_SPEC (p));
+       rc_resItem_spec_copy (rc_package_update_get_spec (pu), RC_RESOLVABLE_SPEC (p));
        pu->importance = RC_IMPORTANCE_SUGGESTED;
        pu->description = strdup ("No information available.");
 
@@ -620,15 +620,15 @@ extract_packages_from_aptrpm_buffer (const guint8 *data, size_t len,
        spec = RC_RESOLVABLE_SPEC (p);
        pu->package_url = strdup_printf ("%s/%s-%s-%s.%s.rpm",
                                           rc_channel_get_file_path (channel),
-                                          rc_resolvable_spec_get_name (spec),
-                                          rc_resolvable_spec_get_version (spec),
-                                          rc_resolvable_spec_get_release (spec),
+                                          rc_resItem_spec_get_name (spec),
+                                          rc_resItem_spec_get_version (spec),
+                                          rc_resItem_spec_get_release (spec),
                                           archstr);
 
        p->history = g_slist_append (p->history, pu);
 
        if (callback)
-           callback ((RCResolvable *) p, user_data);
+           callback ((RCResItem *) p, user_data);
 
        g_object_unref (p);
 
@@ -664,7 +664,7 @@ int
 extract_packages_from_aptrpm_file (const char *filename,
                                      RCPackman *packman,
                                      ChannelPtr channel,
-                                     CResolvableFn callback,
+                                     CResItemFn callback,
                                      void * user_data)
 {
     WorldPtr world = *((WorldPtr *)data);
@@ -715,7 +715,7 @@ hash_recurse_cb (PackagePtr pkg, void * user_data)
 }
 
 struct HashIterInfo {
-    CResolvableFn callback;
+    CResItemFn callback;
     void * user_data;
     int count;
 };
@@ -723,7 +723,7 @@ struct HashIterInfo {
 static void
 hash_iter_cb (void * key, void * val, void * user_data)
 {
-    RCResolvable *r = val;
+    RCResItem *r = val;
     struct HashIterInfo *info = user_data;
 
     if (info->callback)
@@ -740,14 +740,14 @@ add_fake_history (PackagePtr pkg)
     RCPackageUpdate *up;
 
     up = rc_package_update_new ();
-    rc_resolvable_spec_copy ((RCResolvableSpec *) up,
+    rc_resItem_spec_copy ((RCResItemSpec *) up,
                             RC_RESOLVABLE_SPEC (pkg));
     up->importance = RC_IMPORTANCE_SUGGESTED;
     rc_package_add_update (pkg, up);
 }
 
 typedef struct {
-    CResolvableFn user_callback;
+    CResItemFn user_callback;
     void *    user_data;
     const gchar *path;
 } PackagesFromDirInfo;
@@ -766,7 +766,7 @@ packages_from_dir_cb (PackagePtr package, void * user_data)
                                                  update->package_url,
                                                  NULL);
     if (info->user_callback)
-       return info->user_callback ((RCResolvable *)package, info->user_data);
+       return info->user_callback ((RCResItem *)package, info->user_data);
 
     return true;
 }
@@ -776,7 +776,7 @@ extract_packages_from_directory (const char *path,
                                    ChannelPtr channel,
                                    RCPackman *packman,
                                    bool recursive,
-                                   CResolvableFn callback,
+                                   CResItemFn callback,
                                    void * user_data)
 {
     WorldPtr world = *((WorldPtr *)data);
@@ -913,7 +913,7 @@ extract_packages_from_directory (const char *path,
 
            pkg = rc_packman_query_file (packman, file_path, true);
            if (pkg != NULL) {
-               rc_resolvable_set_channel (RC_RESOLVABLE (pkg), channel);
+               rc_resItem_set_channel (RC_RESOLVABLE (pkg), channel);
                pkg->package_filename = strdup (file_path);
                pkg->local_package = false;
                add_fake_history (pkg);
index f5268ec2d41126510a505af14bf65627162385e8..afac1ec671a6094a0a609ad880f7215abd2a40b3 100644 (file)
@@ -31,7 +31,7 @@
 #include <zypp/solver/detail/XmlNode.h>
 #include <zypp/solver/detail/Channel.h>
 #include <zypp/solver/detail/Pending.h>
-#include <zypp/solver/detail/Resolvable.h>
+#include <zypp/solver/detail/ResItem.h>
 #include <zypp/solver/detail/Package.h>
 #include <zypp/solver/detail/Match.h>
 #include <zypp/solver/detail/StoreWorldPtr.h>
@@ -42,23 +42,23 @@ namespace ZYPP {
 //////////////////////////////////////////////////////////////////
 
 
-int extract_packages_from_helix_buffer (const char data[], size_t len, ChannelPtr channel, CResolvableFn callback, void *data);
-int extract_packages_from_helix_file (const std::string & filename, ChannelPtr channel, CResolvableFn callback, void *data);
+int extract_packages_from_helix_buffer (const char data[], size_t len, ChannelPtr channel, CResItemFn callback, void *data);
+int extract_packages_from_helix_file (const std::string & filename, ChannelPtr channel, CResItemFn callback, void *data);
 
-int extract_packages_from_xml_node (constXmlNodePtr node, ChannelPtr channel, ResolvableFn callback, void *data);
+int extract_packages_from_xml_node (constXmlNodePtr node, ChannelPtr channel, ResItemFn callback, void *data);
 
-int extract_packages_from_debian_buffer (const char *data, size_t len, ChannelPtr channel, CResolvableFn callback, void *data);
-int extract_packages_from_debian_file (const std::string & filename, ChannelPtr channel, CResolvableFn callback, void *data);
+int extract_packages_from_debian_buffer (const char *data, size_t len, ChannelPtr channel, CResItemFn callback, void *data);
+int extract_packages_from_debian_file (const std::string & filename, ChannelPtr channel, CResItemFn callback, void *data);
 
 PackagePtr extract_yum_package (const char *data, size_t len, PackmanPtr packman, const std::string & url);
 
-int extract_packages_from_aptrpm_buffer (const char *data, size_t len, PackmanPtr packman, ChannelPtr channel, ResolvableFn callback, void *data);
-int extract_packages_from_aptrpm_file (const std::string & filename, PackmanPtr packman, ChannelPtr channel, ResolvableFn callback, void *data);
+int extract_packages_from_aptrpm_buffer (const char *data, size_t len, PackmanPtr packman, ChannelPtr channel, ResItemFn callback, void *data);
+int extract_packages_from_aptrpm_file (const std::string & filename, PackmanPtr packman, ChannelPtr channel, ResItemFn callback, void *data);
 
-int extract_packages_from_undump_buffer (const char *data, size_t len, ChannelAndSubscribedFn channel_callback, CResolvableFn package_callback, MatchFn lock_callback, void *data);
-int extract_packages_from_undump_file (const std::string & filename, ChannelAndSubscribedFn channel_callback, CResolvableFn package_callback, MatchFn lock_callback, void *data);
+int extract_packages_from_undump_buffer (const char *data, size_t len, ChannelAndSubscribedFn channel_callback, CResItemFn package_callback, MatchFn lock_callback, void *data);
+int extract_packages_from_undump_file (const std::string & filename, ChannelAndSubscribedFn channel_callback, CResItemFn package_callback, MatchFn lock_callback, void *data);
 
-int extract_packages_from_directory (const std::string & path, ChannelPtr channel, PackmanPtr packman, bool recursive, ResolvableFn callback, void *data);
+int extract_packages_from_directory (const std::string & path, ChannelPtr channel, PackmanPtr packman, bool recursive, ResItemFn callback, void *data);
 
 ///////////////////////////////////////////////////////////////////
 }; // namespace ZYPP
index fe5c1eaad642cf23d2ae68d3f69edb74bee7af04..531455d5d30c7e64c07814d81ade8da41568d562 100644 (file)
@@ -25,7 +25,7 @@
 #include <zypp/solver/detail/Channel.h>
 #include <zypp/solver/detail/Dependency.h>
 #include <zypp/solver/detail/Match.h>
-#include <zypp/solver/detail/Resolvable.h>
+#include <zypp/solver/detail/ResItem.h>
 #include <zypp/solver/detail/Spec.h>
 #include <zypp/solver/detail/Version.h>
 #include <zypp/solver/detail/World.h>
index b763ac014d47a9d9cd75b0a77b0c02065fa33fbc..35beb1f72eb3ef181ea4067945b8e85d7c094fcf 100644 (file)
@@ -60,41 +60,41 @@ typedef list<unsigned int> ChecksumList;
 
 #if 0
 static void
-lock_resolvable (ResolvablePtr resolvable)
+lock_resItem (ResItemPtr resItem)
 {
-    RCResolvableDep *dep;
-    RCResolvableMatch *match;
+    RCResItemDep *dep;
+    RCResItemMatch *match;
 
-    dep = rc_resolvable_dep_new_from_spec (RC_RESOLVABLE_SPEC (resolvable),
+    dep = rc_resItem_dep_new_from_spec (RC_RESOLVABLE_SPEC (resItem),
                                        RC_RELATION_EQUAL, RC_TYPE_RESOLVABLE,
                                        RC_CHANNEL_ANY, false, false);
 
-    match = rc_resolvable_match_new ();
-    rc_resolvable_match_set_dep (match, dep);
+    match = rc_resItem_match_new ();
+    rc_resItem_match_set_dep (match, dep);
 
-    rc_resolvable_dep_unref (dep);
+    rc_resItem_dep_unref (dep);
 
     rc_world_add_lock (rc_get_world (), match);
 }
 
 
 static bool
-remove_resolvable_cb (RCWorld *world, gpointer user_data)
+remove_resItem_cb (RCWorld *world, gpointer user_data)
 {
-    ResolvablePtr resolvable = user_data;
+    ResItemPtr resItem = user_data;
 
-    rc_world_store_remove_resolvable (RC_WORLD_STORE (world), resolvable);
+    rc_world_store_remove_resItem (RC_WORLD_STORE (world), resItem);
 
     return true;
 }
 
 
 static void
-remove_resolvable (ResolvablePtr resolvable)
+remove_resItem (ResItemPtr resItem)
 {
     rc_world_multi_foreach_subworld_by_type (RC_WORLD_MULTI (world),
                                             RC_TYPE_WORLD_STORE,
-                                            remove_resolvable_cb, resolvable);
+                                            remove_resItem_cb, resItem);
 }
 
 /* ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** */
@@ -110,36 +110,36 @@ remove_resolvable (ResolvablePtr resolvable)
 typedef list<string> StringList;
 
 static void
-assemble_install_cb (constResolvablePtr resolvable,
-                    ResolvableStatus status,
+assemble_install_cb (constResItemPtr resItem,
+                    ResItemStatus status,
                     void *data)
 {
     StringList *slist = (StringList *)data;
-    string str = stringutil::form ("%-7s ",  resolvable->isInstalled() ? "|flag" : "install");
-    str += resolvable->asString();
+    string str = stringutil::form ("%-7s ",  resItem->isInstalled() ? "|flag" : "install");
+    str += resItem->asString();
 
     slist->push_back (str);
 }
 
 
 static void
-assemble_uninstall_cb (constResolvablePtr resolvable,
-                      ResolvableStatus status,
+assemble_uninstall_cb (constResItemPtr resItem,
+                      ResItemStatus status,
                       void *data)
 {
     StringList *slist = (StringList *)data;
-    string str = stringutil::form ("%-7s ",  resolvable->isInstalled() ? "remove" : "|unflag");
-    str += resolvable->asString();
+    string str = stringutil::form ("%-7s ",  resItem->isInstalled() ? "remove" : "|unflag");
+    str += resItem->asString();
 
     slist->push_back (str);
 }
 
 
 static void
-assemble_upgrade_cb (constResolvablePtr res1,
-                    ResolvableStatus status1,
-                    constResolvablePtr res2,
-                    ResolvableStatus status2,
+assemble_upgrade_cb (constResItemPtr res1,
+                    ResItemStatus status1,
+                    constResItemPtr res2,
+                    ResItemStatus status2,
                     void *data)
 {
     StringList *slist = (StringList *)data;
@@ -235,9 +235,9 @@ print_solution (ResolverContextPtr context, int *count, ChecksumList & checksum_
 
 //---------------------------------------------------------------------------------------------------------------------
 static bool
-mark_as_system_cb (constResolvablePtr resolvable, void *unused)
+mark_as_system_cb (constResItemPtr resItem, void *unused)
 {
-    ResolvablePtr r = ResolvablePtr::cast_away_const(resolvable);
+    ResItemPtr r = ResItemPtr::cast_away_const(resItem);
     r->setInstalled (true);
 
     return true;
@@ -275,11 +275,11 @@ get_channel (const char *channel_name)
 }
 
 
-static constResolvablePtr
-get_resolvable (const char *channel_name, const char *package_name)
+static constResItemPtr
+get_resItem (const char *channel_name, const char *package_name)
 {
     constChannelPtr channel;
-    constResolvablePtr resolvable;
+    constResItemPtr resItem;
 
     channel = get_channel (channel_name);
 
@@ -288,24 +288,24 @@ get_resolvable (const char *channel_name, const char *package_name)
        return NULL;
     }
 
-    resolvable = world->findResolvable (channel, package_name);
+    resItem = world->findResItem (channel, package_name);
 
-    if (resolvable == NULL) {
+    if (resItem == NULL) {
        fprintf (stderr, "Can't find package '%s' in channel '%s': no such package\n", package_name, channel_name);
        return NULL;
     }
 
-    return resolvable;
+    return resItem;
 }
 
 //---------------------------------------------------------------------------------------------------------------------
 // setup related functions
 
 static bool
-add_to_world_cb (constResolvablePtr resolvable, void *data)
+add_to_world_cb (constResItemPtr resItem, void *data)
 {
     WorldPtr world = *((WorldPtr *)data);
-    ((StoreWorldPtr)world)->addResolvable (resolvable);
+    ((StoreWorldPtr)world)->addResItem (resItem);
 
     return true;
 }
@@ -356,7 +356,7 @@ load_channel (const string & name, const string & filename, const string & type,
     }
 
     if (system_packages) {
-       store->foreachResolvable (channel, mark_as_system_cb, NULL);
+       store->foreachResItem (channel, mark_as_system_cb, NULL);
     }
 
     printf ("Loaded %d package%s from %s\n", count, count == 1 ? "" : "s", pathname.c_str()); fflush (stdout);
@@ -403,14 +403,14 @@ parse_xml_setup (XmlNodePtr node)
        } else if (node->equals ("force-install")) {
            const char *channel_name = node->getProp ("channel");
            const char *package_name = node->getProp ("package");
-           constResolvablePtr resolvable;
+           constResItemPtr resItem;
            constChannelPtr system_channel;
 
            assertExit (channel_name);
            assertExit (package_name);
 
-           resolvable = get_resolvable (channel_name, package_name);
-           if (resolvable) {
+           resItem = get_resItem (channel_name, package_name);
+           if (resItem) {
                printf (">!> Force-installing %s from channel %s\n", package_name, channel_name);
 
                system_channel = world->getChannelById ("@system");
@@ -418,7 +418,7 @@ parse_xml_setup (XmlNodePtr node)
                if (!system_channel)
                    fprintf (stderr, "No system channel available!\n");
 
-               ResolvablePtr r = ResolvablePtr::cast_away_const(resolvable);
+               ResItemPtr r = ResItemPtr::cast_away_const(resItem);
                r->setChannel (system_channel);
                r->setInstalled (true);
            } else {
@@ -429,12 +429,12 @@ parse_xml_setup (XmlNodePtr node)
            free ((void *)package_name);
        } else if (node->equals ("force-uninstall")) {
            const char *package_name = node->getProp ("package");
-           constResolvablePtr resolvable;
+           constResItemPtr resItem;
 
            assertExit (package_name);
-           resolvable = get_resolvable ("@system", package_name);
+           resItem = get_resItem ("@system", package_name);
            
-           if (! resolvable) {
+           if (! resItem) {
                fprintf (stderr, "Can't force-uninstall installed package '%s'\n", package_name);
            } else {
                printf (">!> Force-uninstalling '%s'\n", package_name);
@@ -444,15 +444,15 @@ parse_xml_setup (XmlNodePtr node)
        } else if (node->equals ("lock")) {
            const char *channel_name = node->getProp ("channel");
            const char *package_name = node->getProp ("package");
-           constResolvablePtr resolvable;
+           constResItemPtr resItem;
 
            assertExit (channel_name);
            assertExit (package_name);
 
-           resolvable = get_resolvable (channel_name, package_name);
-           if (resolvable) {
+           resItem = get_resItem (channel_name, package_name);
+           if (resItem) {
                printf (">!> Locking %s from channel %s\n", package_name, channel_name);
-               ResolvablePtr r = ResolvablePtr::cast_away_const(resolvable);
+               ResItemPtr r = ResItemPtr::cast_away_const(resItem);
                r->setLocked (true);
            } else {
                fprintf (stderr, "Unknown package %s::%s\n", channel_name, package_name);
@@ -532,11 +532,11 @@ report_solutions (Resolver & resolver)
 
 
 static bool
-trial_upgrade_cb (constResolvablePtr original, constResolvablePtr upgrade, void *user_data)
+trial_upgrade_cb (constResItemPtr original, constResItemPtr upgrade, void *user_data)
 {
     Resolver *resolver = (Resolver *)user_data;
 
-    resolver->addResolvableToInstall (upgrade);
+    resolver->addResItemToInstall (upgrade);
 
     printf (">!> Upgrading %s => %s\n", original->asString().c_str(), upgrade->asString().c_str());
 
@@ -610,15 +610,15 @@ parse_xml_trial (XmlNodePtr node)
 
            const char *channel_name = node->getProp ("channel");
            const char *package_name = node->getProp ("package");
-           constResolvablePtr resolvable;
+           constResItemPtr resItem;
 
            assertExit (channel_name);
            assertExit (package_name);
 
-           resolvable = get_resolvable (channel_name, package_name);
-           if (resolvable) {
+           resItem = get_resItem (channel_name, package_name);
+           if (resItem) {
                printf (">!> Installing %s from channel %s\n", package_name, channel_name);
-               resolver.addResolvableToInstall (resolvable);
+               resolver.addResItemToInstall (resItem);
            } else {
                fprintf (stderr, "Unknown package %s::%s\n", channel_name, package_name);
            }
@@ -629,14 +629,14 @@ parse_xml_trial (XmlNodePtr node)
        } else if (node->equals ("uninstall")) {
 
            const char *package_name = node->getProp ("package");
-           constResolvablePtr resolvable;
+           constResItemPtr resItem;
 
            assertExit (package_name);
 
-           resolvable = get_resolvable ("@system", package_name);
-           if (resolvable) {
+           resItem = get_resItem ("@system", package_name);
+           if (resItem) {
                printf (">!> Uninstalling %s\n", package_name);
-               resolver.addResolvableToRemove (resolvable);
+               resolver.addResItemToRemove (resItem);
            } else {
                fprintf (stderr, "Unknown system package %s\n", package_name);
            }