[yast-devel] establish states moved from ResStatus to PoolItem
Hi, the establish states are no longer available in the ResStatus cause they will be evaluate by the solver while every call of: PoolItem.h /** Whether the items requirements are met. */ bool isSatisfied() const; /** Whether the items requirements are broken. */ bool isBroken() const { return ! isSatisfied(); } Unfortunately I have no write permission to YaST svn, so could you please fix the concerning packages. Thank you. I have already fixed zypper,libzypp-bindings and libzypp-testsuite. Greetings Stefan Index: gtk/src/yzyppwrapper.cc =================================================================== --- gtk/src/yzyppwrapper.cc (Revision 45958) +++ gtk/src/yzyppwrapper.cc (Arbeitskopie) @@ -517,7 +517,7 @@ if (impl->type == Ypp::Package::PATCH_TYPE) { if (impl->zyppSel->hasInstalledObj()) { // broken? show as available - if (impl->zyppSel->installedPoolItem().status().isIncomplete()) + if (impl->zyppSel->installedPoolItem().isBroken()) return false; } } @@ -1568,7 +1568,7 @@ if (!patch) continue; if (!(*it)->hasInstalledObj()) - if (!(*it)->hasCandidateObj() || !(*it)->candidatePoolItem().status().isNeeded()) + if (!(*it)->hasCandidateObj() || !(*it)->candidatePoolItem().isBroken()) continue; category = addCategory (type, patch->category()); break; Index: ncurses-pkg/src/NCPackageSelector.cc =================================================================== --- ncurses-pkg/src/NCPackageSelector.cc (Revision 45958) +++ ncurses-pkg/src/NCPackageSelector.cc (Arbeitskopie) @@ -659,7 +659,7 @@ if ( selectable->hasInstalledObj() ) // patch installed? { // display only if broken - if ( selectable->installedPoolItem().status().isIncomplete() ) + if ( selectable->installedPoolItem().isBroken() ) { displayPatch = true; yuiWarning() << "Installed patch is broken: " << patchPtr->name().c_str() << " - " @@ -670,7 +670,7 @@ { if (selectable->hasCandidateObj() && - selectable->candidatePoolItem().status().isSatisfied() ) + selectable->candidatePoolItem().isSatisfied() ) { //patch not installed, but it is satisfied (updated to the version patch requires) //all that is missing are patch metadata, so let's display the patch @@ -688,7 +688,8 @@ // isSatisfied(): all packages are installed, therefore the isNeeded() flag // isn't set. BUT the patch meta data aren't installed and therefore it makes // sense to install the patch - if ( selectable->candidatePoolItem().status().isNeeded()) + if ( selectable->candidatePoolItem().status().isInstalled() + && selectable->candidatePoolItem().isBroken()) { displayPatch = true; } @@ -1397,7 +1398,7 @@ descr += "<br>"; if ( selectable->hasInstalledObj() - && selectable->installedPoolItem().status().isIncomplete() ) + && selectable->installedPoolItem().isBroken() ) { descr += _( "----- this patch is broken !!! -----" ); descr += "<br>"; Index: pkg-bindings/src/Resolvable_Properties.cc =================================================================== --- pkg-bindings/src/Resolvable_Properties.cc (Revision 45958) +++ pkg-bindings/src/Resolvable_Properties.cc (Arbeitskopie) @@ -293,7 +293,7 @@ info->add(YCPString("interactive"), YCPBoolean(patch_ptr->interactive())); info->add(YCPString("reboot_needed"), YCPBoolean(patch_ptr->reboot_needed())); info->add(YCPString("affects_pkg_manager"), YCPBoolean(patch_ptr->affects_pkg_manager())); - info->add(YCPString("is_needed"), YCPBoolean(it->status().isNeeded())); + info->add(YCPString("is_broken"), YCPBoolean(it->isBroken())); } // dependency info Index: pkg-bindings/src/ProvideProcess.cc =================================================================== --- pkg-bindings/src/ProvideProcess.cc (Revision 45958) +++ pkg-bindings/src/ProvideProcess.cc (Arbeitskopie) @@ -54,7 +54,7 @@ } if (!provider.status().isInstalled() - && (!onlyNeeded || provider.status().isNeeded()) ) // take only needed items (e.G. needed patches) + && (!onlyNeeded || provider.isBroken()) ) // take only needed items (e.G. needed patches) { // deselect the item if it's already selected, // only one item should be selected -- ******************************************************************************* Stefan Schubert SUSE LINUX GmbH - Maxfeldstrasse 5 - D-90409 Nuernberg, Germany e-mail: schubi@suse.de ------------------------------------------------------------------------------- SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
participants (1)
-
Stefan Schubert