ref: refs/heads/ma-tmp-pqt
commit b40b059123fd7812c7b611a8ad044e13fb9f971e
Author: Michael Andres
Date: Fri Apr 10 15:33:25 2009 +0200
backup
---
devel/devel.ma/NewPool.cc | 8 +++++---
zypp/PoolQuery.cc | 13 +++++--------
2 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/devel/devel.ma/NewPool.cc b/devel/devel.ma/NewPool.cc
index 546cdc5..97baeb2 100644
--- a/devel/devel.ma/NewPool.cc
+++ b/devel/devel.ma/NewPool.cc
@@ -613,8 +613,8 @@ try {
PoolQuery q;
//querycompare( q );
- q.addString(search);
- q.addAttribute(sat::SolvAttr::name);
+ //q.addString(search);
+ //q.addAttribute(sat::SolvAttr::name);
//q.addAttribute(sat::SolvAttr::summary);
q.setMatchSubstring();
q.setCaseSensitive( true );
@@ -622,7 +622,9 @@ try {
//q.addRepo( "11.1-update" );
//q.addRepo( "@System" );
- //q.addKind( ResKind::package );
+ q.addKind( ResKind::package );
+ //q.addKind( ResKind::pattern );
+ //q.addKind( ResKind::patch );
//q.setEdition( Edition("1.0"), Rel::GE );
diff --git a/zypp/PoolQuery.cc b/zypp/PoolQuery.cc
index a7f5028..4b6a97e 100644
--- a/zypp/PoolQuery.cc
+++ b/zypp/PoolQuery.cc
@@ -412,7 +412,6 @@ attremptycheckend:
0, // attribute id - only if 1 attr key specified
_rcstrings.empty() ? 0 : _rcstrings.c_str(), // compiled search string
_cflags);
- INT << "rcstrings >" << _rcstrings << "<" << endl;
}
else if (_rcattrs.size() == 1)
{
@@ -1514,6 +1513,7 @@ attremptycheckend:
return q.begin();
}
+
/** Check whether we are on a match.
*
* The check covers the whole Solvable, not just the current
@@ -1527,7 +1527,6 @@ attremptycheckend:
bool isAMatch( base_iterator & base_r ) const
{
++_counter;
-#if 0
/////////////////////////////////////////////////////////////////////
Repository inRepo( base_r.inRepo() );
// Status restriction:
@@ -1546,11 +1545,12 @@ attremptycheckend:
/////////////////////////////////////////////////////////////////////
sat::Solvable inSolvable( base_r.inSolvable() );
// Kind restriction:
- if ( ! _kinds.empty() && _kinds.find( inSolvable.kind() ) == _kinds.end() )
+ if ( ! _kinds.empty() && ! inSolvable.isKind( _kinds.begin(), _kinds.end() ) )
{
- base_r.nextSkipSolvable();
- return false;
+ base_r.nextSkipSolvable();
+ return false;
}
+
// Edition restriction:
if ( _op != Rel::ANY && !compareByRel( _op, inSolvable.edition(), _edition, Edition::Match() ) )
{
@@ -1558,9 +1558,6 @@ attremptycheckend:
return false;
}
/////////////////////////////////////////////////////////////////////
-#else
- sat::Solvable inSolvable( base_r.inSolvable() );
-#endif
// string matching:
if( _attrs_str.empty() )
{
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org
For additional commands, e-mail: zypp-commit+help@opensuse.org