Mailinglist Archive: zypp-commit (606 mails)

< Previous Next >
[zypp-commit] r9507 - /trunk/libzypp/zypp/Patch.cc
  • From: dmacvicar@xxxxxxxxxxxxxxxx
  • Date: Thu, 10 Apr 2008 12:16:28 -0000
  • Message-id: <20080410121628.AF80034026@xxxxxxxxxxxxxxxx>
Author: dmacvicar
Date: Thu Apr 10 14:16:28 2008
New Revision: 9507

URL: http://svn.opensuse.org/viewcvs/zypp?rev=9507&view=rev
Log:
- add some debug, and sorry but my emacs ate the evil tabs, I can't split the
commit

Modified:
trunk/libzypp/zypp/Patch.cc

Modified: trunk/libzypp/zypp/Patch.cc
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/Patch.cc?rev=9507&r1=9506&r2=9507&view=diff
==============================================================================
--- trunk/libzypp/zypp/Patch.cc (original)
+++ trunk/libzypp/zypp/Patch.cc Thu Apr 10 14:16:28 2008
@@ -9,9 +9,13 @@
/** \file zypp/Patch.cc
*
*/
+
+#include "zypp/base/Logger.h"
#include "zypp/Patch.h"
#include "zypp/Message.h"

+using std::endl;
+
///////////////////////////////////////////////////////////////////
namespace zypp
{ /////////////////////////////////////////////////////////////////
@@ -83,54 +87,68 @@
{
/* safety checks, shouldn't happen (tm) */
if (_col_evr_it == sat::LookupAttr( sat::SolvAttr::updateCollectionEvr,
*this ).end()
- || _col_arch_it == sat::LookupAttr(
sat::SolvAttr::updateCollectionArch, *this ).end())
+ || _col_arch_it == sat::LookupAttr(
sat::SolvAttr::updateCollectionArch, *this ).end())
{
- /* FIXME: Raise exception ?! */
- break;
+ /* FIXME: Raise exception ?! */
+ ERR << *this << " : The thing that should not happen, happened." <<
endl;
+ break;
}
+
IdString nameid( _col_name_it.asString() ); /* IdString for fast compare
*/
Arch arch( _col_arch_it.asString() );

/* search providers of name */
sat::WhatProvides providers( Capability( _col_name_it.asString() ) );
+ MIL << *this << " providers: " << endl;
+ MIL << providers << endl;
+
if (providers.empty())
- continue;
+ {
+ WAR << *this << " misses provider for '" << _col_name_it.asString()
<< "'" << endl;
+ continue;
+ }
+
bool is_relevant = false;
for_( it, providers.begin(), providers.end() )
{
- if (it->ident() != nameid) /* package _name_ must match */
- continue;
+ if (it->ident() != nameid) /* package _name_ must match */
+ continue;

- if (it->isSystem() /* only look at installed providers with same arch
*/
- && it->arch() == arch)
- {
- is_relevant = true;
- }
+ if (it->isSystem() /* only look at installed providers with same
arch */
+ && it->arch() == arch)
+ {
+ is_relevant = true;
+ }
}
if (!is_relevant)
- continue; /* skip if name.arch is not installed */
+ {
+ MIL << *this << " is not relevant to the system" << endl;
+
+ continue; /* skip if name.arch is not installed */
+ }

+
/* find exact providers first (this matches the _real_ 'collection
content' of the patch */
sat::WhatProvides exact_providers( Capability( _col_name_it.asString(),
Rel::EQ, _col_evr_it.asString(), ResKind::package ) );
if (exact_providers.empty())
{
- /* no exact providers: find 'best' providers */
- sat::WhatProvides best_providers( Capability( _col_name_it.asString(),
Rel::GT, _col_evr_it.asString(), ResKind::package ) );
- if (best_providers.empty())
- {
- // Hmm, this patch is not installable, noone is providing the package
in the collection
- // raise execption ? fake a solvable ?
- }
- else
- {
- // FIXME ?! loop over providers and try to find installed ones ?
- result.get().insert( *(best_providers.begin()) );
- }
+ /* no exact providers: find 'best' providers */
+ sat::WhatProvides best_providers( Capability(
_col_name_it.asString(), Rel::GT, _col_evr_it.asString(), ResKind::package ) );
+ if (best_providers.empty())
+ {
+ // Hmm, this patch is not installable, noone is providing the
package in the collection
+ // raise execption ? fake a solvable ?
+ }
+ else
+ {
+ // FIXME ?! loop over providers and try to find installed ones ?
+ result.get().insert( *(best_providers.begin()) );
+ }
}
else
{
- // FIXME ?! loop over providers and try to find installed ones ?
- result.get().insert( *(exact_providers.begin()) );
+ // FIXME ?! loop over providers and try to find installed ones ?
+ result.get().insert( *(exact_providers.begin()) );
}
} /* while (attribute array) */


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

< Previous Next >
This Thread
  • No further messages