Mailinglist Archive: zypp-commit (223 mails)

< Previous Next >
[zypp-commit] r10608 - in /trunk/libzypp/zypp: Resolvable.h ui/Selectable.cc ui/Selectable.h ui/SelectableImpl.h
  • From: mlandres@xxxxxxxxxxxxxxxx
  • Date: Thu, 17 Jul 2008 10:58:50 -0000
  • Message-id: <20080717105850.B85B0331EF@xxxxxxxxxxxxxxxx>
Author: mlandres
Date: Thu Jul 17 12:58:50 2008
New Revision: 10608

URL: http://svn.opensuse.org/viewcvs/zypp?rev=10608&view=rev
Log:
complete patch classification

Modified:
trunk/libzypp/zypp/Resolvable.h
trunk/libzypp/zypp/ui/Selectable.cc
trunk/libzypp/zypp/ui/Selectable.h
trunk/libzypp/zypp/ui/SelectableImpl.h

Modified: trunk/libzypp/zypp/Resolvable.h
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/Resolvable.h?rev=10608&r1=10607&r2=10608&view=diff
==============================================================================
--- trunk/libzypp/zypp/Resolvable.h (original)
+++ trunk/libzypp/zypp/Resolvable.h Thu Jul 17 12:58:50 2008
@@ -27,7 +27,6 @@
namespace zypp
{ /////////////////////////////////////////////////////////////////

- struct NVRAD;
class PoolItem;

///////////////////////////////////////////////////////////////////
@@ -63,12 +62,12 @@
using sat::Solvable::edition;
using sat::Solvable::arch;

-
+
/**
* Flag in the metadata indicating this should be
* installed unsing '-i' (not -U).
*/
- using sat::Solvable::installOnly;
+ using sat::Solvable::installOnly;

/** \name Dependencies. */
//@{

Modified: trunk/libzypp/zypp/ui/Selectable.cc
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/ui/Selectable.cc?rev=10608&r1=10607&r2=10608&view=diff
==============================================================================
--- trunk/libzypp/zypp/ui/Selectable.cc (original)
+++ trunk/libzypp/zypp/ui/Selectable.cc Thu Jul 17 12:58:50 2008
@@ -109,8 +109,22 @@
bool Selectable::isUnmaintained() const
{ return _pimpl->isUnmaintained(); }

+ bool Selectable::isUndetermined() const
+ { return _pimpl->isUndetermined(); }
+
+ bool Selectable::isRelevant() const
+ { return _pimpl->isRelevant(); }
+
+ bool Selectable::isSatisfied() const
+ { return _pimpl->isSatisfied(); }
+
+ bool Selectable::isBroken() const
+ { return _pimpl->isBroken(); }
+
bool Selectable::isNeeded() const
- { return _pimpl->isNeeded(); }
+ {
+ return fate() == TO_INSTALL || isBroken() ;
+ }

ResStatus::TransactByValue Selectable::modifiedBy() const
{ return _pimpl->modifiedBy(); }

Modified: trunk/libzypp/zypp/ui/Selectable.h
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/ui/Selectable.h?rev=10608&r1=10607&r2=10608&view=diff
==============================================================================
--- trunk/libzypp/zypp/ui/Selectable.h (original)
+++ trunk/libzypp/zypp/ui/Selectable.h Thu Jul 17 12:58:50 2008
@@ -190,11 +190,33 @@
*/
bool isUnmaintained() const;

- /** Whether the item is relevant but has broken requirements.
- * A 'needed' Patch should be installed, while an 'unneeded' one
- * is either applied or not relevant for the system.
+ /** \name Classification of available patches (patterns, products).
+ * A patch is either \c not \c relevant, \c satisfied or \c broken.
+ */
+ //@{
+ /** Returns true for packages, because packages are not
+ * classified by the solver.
+ */
+ bool isUndetermined() const;
+
+ /** Returns true if the patch is relevant which means that at least
+ * one package of the patch is installed.
+ */
+ bool isRelevant() const;
+
+ /** Whether a relevant patchs requirements are met. */
+ bool isSatisfied() const;
+
+ /** Whether a relevant patchs requirements are broken. */
+ bool isBroken() const;
+
+ /** This includes still broken patches, as well as those already
+ * selected to be installed.
+ * This is because already selected patches will be classified as
+ * \c satisfied.
*/
bool isNeeded() const;
+ //@}

public:
/** \name Query objects fate in case of commit.
@@ -257,8 +279,6 @@

/** Set LicenceConfirmed bit. */
void setLicenceConfirmed( bool val_r = true );
-
-
//@}

public:

Modified: trunk/libzypp/zypp/ui/SelectableImpl.h
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/ui/SelectableImpl.h?rev=10608&r1=10607&r2=10608&view=diff
==============================================================================
--- trunk/libzypp/zypp/ui/SelectableImpl.h (original)
+++ trunk/libzypp/zypp/ui/SelectableImpl.h Thu Jul 17 12:58:50 2008
@@ -165,7 +165,22 @@
bool isUnmaintained() const
{ return availableEmpty(); }

- bool isNeeded() const
+ bool isUndetermined() const;
+ {
+ PoolItem cand( candidateObj() );
+ return ! cand || cand.isUndetermined();
+ }
+ bool isRelevant() const;
+ {
+ PoolItem cand( candidateObj() );
+ return cand && cand.isRelevant();
+ }
+ bool isSatisfied() const;
+ {
+ PoolItem cand( candidateObj() );
+ return cand && cand.isSatisfied();
+ }
+ bool isBroken() const;
{
PoolItem cand( candidateObj() );
return cand && cand.isBroken();

--
To unsubscribe, e-mail: zypp-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages