Mailinglist Archive: zypp-commit (606 mails)

< Previous Next >
[zypp-commit] r9337 - in /trunk/libzypp/zypp: ResStatus.cc ResStatus.h sat/SATResolver.cc
  • From: schubi2@xxxxxxxxxxxxxxxx
  • Date: Wed, 02 Apr 2008 11:48:15 -0000
  • Message-id: <20080402114815.5C3683114B@xxxxxxxxxxxxxxxx>
Author: schubi2
Date: Wed Apr 2 13:48:14 2008
New Revision: 9337

URL: http://svn.opensuse.org/viewcvs/zypp?rev=9337&view=rev
Log:
- Moved poolItem.status().isSatisfied(),.... to poolItem.isSatisfied()
- Removed establish state in ResStatus

Modified:
trunk/libzypp/zypp/ResStatus.cc
trunk/libzypp/zypp/ResStatus.h
trunk/libzypp/zypp/sat/SATResolver.cc

Modified: trunk/libzypp/zypp/ResStatus.cc
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/ResStatus.cc?rev=9337&r1=9336&r2=9337&view=diff
==============================================================================
--- trunk/libzypp/zypp/ResStatus.cc (original)
+++ trunk/libzypp/zypp/ResStatus.cc Wed Apr 2 13:48:14 2008
@@ -20,19 +20,14 @@
namespace zypp
{ /////////////////////////////////////////////////////////////////

- const ResStatus ResStatus::toBeInstalled (UNINSTALLED,
UNDETERMINED, TRANSACT);
- const ResStatus ResStatus::toBeInstalledSoft (UNINSTALLED,
UNDETERMINED, TRANSACT, SOFT_INSTALL);
- const ResStatus ResStatus::toBeUninstalled (INSTALLED,
UNDETERMINED, TRANSACT);
- const ResStatus ResStatus::toBeUninstalledSoft (INSTALLED,
UNDETERMINED, TRANSACT, EXPLICIT_INSTALL, SOFT_REMOVE);
- const ResStatus ResStatus::toBeUninstalledDueToObsolete(INSTALLED,
UNDETERMINED, TRANSACT, EXPLICIT_INSTALL, DUE_TO_OBSOLETE);
- const ResStatus ResStatus::toBeUninstalledDueToUpgrade (INSTALLED,
UNDETERMINED, TRANSACT, EXPLICIT_INSTALL, DUE_TO_UPGRADE);
- const ResStatus ResStatus::installed (INSTALLED,
UNDETERMINED);
- const ResStatus ResStatus::uninstalled (UNINSTALLED,
UNDETERMINED);
- const ResStatus ResStatus::incomplete (INSTALLED,
INCOMPLETE);
- const ResStatus ResStatus::complete (INSTALLED,
SATISFIED);
- const ResStatus ResStatus::satisfied (UNINSTALLED,
SATISFIED);
- const ResStatus ResStatus::unneeded (UNINSTALLED,
UNNEEDED);
- const ResStatus ResStatus::needed (UNINSTALLED,
INCOMPLETE);
+ const ResStatus ResStatus::toBeInstalled (UNINSTALLED,
TRANSACT);
+ const ResStatus ResStatus::toBeInstalledSoft (UNINSTALLED,
TRANSACT, SOFT_INSTALL);
+ const ResStatus ResStatus::toBeUninstalled (INSTALLED,
TRANSACT);
+ const ResStatus ResStatus::toBeUninstalledSoft (INSTALLED,
TRANSACT, EXPLICIT_INSTALL, SOFT_REMOVE);
+ const ResStatus ResStatus::toBeUninstalledDueToObsolete(INSTALLED,
TRANSACT, EXPLICIT_INSTALL, DUE_TO_OBSOLETE);
+ const ResStatus ResStatus::toBeUninstalledDueToUpgrade (INSTALLED,
TRANSACT, EXPLICIT_INSTALL, DUE_TO_UPGRADE);
+ const ResStatus ResStatus::installed (INSTALLED);
+ const ResStatus ResStatus::uninstalled (UNINSTALLED);
const ResStatus ResStatus::recommended (RECOMMENDED);
const ResStatus ResStatus::suggested (SUGGESTED);

@@ -62,10 +57,9 @@
{}


- ResStatus::ResStatus (enum StateValue s, enum EstablishValue e, enum
TransactValue t, enum InstallDetailValue i, enum RemoveDetailValue r, enum
SolverStateValue ssv)
+ ResStatus::ResStatus (enum StateValue s, enum TransactValue t, enum
InstallDetailValue i, enum RemoveDetailValue r, enum SolverStateValue ssv)
: _bitfield (s)
{
- fieldValueAssign<EstablishField>(e);
fieldValueAssign<TransactField>(t);
if (t == TRANSACT) {
if (s == INSTALLED) fieldValueAssign<TransactDetailField>(r);
@@ -86,10 +80,6 @@
{
str << (obj.isInstalled() ? "I" : "U");

- str << (obj.isEstablishedUneeded() ? "U" :
- ( obj.isEstablishedSatisfied() ? "S" :
- ( obj.isEstablishedIncomplete() ? "I" : "_") ) );
-
str << (obj.transacts () ? "T"
: (obj.isLocked() ? "L" : "_") );


Modified: trunk/libzypp/zypp/ResStatus.h
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/ResStatus.h?rev=9337&r1=9336&r2=9337&view=diff
==============================================================================
--- trunk/libzypp/zypp/ResStatus.h (original)
+++ trunk/libzypp/zypp/ResStatus.h Wed Apr 2 13:48:14 2008
@@ -27,12 +27,6 @@
/** Status bitfield.
*
* \li \c StateField Whether the resolvable is or uninstalled (available).
- * \li \c EstablishField Established status computed by the solver as
- * unneeded (have freshens but none of them trigger)
- * satisfied (no freshen or at least one triggered freshen and
- * all requires fulfilled)
- * or incomplete (no freshen or at least one triggered freshen and
- * NOT all requires fulfilled)
* \li \c TransactField Wheter to transact this resolvable
* (delete if installed install if uninstalled).
* In case the resolvable is locked, only USER may modify the
@@ -62,8 +56,7 @@
typedef bit::BitField<FieldType> BitFieldType;
// Bit Ranges within FieldType defined by 1st bit and size:
typedef bit::Range<FieldType,0, 1> StateField;
- typedef bit::Range<FieldType,StateField::end, 2> EstablishField;
- typedef bit::Range<FieldType,EstablishField::end, 2> TransactField;
+ typedef bit::Range<FieldType,StateField::end, 2> TransactField;
typedef bit::Range<FieldType,TransactField::end, 2>
TransactByField;
typedef bit::Range<FieldType,TransactByField::end, 2>
TransactDetailField;
typedef bit::Range<FieldType,TransactDetailField::end, 1>
SolverStateField;
@@ -86,13 +79,6 @@
UNINSTALLED = bit::RangeValue<StateField,0>::value,
INSTALLED = bit::RangeValue<StateField,1>::value
};
- enum EstablishValue
- {
- UNDETERMINED = bit::RangeValue<EstablishField,0>::value,
- UNNEEDED = bit::RangeValue<EstablishField,1>::value, // has
freshens, none trigger
- SATISFIED = bit::RangeValue<EstablishField,2>::value, // has none
or triggered freshens, all requirements fulfilled
- INCOMPLETE = bit::RangeValue<EstablishField,3>::value //
installed: has none or triggered freshens, requirements unfulfilled
- };
enum TransactValue
{
KEEP_STATE = bit::RangeValue<TransactField,0>::value,
@@ -222,33 +208,6 @@
bool isToBeUninstalled() const
{ return isInstalled() && transacts(); }

- bool isUndetermined() const
- { return fieldValueIs<EstablishField>( UNDETERMINED ); }
-
- bool isEstablishedUneeded() const
- { return fieldValueIs<EstablishField>( UNNEEDED ); }
-
- bool isEstablishedSatisfied() const
- { return fieldValueIs<EstablishField>( SATISFIED ); }
-
- bool isEstablishedIncomplete() const
- { return fieldValueIs<EstablishField>( INCOMPLETE ); }
-
- bool isUnneeded() const
- { return isUninstalled() && fieldValueIs<EstablishField>( UNNEEDED ); }
-
- bool isSatisfied() const
- { return isUninstalled() && fieldValueIs<EstablishField>( SATISFIED ); }
-
- bool isComplete () const
- { return isInstalled() && fieldValueIs<EstablishField>( SATISFIED ); }
-
- bool isIncomplete() const
- { return isInstalled() && fieldValueIs<EstablishField>( INCOMPLETE ); }
-
- bool isNeeded() const
- { return isUninstalled() && fieldValueIs<EstablishField>( INCOMPLETE ); }
-
bool isLocked() const
{ return fieldValueIs<TransactField>( LOCKED ); }

@@ -508,14 +467,6 @@
//------------------------------------------------------------------------
// *** These are only for the Resolver ***

- EstablishValue getEstablishValue() const
- { return (EstablishValue)_bitfield.value<EstablishField>(); }
-
- bool setEstablishValue(const EstablishValue &establish) {
- fieldValueAssign<EstablishField>(establish);
- return true;
- }
-
bool setToBeUninstalledDueToObsolete ( )
{
if (!setToBeUninstalled (SOLVER)) return false;
@@ -576,30 +527,6 @@
return true;
}

- bool setUndetermined ()
- {
- fieldValueAssign<EstablishField>(UNDETERMINED);
- return true;
- }
-
- bool setUnneeded ()
- {
- fieldValueAssign<EstablishField>(UNNEEDED);
- return true;
- }
-
- bool setSatisfied ()
- {
- fieldValueAssign<EstablishField>(SATISFIED);
- return true;
- }
-
- bool setIncomplete ()
- {
- fieldValueAssign<EstablishField>(INCOMPLETE);
- return true;
- }
-
bool isSeen () const
{ return fieldValueIs<SolverStateField>( SEEN ); }

@@ -646,7 +573,6 @@
private:
/** Ctor for intialization of builtin constants. */
ResStatus( StateValue s,
- EstablishValue e = UNDETERMINED,
TransactValue t = KEEP_STATE,
InstallDetailValue i = EXPLICIT_INSTALL,
RemoveDetailValue r = EXPLICIT_REMOVE,

Modified: trunk/libzypp/zypp/sat/SATResolver.cc
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/sat/SATResolver.cc?rev=9337&r1=9336&r2=9337&view=diff
==============================================================================
--- trunk/libzypp/zypp/sat/SATResolver.cc (original)
+++ trunk/libzypp/zypp/sat/SATResolver.cc Wed Apr 2 13:48:14 2008
@@ -239,19 +239,6 @@
r = item.status().setToBeUninstalled (causer);
_XDEBUG("SATSolutionToPool(" << item << ", " << status << ") remove !"
<< r);
}
- else if (status.isIncomplete()
- || status.isNeeded()) {
- r = item.status().setIncomplete();
- _XDEBUG("SATSolutionToPool(" << item << ", " << status << ") incomplete
!" << r);
- }
- else if (status.isUnneeded()) {
- r = item.status().setUnneeded();
- _XDEBUG("SATSolutionToPool(" << item << ", " << status << ") unneeded
!" << r);
- }
- else if (status.isSatisfied()) {
- r = item.status().setSatisfied();
- _XDEBUG("SATSolutionToPool(" << item << ", " << status << ") satisfied
!" << r);
- }
else if (status.isRecommended()) {
item.status().setRecommended(true);
_XDEBUG("SATSolutionToPool(" << item << ", " << status << ")
recommended !" << r);

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

< Previous Next >
This Thread
  • No further messages