From: Stefan Schubert Date: Tue, 4 Dec 2007 16:34:02 +0000 (+0000) Subject: enlarged interface for additional requirements/conflicts X-Git-Tag: 6.6.0~1457 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=222a54e80bcf877d8997f7f1b6e89e4d3f597329;p=platform%2Fupstream%2Flibzypp.git enlarged interface for additional requirements/conflicts --- diff --git a/zypp/Resolver.cc b/zypp/Resolver.cc index 102f109a8..aac6dec52 100644 --- a/zypp/Resolver.cc +++ b/zypp/Resolver.cc @@ -103,7 +103,15 @@ namespace zypp void Resolver::addRequire (const Capability & capability) { _pimpl->addExtraCapability( capability ); } void Resolver::addConflict (const Capability & capability) - { _pimpl->addExtraConflict( capability ); } + { _pimpl->addExtraConflict( capability ); } + void Resolver::removeRequire (const Capability & capability) + { _pimpl->removeExtraCapability( capability ); } + void Resolver::removeConflict (const Capability & capability) + { _pimpl->removeExtraConflict( capability ); } + const CapSet Resolver::getRequire () + { _pimpl->extraCapability();} + const CapSet Resolver::getConflict () + { _pimpl->extraConflicts();} std::list Resolver::problematicUpdateItems( void ) const { return _pimpl->problematicUpdateItems(); } void Resolver::setTimeout( int seconds ) diff --git a/zypp/Resolver.h b/zypp/Resolver.h index b759e8814..0987b928f 100644 --- a/zypp/Resolver.h +++ b/zypp/Resolver.h @@ -212,7 +212,8 @@ namespace zypp * (More or less a 'single step' resolver call) * * returns false if requirements are not all fulfillable - * + * + * Is obsolete; use resolvePool() instead */ bool transactResObject( ResObject::constPtr robj, bool install = true); @@ -225,6 +226,7 @@ namespace zypp * * returns false if any transactResObject() call returned false. * + * Is obsolete; use resolvePool() instead */ bool transactResKind( Resolvable::Kind kind ); @@ -235,6 +237,7 @@ namespace zypp * It will only reset states which have an equal or * lower causer * + * Is obsolete; use resolvePool() instead */ void transactReset( ResStatus::TransactByValue causer ); @@ -248,7 +251,31 @@ namespace zypp * Adding additional conflict * */ - void addConflict (const Capability & capability); + void addConflict (const Capability & capability); + + /** + * Remove additional requirement + * + */ + void removeRequire (const Capability & capability); + + /** + * Remove additional conflict + * + */ + void removeConflict (const Capability & capability); + + /** + * Get additional requirement + * + */ + const CapSet getRequire (); + + /** + * Get additional conflict + * + */ + const CapSet getConflict(); /** * Setting solver timeout diff --git a/zypp/solver/detail/Resolver.cc b/zypp/solver/detail/Resolver.cc index a66a18d3e..297799090 100644 --- a/zypp/solver/detail/Resolver.cc +++ b/zypp/solver/detail/Resolver.cc @@ -439,7 +439,6 @@ Resolver::removeExtraCapability (const Capability & capability) } - void Resolver::addExtraConflict (const Capability & capability) { @@ -447,6 +446,13 @@ Resolver::addExtraConflict (const Capability & capability) } +void +Resolver::removeExtraConflict (const Capability & capability) +{ + _extra_conflicts.erase (capability); +} + + void Resolver::addIgnoreConflict (const PoolItem_Ref item, const Capability & capability) diff --git a/zypp/solver/detail/Resolver.h b/zypp/solver/detail/Resolver.h index 00fdf2088..f19fdbf18 100644 --- a/zypp/solver/detail/Resolver.h +++ b/zypp/solver/detail/Resolver.h @@ -234,6 +234,7 @@ class Resolver : public base::ReferenceCounted, private base::NonCopyable { void addExtraCapability (const Capability & capability); void removeExtraCapability (const Capability & capability); void addExtraConflict (const Capability & capability); + void removeExtraConflict (const Capability & capability); const CapSet extraCapability () { return _extra_caps; } const CapSet extraConflicts () { return _extra_conflicts; }