- isInstalled/isUninstalled is private now, it doesn't give the needed information...
authorKlaus Kaempf <kkaempf@suse.de>
Sun, 5 Feb 2006 23:52:53 +0000 (23:52 +0000)
committerKlaus Kaempf <kkaempf@suse.de>
Sun, 5 Feb 2006 23:52:53 +0000 (23:52 +0000)
- use 'impossible' to mark uninstallable items
- fix status access in ResolverContext
- use hashed pool access in QueueItemUninstall

zypp/solver/detail/Helper.cc
zypp/solver/detail/InstallOrder.cc
zypp/solver/detail/QueueItemConflict.cc
zypp/solver/detail/QueueItemEstablish.cc
zypp/solver/detail/QueueItemInstall.cc
zypp/solver/detail/QueueItemRequire.cc
zypp/solver/detail/QueueItemUninstall.cc
zypp/solver/detail/Resolver.cc
zypp/solver/detail/ResolverContext.cc
zypp/solver/detail/ResolverContext.h
zypp/solver/detail/ResolverUpgrade.cc

index 9602e2a..50548c3 100644 (file)
@@ -86,14 +86,14 @@ Helper::findInstalledByNameAndKind (const ResPool & pool, const string & name, c
        ResPool::const_nameiterator pend = pool.nameend(name);
        for (ResPool::const_nameiterator it = pool.namebegin(name); it != pend; ++it) {
            PoolItem item = it->second;
-           if (item.status().isInstalled()
+           if (item.status().staysInstalled()
                && item->kind() == kind) {
                if (!info( it->second ))
                    break;
            }
        }
 
-    _DEBUG("Helper::findInstalledByNameAndKind (" << name << ", " << kind << ") => " << info.installed);
+    _XDEBUG("Helper::findInstalledByNameAndKind (" << name << ", " << kind << ") => " << info.installed);
     return info.installed;
 }
 
@@ -141,7 +141,7 @@ Helper::findUpdateItem (const ResPool & pool, PoolItem_Ref item)
        ResPool::const_nameiterator pend = pool.nameend(item->name());
        for (ResPool::const_nameiterator it = pool.namebegin(item->name()); it != pend; ++it) {
            PoolItem pos = it->second;
-           if (pos.status().isUninstalled()
+           if (pos.status().staysUninstalled()
                && pos->kind() == item->kind()
                && item->edition().compare(pos->edition()) < 0)
            {
@@ -150,7 +150,7 @@ Helper::findUpdateItem (const ResPool & pool, PoolItem_Ref item)
            }
        }
 
-    _DEBUG("Helper::findUpdateItem(" << item << ") => " << info.uninstalled);
+    _XDEBUG("Helper::findUpdateItem(" << item << ") => " << info.uninstalled);
     return info.uninstalled;
 }
 
@@ -186,7 +186,7 @@ Helper::findReinstallItem (const ResPool & pool, PoolItem_Ref item)
        ResPool::const_nameiterator pend = pool.nameend(item->name());
        for (ResPool::const_nameiterator it = pool.namebegin(item->name()); it != pend; ++it) {
            PoolItem pos = it->second;
-           if (pos.status().isUninstalled()
+           if (pos.status().staysUninstalled()
                && pos->kind() == item->kind()
                && item->edition().compare(pos->edition()) == 0)
            {
@@ -195,7 +195,7 @@ Helper::findReinstallItem (const ResPool & pool, PoolItem_Ref item)
            }
        }
 
-    _DEBUG("Helper::findReinstallItem(" << item << ") => " << info.uninstalled);
+    _XDEBUG("Helper::findReinstallItem(" << item << ") => " << info.uninstalled);
     return info.uninstalled;
 }
 
index a8c54a3..87579b7 100644 (file)
@@ -210,7 +210,7 @@ struct CollectProviders : public resfilter::OnCapMatchCallbackFunctor
        //
 
        if ((provider.resolvable() != requestor.resolvable())           // resolvable could provide its own requirement
-           && (!provider.status().isInstalled())                       // only visit if provider is not already installed
+           && (!provider.status().staysInstalled())                    // only visit if provider is not already installed
            && (toinstall.find(provider) != toinstall.end()             // only look at resolvables
                || installed.find(provider) != installed.end())) {      //   we are currently considering anyways
            tovisit.insert (provider);
index 5cdb008..81305c5 100644 (file)
@@ -115,13 +115,15 @@ struct UpgradeCandidate : public resfilter::OnCapMatchCallbackFunctor
 
 //MIL << "UpgradeCandidate? " << candidate << ":[" << context->getStatus (candidate) << "]" << (item->edition().compare(candidate->edition())) << "<" << item->arch() << "," << candidate->arch() << ">" << endl;
 // FIXME put this in the resfilter chain
+       ResStatus status = context->getStatus (candidate);
        if ((item->edition().compare(candidate->edition()) < 0)         // look at real upgrades
            && item->arch() == candidate->arch()                        // keep the architecture
-           && (context->getStatus (candidate).staysUninstalled()
-               || context->getStatus (candidate).isToBeUninstalled())) // FIXME: just for exercise-02conflict-03-test.xml
+           && (status.wasUninstalled()
+               || status.isToBeUninstalled())                          // FIXME: just for exercise-02conflict-03-test.xml
                                                                        // the original solver found the uninstalled foo-2.0.1 first, this solver
                                                                        // finds the uninstallable first. In the end, we had a duplicate solution
                                                                        // now we have no solution. Both results are right.
+          && (!status.isImpossible()) )
        {
 //MIL << "UpgradeCandidate! " << candidate << endl;
            upgrades.push_back (candidate);
@@ -276,9 +278,9 @@ struct ConflictProcess : public resfilter::OnCapMatchCallbackFunctor
            context->addError (misc_info);
 
        }
-       else if (status.isUninstalled()) {
+       else if (status.wasUninstalled()) {
 
-           context->setStatus (provider, ResStatus::toBeUninstalled);
+           context->setStatus (provider, ResStatus::impossible);
 
            ResolverInfoMisc_Ptr misc_info = new ResolverInfoMisc (RESOLVER_INFO_TYPE_CONFLICT_UNINSTALLABLE, provider, RESOLVER_INFO_PRIORITY_VERBOSE, provides);
 
@@ -289,6 +291,7 @@ struct ConflictProcess : public resfilter::OnCapMatchCallbackFunctor
 
        }
        else if ((status.isToBeUninstalled() && !status.isToBeUninstalledDueToUnlink())
+               || status.isImpossible()
                || status.isToBeUninstalledDueToObsolete()) {
 
            /* This is the easy case -- we do nothing. */
index d565c18..f85bbdd 100644 (file)
@@ -122,7 +122,7 @@ QueueItemEstablish::process (ResolverContext_Ptr context, QueueItemList & qil)
     // if we have freshens but none of the freshen deps were met, mark the _item as unneeded
     // else we look at its requires to set it to satisfied or incomplete
 
-    if (status.isUninstalled()
+    if (status.staysUninstalled()
        && freshens.size() > 0
        && iter == freshens.end())
     {
index 7a02a9e..6d272b2 100644 (file)
@@ -209,7 +209,9 @@ QueueItemInstall::process (ResolverContext_Ptr context, QueueItemList & qil)
        for (PoolItemList::const_iterator iter = _needed_by.begin(); iter != _needed_by.end() && !still_needed; ++iter) {
            ResStatus status = iter->status();
            _XDEBUG("by: [status: " << status << "] " << *iter);
-           if (! status.isToBeUninstalled()) {
+           if (! status.isToBeUninstalled()
+               && ! status.isImpossible())
+           {
                still_needed = true;
            }
        }
@@ -223,7 +225,7 @@ QueueItemInstall::process (ResolverContext_Ptr context, QueueItemList & qil)
           needed this. */
 
     if (context->verifying()
-       && status.isToBeUninstalled()
+       && (status.isToBeUninstalled() || status.isImpossible())
        && !_needed_by.empty()) {
 
        QueueItemUninstall_Ptr uninstall_item;
index cffa56d..1c655b9 100644 (file)
@@ -175,7 +175,7 @@ struct RequireProcess : public resfilter::OnCapMatchCallbackFunctor
            return true;
        }
 
-       if (!status.isToBeUninstalled()
+       if (! (status.isToBeUninstalled() || status.isImpossible())
            && ! context->isParallelInstall (provider)
            && ! uniq.has(provider)
            && context->itemIsPossible (provider)
@@ -202,7 +202,7 @@ struct NoInstallableProviders : public resfilter::OnCapMatchCallbackFunctor
        string msg_str;
        //const Capability match;
 
-       ResStatus status = provider.status();
+       ResStatus status = context->getStatus( provider );
 
        ResolverInfoMisc_Ptr misc_info;
 
@@ -212,7 +212,8 @@ struct NoInstallableProviders : public resfilter::OnCapMatchCallbackFunctor
        } else if (context->isParallelInstall (provider)) {
            misc_info = new ResolverInfoMisc (RESOLVER_INFO_TYPE_PARALLEL_PROVIDER, requirer, RESOLVER_INFO_PRIORITY_VERBOSE, match);
            misc_info->setOtherPoolItem (provider);
-       } else if (! context->itemIsPossible (provider)) {
+       } else if (status.isImpossible()
+                 || ! context->itemIsPossible (provider)) {
            misc_info = new ResolverInfoMisc (RESOLVER_INFO_TYPE_NOT_INSTALLABLE_PROVIDER, requirer, RESOLVER_INFO_PRIORITY_VERBOSE, match);
            misc_info->setOtherPoolItem (provider);
 #warning Locks not implemented
@@ -407,7 +408,7 @@ QueueItemRequire::process (ResolverContext_Ptr context, QueueItemList & new_item
        ResPool::const_nameiterator pend = pool().nameend(_requiring_item->name());
        for (ResPool::const_nameiterator it = pool().namebegin(_requiring_item->name()); it != pend; ++it) {
            PoolItem pos = it->second;
-           if (pos.status().isUninstalled()
+           if (pos.status().staysUninstalled()
                && pos->kind() == _requiring_item->kind()
                && _requiring_item->edition().compare(pos->edition()) < 0)
            {
index 666a535..c832ca4 100644 (file)
@@ -319,13 +319,23 @@ QueueItemUninstall::process (ResolverContext_Ptr context, QueueItemList & qil)
 
        for (CapSet::const_iterator iter = provides.begin(); iter != provides.end(); iter++) {
            UninstallProcess info ( pool(), context, _item, _upgraded_to, qil, _remove_only, _soft);
-
+#if 0
            //world()->foreachRequiringPoolItem (*iter, uninstall_process_cb, &info);
            Dep dep( Dep::REQUIRES);
 
            invokeOnEach( pool().byCapabilityIndexBegin( iter->index(), dep ),
                          pool().byCapabilityIndexEnd( iter->index(), dep ),
                          resfilter::callOnCapMatchIn( dep, *iter, functor::functorRef<bool,PoolItem,Capability>(info) ) );
+#endif
+       Capability c = *iter;
+       ResPool::const_indexiterator rend = pool().requiresend(c.index());
+       for (ResPool::const_indexiterator it = pool().requiresbegin(c.index()); it != rend; ++it) {
+           if (c.matches (it->second.first) == CapMatch::yes) {
+               if (!info( it->second.second, it->second.first))
+                   break;
+           }
+       }
+
        }
     }
 
index 89ee6f3..d26e055 100644 (file)
@@ -590,10 +590,10 @@ struct CollectTransact : public resfilter::PoolItemFilterFunctor
        DBG << "CollectTransact(" << item << ")" << endl;
        item.status().setNoTransact(ResStatus::APPL_LOW);// clear any solver/establish transactions
 
-       if (status.isUninstalled()) {                   // transact && uninstalled
+       if (status.isToBeInstalled()) {
            resolver.addPoolItemToInstall(item);        // -> install! 
        }
-       if (status.isInstalled()) {                     // transact && installed
+       if (status.isToBeUninstalled()) {
            resolver.addPoolItemToRemove(item);         // -> remove !
        }
        if (status.isIncomplete()) {                    // incomplete (re-install needed)
index 0f7101b..b6adb3b 100644 (file)
@@ -188,6 +188,12 @@ ResolverContext::install (PoolItem_Ref item, bool is_soft, int other_penalty)
        return false;
     }
 
+    if (status.isImpossible()) {
+       ResolverInfo_Ptr misc_info = new ResolverInfoMisc (RESOLVER_INFO_TYPE_UNINSTALLABLE, item, RESOLVER_INFO_PRIORITY_VERBOSE);
+       addError (misc_info);
+       return false;
+    }
+
     if (status.isUnneeded()) {
        ResolverInfo_Ptr misc_info = new ResolverInfoMisc (RESOLVER_INFO_TYPE_INSTALL_UNNEEDED, item, RESOLVER_INFO_PRIORITY_VERBOSE);
        addError (misc_info);
@@ -212,7 +218,7 @@ ResolverContext::install (PoolItem_Ref item, bool is_soft, int other_penalty)
     else
        setStatus (item, ResStatus::toBeInstalled);
 
-    if (status.isUninstalled()) {
+    if (status.wasUninstalled()) {
        Resolvable::constPtr res = item.resolvable();
        Package::constPtr pkg = asKind<Package>(res);                   // try to access it as a package
        if (pkg) {                                                      // if its !=NULL, get size information
@@ -253,7 +259,8 @@ ResolverContext::upgrade (PoolItem_Ref item, PoolItem_Ref old_item, bool is_soft
 
     status = getStatus(item);
 
-    if (status.isToBeUninstalled())
+    if (status.isToBeUninstalled()
+       || status.isImpossible())
        return false;
 
     if (status.isToBeInstalled())
@@ -266,17 +273,21 @@ ResolverContext::upgrade (PoolItem_Ref item, PoolItem_Ref old_item, bool is_soft
        setStatus (item, ResStatus::toBeInstalled);
     }
 
-    if (status.isUninstalled()) {
-       Resolvable::constPtr res = item.resolvable();
+    if (old_item.status().wasUninstalled()) {
+       Resolvable::constPtr res = old_item.resolvable();
        Package::constPtr pkg = asKind<Package>(res);                   // try to access it as a package
        if (pkg) {                                                      // if its !=NULL, get size information
 
+           _install_size -= pkg->size();
+       }
+
+       res = item.resolvable();
+       pkg = asKind<Package>(res);                                     // try to access it as a package
+       if (pkg) {                                                      // if its !=NULL, get size information
+
            _download_size += pkg->archivesize();
            _install_size += pkg->size();
 
-       // FIXME: Incomplete
-       // We should change installed_size to reflect the difference in
-       //   installed size between the old and new versions.
        }
 
        int priority;
@@ -322,12 +333,15 @@ ResolverContext::uninstall (PoolItem_Ref item, bool part_of_upgrade, bool due_to
     }
 
     if (status.isToBeUninstalled()
-       && !status.isToBeUninstalledDueToUnlink()) {
+       && !status.isToBeUninstalledDueToUnlink())
+    {
        return true;
     }
 
-    if (status.isUninstalled()
-       || status.isToBeUninstalledDueToUnlink()) {
+    if (status.wasUninstalled()
+       || status.isImpossible()
+       || status.isToBeUninstalledDueToUnlink())
+    {
        ResolverInfo_Ptr misc_info = new ResolverInfoMisc (RESOLVER_INFO_TYPE_UNINSTALLABLE, item, RESOLVER_INFO_PRIORITY_VERBOSE);
        addInfo (misc_info);
     }
@@ -338,13 +352,16 @@ ResolverContext::uninstall (PoolItem_Ref item, bool part_of_upgrade, bool due_to
     else if (due_to_unlink) {
        setStatus (item, ResStatus::toBeUninstalledDueToUnlink);
     }
+    else if (status.wasUninstalled()) {
+       setStatus (item, ResStatus::impossible);
+    }
     else {
        setStatus (item, ResStatus::toBeUninstalled);
     }
 
-    if (status.isInstalled()) {
+    if (status.wasInstalled()) {
        Resolvable::constPtr res = item.resolvable();
-       Package::constPtr pkg = asKind<Package>(res);           // try to access it as a package
+       Package::constPtr pkg = asKind<Package>(res);                   // try to access it as a package
        if (pkg) {                                                      // if its !=NULL, get size information
            _install_size -= pkg->size();
        }
@@ -365,10 +382,10 @@ ResolverContext::unneeded (PoolItem_Ref item, int other_penalty)
 
     status = getStatus(item);
 
-    if (status.staysInstalled()) {
+    if (status.wasInstalled()) {
        setStatus (item, ResStatus::satisfied);
     }
-    else if (status.staysUninstalled()) {
+    else if (status.wasUninstalled()) {
        setStatus (item, ResStatus::unneeded);
     }
 
@@ -387,10 +404,10 @@ ResolverContext::satisfy (PoolItem_Ref item, int other_penalty)
 
     _XDEBUG( "ResolverContext[" << this << "]::satisfy(" << item << ":" << status << ")" );
 
-    if (status.staysInstalled()) {
+    if (status.wasInstalled()) {
        setStatus (item, ResStatus::complete);
     }
-    else if (status.staysUninstalled()) {
+    else if (status.wasUninstalled()) {
        setStatus (item, ResStatus::satisfied);
     }
 
@@ -408,7 +425,7 @@ ResolverContext::incomplete (PoolItem_Ref item, int other_penalty)
     _XDEBUG( "ResolverContext[" << this << "]::incomplete(" << item << "):" << status );
 
     if (_establishing) {
-       if (status.isInstalled()) {
+       if (status.wasInstalled()) {
            setStatus (item, ResStatus::incomplete);
        }
        else {
@@ -438,8 +455,7 @@ ResolverContext::isPresent (PoolItem_Ref item)
 _XDEBUG("ResolverContext::itemIsPresent(<" << status << ">" << item << ")");
 
     return (status.staysInstalled()
-           || ((status.isToBeInstalled() || status.isToBeInstalledSoft())
-               && !status.isNeeded())
+           || (status.isToBeInstalled() && !status.isNeeded())
            || status.isSatisfied ());
 }
 
@@ -458,8 +474,9 @@ _XDEBUG("ResolverContext::itemIsAbsent(<" << status << ">" << item << ")");
 
     // DONT add incomplete here, uninstall requests for incompletes must be handled
 
-    return (status.isUninstalled()
-          || status.isToBeUninstalled());
+    return (status.staysUninstalled()
+          || status.isToBeUninstalled()
+          || status.isImpossible());
 }
 
 
@@ -527,8 +544,7 @@ install_pkg_cb (PoolItem_Ref item, const ResStatus & status, void *data)
 {
     InstallInfo *info = (InstallInfo *)data;
     if (status.isToBeInstalled()
-       && ! status.isInstalled ()
-       && !Helper::findInstalledItem (info->pool, item))
+       && !Helper::findInstalledItem( info->pool, item))
     {
        if (info->fn) info->fn (item, status, info->rl);
        ++info->count;
@@ -586,7 +602,7 @@ satisfy_pkg_cb (PoolItem_Ref item, const ResStatus & status, void *data)
 {
     SatisfyInfo *info = (SatisfyInfo *)data;
     if (status.isSatisfied()
-       && ! status.isInstalled ()
+       && ! status.staysInstalled ()
        && !Helper::findInstalledItem (info->pool, item))
     {
        if (info->fn) info->fn (item, status, info->rl);
@@ -704,7 +720,7 @@ upgrade_pkg_cb (PoolItem_Ref item, const ResStatus & status, void *data)
     PoolItem_Ref to_be_upgraded;
 
     if (status.isToBeInstalled()
-       && ! status.isInstalled ())
+       && ! status.staysInstalled ())
     {
 
        to_be_upgraded = Helper::findInstalledItem(info->pool, item);
@@ -768,7 +784,7 @@ uninstall_pkg_cb (PoolItem_Ref item, const ResStatus & status, void *data)
     UpgradeTable::const_iterator pos = info->upgrade_hash.find(item->name());
 
     if (status.isToBeUninstalled ()
-       && pos == info->upgrade_hash.end())
+       && pos == info->upgrade_hash.end())             // dont count upgrades
     {
        if (info->fn)
            info->fn (item, status, info->rl);
@@ -813,12 +829,45 @@ ResolverContext::getUninstalls (void)
 
 
 //---------------------------------------------------------------------------
+// impossible
+
+typedef struct {
+    ResPool pool;
+    MarkedPoolItemFn fn;
+    int count;
+    void *data;
+} ImpossibleInfo;
+
+static void
+impossible_pkg_cb (PoolItem_Ref item, const ResStatus & status, void *data)
+{
+    ImpossibleInfo *info = (ImpossibleInfo *)data;
+
+    if (status.isImpossible ()) {
+       if (info->fn) info->fn (item, status, info->data);
+       ++info->count;
+    }
+}
+
+
+int
+ResolverContext::foreachImpossible (MarkedPoolItemFn fn, void *data)
+{
+    ImpossibleInfo info = { _pool, fn, 0, data };
+
+    foreachMarked (impossible_pkg_cb, (void *)&info);
+
+    return info.count;
+}
+
+
+//---------------------------------------------------------------------------
 
 static void
 install_count_cb (PoolItem_Ref item, const ResStatus & status, void *data)
 {
     int *count = (int *)data;
-    if (! item.status().isInstalled ()) {
+    if (item.status().wasUninstalled ()) {
        ++*count;
     }
 }
@@ -838,7 +887,7 @@ static void
 uninstall_count_cb (PoolItem_Ref item, const ResStatus & status, void *data)
 {
     int *count = (int *)data;
-    if (item.status().isInstalled ()) {
+    if (item.status().wasInstalled ()) {
        ++*count;
     }
 }
@@ -866,7 +915,7 @@ static void
 satisfy_count_cb (PoolItem_Ref item, const ResStatus & status, void *data)
 {
     int *count = (int *)data;
-    if (! item.status().isInstalled ()) {
+    if (item.status().wasUninstalled ()) {
        ++*count;
     }
 }
@@ -1199,17 +1248,19 @@ ResolverContext::requirementIsMet (const Capability & dependency, bool is_child)
 
 struct RequirementPossible : public resfilter::OnCapMatchCallbackFunctor
 {
+    ResolverContext_Ptr context;
     bool flag;
 
-    RequirementPossible ()
-       : flag (false)
+    RequirementPossible( ResolverContext_Ptr ctx )
+       : context (ctx)
+       , flag (false)
     { }
 
     bool operator()( PoolItem_Ref provider, const Capability & match )
     {
-       ResStatus status = provider.status();
+       ResStatus status = context->getStatus( provider );
 
-       if (! status.isToBeUninstalled ()
+       if (! (status.isToBeUninstalled () || status.isImpossible())
            || status.isToBeUninstalledDueToUnlink())
        {
            flag = true;
@@ -1221,9 +1272,9 @@ struct RequirementPossible : public resfilter::OnCapMatchCallbackFunctor
 
 
 bool
-ResolverContext::requirementIsPossible (const Capability & dependency) const
+ResolverContext::requirementIsPossible (const Capability & dependency)
 {
-    RequirementPossible info;
+    RequirementPossible info( this );
 
     // world()->foreachProviding (dep, requirement_possible_cb, (void *)&info);
 #if 0
@@ -1246,7 +1297,7 @@ ResolverContext::requirementIsPossible (const Capability & dependency) const
 
 
 bool
-ResolverContext::itemIsPossible (PoolItem_Ref item) const
+ResolverContext::itemIsPossible (PoolItem_Ref item)
 {
     CapSet requires = item->dep (Dep::REQUIRES);
     for (CapSet::iterator iter = requires.begin(); iter !=  requires.end(); iter++) {
index d21cd29..c3d9d92 100644 (file)
@@ -160,8 +160,8 @@ class ResolverContext : public base::ReferenceCounted, private base::NonCopyable
     bool isAbsent (PoolItem_Ref item);
 
     bool requirementIsMet (const Capability & cap, bool is_child = false);
-    bool requirementIsPossible (const Capability & cap) const;
-    bool itemIsPossible (const PoolItem_Ref item) const;
+    bool requirementIsPossible (const Capability & cap);
+    bool itemIsPossible (const PoolItem_Ref item);
     bool isParallelInstall (const PoolItem_Ref item) const;
     PoolItem_Ref getParallelInstall (const PoolItem_Ref item) const;
 
@@ -190,6 +190,10 @@ class ResolverContext : public base::ReferenceCounted, private base::NonCopyable
     PoolItemList getIncompletes (void) const;
     int incompleteCount (void) const;
 
+    int foreachImpossible (MarkedPoolItemFn fn, void *data);
+//    PoolItemList getImpossibles (void);
+//    int impossibleCount (void);
+
     // add to the report log
     void addInfo (ResolverInfo_Ptr info);                                      // normal progress info
     void addError (ResolverInfo_Ptr info);                                     // error progress info
index ab37cac..1a9641f 100644 (file)
@@ -234,7 +234,7 @@ Resolver::doUpgrade( UpgradeStatistics & opt_stats_r )
       ++opt_stats_r.pre_todel;
       continue;
     }
-    if ( item.status().isInstalled() ) {
+    if ( item.status().staysInstalled() ) {
       installed = item;
       CandidateMap::const_iterator cand_it = candidatemap.find(installed);
       if (cand_it != candidatemap.end()) {
@@ -249,20 +249,20 @@ Resolver::doUpgrade( UpgradeStatistics & opt_stats_r )
        continue;
       }
 MIL << "item " << item << " is installed, candidate is " << candidate << endl;
-      if (candidate.status().isUnneeded()) {                   // seen already
-       candidate.status().setUndetermined();
+      if (candidate.status().isSeen()) {                       // seen already
+       candidate.status().setSeen(true);
        continue;
       }
-      candidate.status().setUnneeded();                                // mark as seen
+      candidate.status().setSeen(true);                                // mark as seen
       candidatemap[installed] = candidate;
     }
     else {                                     // assume Uninstalled
-      if (item.status().isUnneeded()) {                                // seen already
-       item.status().setUndetermined();
+      if (item.status().isSeen()) {                            // seen already
+       item.status().setSeen(true);
        continue;
       }
       candidate = item;
-      candidate.status().setUnneeded();                                // mark as seen
+      candidate.status().setSeen(true);                                // mark as seen
       installed = Helper::findInstalledItem (_pool, candidate);
       if (installed) {                                         // check if we already have an installed
 MIL << "found installed " << installed << " for item " << candidate << endl;
@@ -310,9 +310,9 @@ MIL << "has split cap " << *scap << endl;
 
   } // iterate over the complete pool
 
-  // reset all unneeded
+  // reset all seen
   for (PoolItemSet::const_iterator it = available.begin(); it != available.end(); ++it) {
-       it->status().setUndetermined();
+       it->status().setSeen(false);
   }
 
 #warning Cant update from broken install medium like STABLE
@@ -387,7 +387,7 @@ MIL << "has split cap " << *scap << endl;
     PoolItem_Ref installed(*it);
     ResStatus status (installed.status());
 
-    if ( ! status.isInstalled() ) {
+    if ( ! status.staysInstalled() ) {
       continue;
     }
     ++opt_stats_r.chk_installed_total;
@@ -463,7 +463,7 @@ MIL << "has split cap " << *scap << endl;
 #endif         
        ResPool::const_indexiterator pend = pool().providesend(installed->name());
        for (ResPool::const_indexiterator it = pool().providesbegin(installed->name()); it != pend; ++it) {
-           if (it->second.second.status().isUninstalled()
+           if (it->second.second.status().staysUninstalled()
                && installedCap.matches (it->second.first) == CapMatch::yes) {
                if (!info( it->second.second, it->second.first))
                    break;
@@ -512,7 +512,7 @@ MIL << "has split cap " << *scap << endl;
          PoolItem_Ref split_candidate = *ait;
          MIL << " ==> ADD (splitted): " << split_candidate << endl;
          if ( probably_dropped
-              && split_candidate.status().isUninstalled()
+              && split_candidate.status().staysUninstalled()
               && doesObsoleteItem (split_candidate, installed))
          {
            probably_dropped = false;