Mailinglist Archive: zypp-commit (194 mails)
| < Previous | Next > |
[zypp-commit] r10444 - /trunk/libzypp/zypp/solver/detail/Resolver.cc
- From: schubi2@xxxxxxxxxxxxxxxx
- Date: Mon, 23 Jun 2008 10:40:09 -0000
- Message-id: <20080623104009.52E1E24B8B@xxxxxxxxxxxxxxxx>
Author: schubi2
Date: Mon Jun 23 12:40:08 2008
New Revision: 10444
URL: http://svn.opensuse.org/viewcvs/zypp?rev=10444&view=rev
Log:
Take only care for recommended packages if it is really set in SAT
solver
Modified:
trunk/libzypp/zypp/solver/detail/Resolver.cc
Modified: trunk/libzypp/zypp/solver/detail/Resolver.cc
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/solver/detail/Resolver.cc?rev=10444&r1=10443&r2=10444&view=diff
==============================================================================
--- trunk/libzypp/zypp/solver/detail/Resolver.cc (original)
+++ trunk/libzypp/zypp/solver/detail/Resolver.cc Mon Jun 23 12:40:08 2008
@@ -497,87 +497,89 @@
}
}
}
-
- //Recommends
- for (Capabilities::const_iterator capIt = (*instIter)->dep
(Dep::RECOMMENDS).begin(); capIt != (*instIter)->dep (Dep::RECOMMENDS).end();
++capIt)
- {
- sat::WhatProvides possibleProviders(*capIt);
- for_( iter, possibleProviders.begin(), possibleProviders.end()
) {
- PoolItem provider = ResPool::instance().find( *iter );
+
+ if (!(_satResolver->onlyRequires())) {
+ //Recommends
+ for (Capabilities::const_iterator capIt = (*instIter)->dep
(Dep::RECOMMENDS).begin(); capIt != (*instIter)->dep (Dep::RECOMMENDS).end();
++capIt)
+ {
+ sat::WhatProvides possibleProviders(*capIt);
+ for_( iter, possibleProviders.begin(),
possibleProviders.end() ) {
+ PoolItem provider = ResPool::instance().find( *iter );
- // searching if this provider will already be installed
- bool found = false;
- bool alreadySetForInstallation = false;
- ItemCapKindMap::const_iterator pos =
_isInstalledBy.find(provider);
- while (pos != _isInstalledBy.end()
- && pos->first == provider
- && !found) {
- alreadySetForInstallation = true;
- ItemCapKind capKind = pos->second;
- if (capKind.item == *instIter) found = true;
- pos++;
- }
+ // searching if this provider will already be installed
+ bool found = false;
+ bool alreadySetForInstallation = false;
+ ItemCapKindMap::const_iterator pos =
_isInstalledBy.find(provider);
+ while (pos != _isInstalledBy.end()
+ && pos->first == provider
+ && !found) {
+ alreadySetForInstallation = true;
+ ItemCapKind capKind = pos->second;
+ if (capKind.item == *instIter) found = true;
+ pos++;
+ }
- if (!found
- && provider.status().isToBeInstalled()) {
- if (provider.status().isBySolver()) {
- ItemCapKind capKindisInstalledBy( *instIter,
*capIt, Dep::RECOMMENDS, !alreadySetForInstallation );
- _isInstalledBy.insert (make_pair( provider,
capKindisInstalledBy));
- } else {
- // no initial installation cause it has been set be
e.g. user
- ItemCapKind capKindisInstalledBy( *instIter,
*capIt, Dep::RECOMMENDS, false );
- _isInstalledBy.insert (make_pair( provider,
capKindisInstalledBy));
+ if (!found
+ && provider.status().isToBeInstalled()) {
+ if (provider.status().isBySolver()) {
+ ItemCapKind capKindisInstalledBy( *instIter,
*capIt, Dep::RECOMMENDS, !alreadySetForInstallation );
+ _isInstalledBy.insert (make_pair( provider,
capKindisInstalledBy));
+ } else {
+ // no initial installation cause it has been
set be e.g. user
+ ItemCapKind capKindisInstalledBy( *instIter,
*capIt, Dep::RECOMMENDS, false );
+ _isInstalledBy.insert (make_pair( provider,
capKindisInstalledBy));
+ }
+ ItemCapKind capKindisInstalledBy( provider, *capIt,
Dep::RECOMMENDS, !alreadySetForInstallation );
+ _installs.insert (make_pair( *instIter,
capKindisInstalledBy));
}
- ItemCapKind capKindisInstalledBy( provider, *capIt,
Dep::RECOMMENDS, !alreadySetForInstallation );
- _installs.insert (make_pair( *instIter,
capKindisInstalledBy));
- }
- if (provider.status().staysInstalled()) { // Is already
satisfied by an item which is installed
- ItemCapKind capKindisInstalledBy( provider, *capIt,
Dep::RECOMMENDS, false );
- _satifiedByInstalled.insert (make_pair( *instIter,
capKindisInstalledBy));
- }
+ if (provider.status().staysInstalled()) { // Is already
satisfied by an item which is installed
+ ItemCapKind capKindisInstalledBy( provider, *capIt,
Dep::RECOMMENDS, false );
+ _satifiedByInstalled.insert (make_pair( *instIter,
capKindisInstalledBy));
+ }
+ }
}
- }
- //Supplements
- for (Capabilities::const_iterator capIt = (*instIter)->dep
(Dep::SUPPLEMENTS).begin(); capIt != (*instIter)->dep (Dep::SUPPLEMENTS).end();
++capIt)
- {
- sat::WhatProvides possibleProviders(*capIt);
- for_( iter, possibleProviders.begin(), possibleProviders.end()
) {
- PoolItem provider = ResPool::instance().find( *iter );
- // searching if this item will already be installed
- bool found = false;
- bool alreadySetForInstallation = false;
- ItemCapKindMap::const_iterator pos =
_isInstalledBy.find(*instIter);
- while (pos != _isInstalledBy.end()
- && pos->first == *instIter
- && !found) {
- alreadySetForInstallation = true;
- ItemCapKind capKind = pos->second;
- if (capKind.item == provider) found = true;
- pos++;
- }
+ //Supplements
+ for (Capabilities::const_iterator capIt = (*instIter)->dep
(Dep::SUPPLEMENTS).begin(); capIt != (*instIter)->dep (Dep::SUPPLEMENTS).end();
++capIt)
+ {
+ sat::WhatProvides possibleProviders(*capIt);
+ for_( iter, possibleProviders.begin(),
possibleProviders.end() ) {
+ PoolItem provider = ResPool::instance().find( *iter );
+ // searching if this item will already be installed
+ bool found = false;
+ bool alreadySetForInstallation = false;
+ ItemCapKindMap::const_iterator pos =
_isInstalledBy.find(*instIter);
+ while (pos != _isInstalledBy.end()
+ && pos->first == *instIter
+ && !found) {
+ alreadySetForInstallation = true;
+ ItemCapKind capKind = pos->second;
+ if (capKind.item == provider) found = true;
+ pos++;
+ }
- if (!found
- && instIter->status().isToBeInstalled()) {
- if (instIter->status().isBySolver()) {
- ItemCapKind capKindisInstalledBy( provider, *capIt,
Dep::SUPPLEMENTS, !alreadySetForInstallation );
- _isInstalledBy.insert (make_pair( *instIter,
capKindisInstalledBy));
- } else {
- // no initial installation cause it has been set be
e.g. user
- ItemCapKind capKindisInstalledBy( provider, *capIt,
Dep::SUPPLEMENTS, false );
- _isInstalledBy.insert (make_pair( *instIter,
capKindisInstalledBy));
+ if (!found
+ && instIter->status().isToBeInstalled()) {
+ if (instIter->status().isBySolver()) {
+ ItemCapKind capKindisInstalledBy( provider,
*capIt, Dep::SUPPLEMENTS, !alreadySetForInstallation );
+ _isInstalledBy.insert (make_pair( *instIter,
capKindisInstalledBy));
+ } else {
+ // no initial installation cause it has been
set be e.g. user
+ ItemCapKind capKindisInstalledBy( provider,
*capIt, Dep::SUPPLEMENTS, false );
+ _isInstalledBy.insert (make_pair( *instIter,
capKindisInstalledBy));
+ }
+ ItemCapKind capKindisInstalledBy( *instIter,
*capIt, Dep::SUPPLEMENTS, !alreadySetForInstallation );
+ _installs.insert (make_pair( provider,
capKindisInstalledBy));
}
- ItemCapKind capKindisInstalledBy( *instIter, *capIt,
Dep::SUPPLEMENTS, !alreadySetForInstallation );
- _installs.insert (make_pair( provider,
capKindisInstalledBy));
- }
- if (instIter->status().staysInstalled()) { // Is already
satisfied by an item which is installed
- ItemCapKind capKindisInstalledBy( *instIter, *capIt,
Dep::SUPPLEMENTS, !alreadySetForInstallation );
- _satifiedByInstalled.insert (make_pair( provider,
capKindisInstalledBy));
+ if (instIter->status().staysInstalled()) { // Is
already satisfied by an item which is installed
+ ItemCapKind capKindisInstalledBy( *instIter,
*capIt, Dep::SUPPLEMENTS, !alreadySetForInstallation );
+ _satifiedByInstalled.insert (make_pair( provider,
capKindisInstalledBy));
+ }
}
}
- }
+ }
}
}
}
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-commit+help@xxxxxxxxxxxx
Date: Mon Jun 23 12:40:08 2008
New Revision: 10444
URL: http://svn.opensuse.org/viewcvs/zypp?rev=10444&view=rev
Log:
Take only care for recommended packages if it is really set in SAT
solver
Modified:
trunk/libzypp/zypp/solver/detail/Resolver.cc
Modified: trunk/libzypp/zypp/solver/detail/Resolver.cc
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/solver/detail/Resolver.cc?rev=10444&r1=10443&r2=10444&view=diff
==============================================================================
--- trunk/libzypp/zypp/solver/detail/Resolver.cc (original)
+++ trunk/libzypp/zypp/solver/detail/Resolver.cc Mon Jun 23 12:40:08 2008
@@ -497,87 +497,89 @@
}
}
}
-
- //Recommends
- for (Capabilities::const_iterator capIt = (*instIter)->dep
(Dep::RECOMMENDS).begin(); capIt != (*instIter)->dep (Dep::RECOMMENDS).end();
++capIt)
- {
- sat::WhatProvides possibleProviders(*capIt);
- for_( iter, possibleProviders.begin(), possibleProviders.end()
) {
- PoolItem provider = ResPool::instance().find( *iter );
+
+ if (!(_satResolver->onlyRequires())) {
+ //Recommends
+ for (Capabilities::const_iterator capIt = (*instIter)->dep
(Dep::RECOMMENDS).begin(); capIt != (*instIter)->dep (Dep::RECOMMENDS).end();
++capIt)
+ {
+ sat::WhatProvides possibleProviders(*capIt);
+ for_( iter, possibleProviders.begin(),
possibleProviders.end() ) {
+ PoolItem provider = ResPool::instance().find( *iter );
- // searching if this provider will already be installed
- bool found = false;
- bool alreadySetForInstallation = false;
- ItemCapKindMap::const_iterator pos =
_isInstalledBy.find(provider);
- while (pos != _isInstalledBy.end()
- && pos->first == provider
- && !found) {
- alreadySetForInstallation = true;
- ItemCapKind capKind = pos->second;
- if (capKind.item == *instIter) found = true;
- pos++;
- }
+ // searching if this provider will already be installed
+ bool found = false;
+ bool alreadySetForInstallation = false;
+ ItemCapKindMap::const_iterator pos =
_isInstalledBy.find(provider);
+ while (pos != _isInstalledBy.end()
+ && pos->first == provider
+ && !found) {
+ alreadySetForInstallation = true;
+ ItemCapKind capKind = pos->second;
+ if (capKind.item == *instIter) found = true;
+ pos++;
+ }
- if (!found
- && provider.status().isToBeInstalled()) {
- if (provider.status().isBySolver()) {
- ItemCapKind capKindisInstalledBy( *instIter,
*capIt, Dep::RECOMMENDS, !alreadySetForInstallation );
- _isInstalledBy.insert (make_pair( provider,
capKindisInstalledBy));
- } else {
- // no initial installation cause it has been set be
e.g. user
- ItemCapKind capKindisInstalledBy( *instIter,
*capIt, Dep::RECOMMENDS, false );
- _isInstalledBy.insert (make_pair( provider,
capKindisInstalledBy));
+ if (!found
+ && provider.status().isToBeInstalled()) {
+ if (provider.status().isBySolver()) {
+ ItemCapKind capKindisInstalledBy( *instIter,
*capIt, Dep::RECOMMENDS, !alreadySetForInstallation );
+ _isInstalledBy.insert (make_pair( provider,
capKindisInstalledBy));
+ } else {
+ // no initial installation cause it has been
set be e.g. user
+ ItemCapKind capKindisInstalledBy( *instIter,
*capIt, Dep::RECOMMENDS, false );
+ _isInstalledBy.insert (make_pair( provider,
capKindisInstalledBy));
+ }
+ ItemCapKind capKindisInstalledBy( provider, *capIt,
Dep::RECOMMENDS, !alreadySetForInstallation );
+ _installs.insert (make_pair( *instIter,
capKindisInstalledBy));
}
- ItemCapKind capKindisInstalledBy( provider, *capIt,
Dep::RECOMMENDS, !alreadySetForInstallation );
- _installs.insert (make_pair( *instIter,
capKindisInstalledBy));
- }
- if (provider.status().staysInstalled()) { // Is already
satisfied by an item which is installed
- ItemCapKind capKindisInstalledBy( provider, *capIt,
Dep::RECOMMENDS, false );
- _satifiedByInstalled.insert (make_pair( *instIter,
capKindisInstalledBy));
- }
+ if (provider.status().staysInstalled()) { // Is already
satisfied by an item which is installed
+ ItemCapKind capKindisInstalledBy( provider, *capIt,
Dep::RECOMMENDS, false );
+ _satifiedByInstalled.insert (make_pair( *instIter,
capKindisInstalledBy));
+ }
+ }
}
- }
- //Supplements
- for (Capabilities::const_iterator capIt = (*instIter)->dep
(Dep::SUPPLEMENTS).begin(); capIt != (*instIter)->dep (Dep::SUPPLEMENTS).end();
++capIt)
- {
- sat::WhatProvides possibleProviders(*capIt);
- for_( iter, possibleProviders.begin(), possibleProviders.end()
) {
- PoolItem provider = ResPool::instance().find( *iter );
- // searching if this item will already be installed
- bool found = false;
- bool alreadySetForInstallation = false;
- ItemCapKindMap::const_iterator pos =
_isInstalledBy.find(*instIter);
- while (pos != _isInstalledBy.end()
- && pos->first == *instIter
- && !found) {
- alreadySetForInstallation = true;
- ItemCapKind capKind = pos->second;
- if (capKind.item == provider) found = true;
- pos++;
- }
+ //Supplements
+ for (Capabilities::const_iterator capIt = (*instIter)->dep
(Dep::SUPPLEMENTS).begin(); capIt != (*instIter)->dep (Dep::SUPPLEMENTS).end();
++capIt)
+ {
+ sat::WhatProvides possibleProviders(*capIt);
+ for_( iter, possibleProviders.begin(),
possibleProviders.end() ) {
+ PoolItem provider = ResPool::instance().find( *iter );
+ // searching if this item will already be installed
+ bool found = false;
+ bool alreadySetForInstallation = false;
+ ItemCapKindMap::const_iterator pos =
_isInstalledBy.find(*instIter);
+ while (pos != _isInstalledBy.end()
+ && pos->first == *instIter
+ && !found) {
+ alreadySetForInstallation = true;
+ ItemCapKind capKind = pos->second;
+ if (capKind.item == provider) found = true;
+ pos++;
+ }
- if (!found
- && instIter->status().isToBeInstalled()) {
- if (instIter->status().isBySolver()) {
- ItemCapKind capKindisInstalledBy( provider, *capIt,
Dep::SUPPLEMENTS, !alreadySetForInstallation );
- _isInstalledBy.insert (make_pair( *instIter,
capKindisInstalledBy));
- } else {
- // no initial installation cause it has been set be
e.g. user
- ItemCapKind capKindisInstalledBy( provider, *capIt,
Dep::SUPPLEMENTS, false );
- _isInstalledBy.insert (make_pair( *instIter,
capKindisInstalledBy));
+ if (!found
+ && instIter->status().isToBeInstalled()) {
+ if (instIter->status().isBySolver()) {
+ ItemCapKind capKindisInstalledBy( provider,
*capIt, Dep::SUPPLEMENTS, !alreadySetForInstallation );
+ _isInstalledBy.insert (make_pair( *instIter,
capKindisInstalledBy));
+ } else {
+ // no initial installation cause it has been
set be e.g. user
+ ItemCapKind capKindisInstalledBy( provider,
*capIt, Dep::SUPPLEMENTS, false );
+ _isInstalledBy.insert (make_pair( *instIter,
capKindisInstalledBy));
+ }
+ ItemCapKind capKindisInstalledBy( *instIter,
*capIt, Dep::SUPPLEMENTS, !alreadySetForInstallation );
+ _installs.insert (make_pair( provider,
capKindisInstalledBy));
}
- ItemCapKind capKindisInstalledBy( *instIter, *capIt,
Dep::SUPPLEMENTS, !alreadySetForInstallation );
- _installs.insert (make_pair( provider,
capKindisInstalledBy));
- }
- if (instIter->status().staysInstalled()) { // Is already
satisfied by an item which is installed
- ItemCapKind capKindisInstalledBy( *instIter, *capIt,
Dep::SUPPLEMENTS, !alreadySetForInstallation );
- _satifiedByInstalled.insert (make_pair( provider,
capKindisInstalledBy));
+ if (instIter->status().staysInstalled()) { // Is
already satisfied by an item which is installed
+ ItemCapKind capKindisInstalledBy( *instIter,
*capIt, Dep::SUPPLEMENTS, !alreadySetForInstallation );
+ _satifiedByInstalled.insert (make_pair( provider,
capKindisInstalledBy));
+ }
}
}
- }
+ }
}
}
}
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-commit+help@xxxxxxxxxxxx
| < Previous | Next > |