29 #undef ZYPP_BASE_LOGGER_LOGGROUP 30 #define ZYPP_BASE_LOGGER_LOGGROUP "PoolQuery" 47 bool isDependencyAttribute(
const sat::SolvAttr& attr_r )
49 static sat::SolvAttr deps[] = {
69 struct EditionRangePredicate
71 EditionRangePredicate(
const Rel & op,
const Edition & edition )
75 EditionRangePredicate(
const Rel & op,
const Edition & edition,
const Arch & arch )
80 bool operator()(
const sat::LookupAttr::iterator& iter_r )
82 if ( !
_arch.empty() && iter_r.inSolvable().arch() !=
_arch )
85 CapDetail cap( iter_r.id() );
86 if ( ! cap.isSimple() )
93 std::string serialize()
const 95 std::string ret(
"EditionRange" );
107 struct SolvableRangePredicate
109 SolvableRangePredicate(
const Rel & op,
const Edition & edition )
114 SolvableRangePredicate(
const Rel & op,
const Edition & edition,
const Arch & arch )
119 bool operator()(
const sat::LookupAttr::iterator& iter_r )
121 if ( !
_arch.empty() && iter_r.inSolvable().arch() !=
_arch )
126 std::string serialize()
const 128 std::string ret(
"SolvableRange" );
143 struct CapabilityMatchPredicate
145 CapabilityMatchPredicate( Capability cap_r )
149 bool operator()(
const sat::LookupAttr::iterator& iter_r )
const 154 std::string serialize()
const 156 std::string ret(
"CapabilityMatch" );
194 using Predicate = function<bool (sat::LookupAttr::iterator)>;
196 static bool always(
const sat::LookupAttr::iterator& ) {
return true; }
197 static bool never(
const sat::LookupAttr::iterator& ) {
return false; }
202 AttrMatchData( sat::SolvAttr attr_r )
206 AttrMatchData( sat::SolvAttr attr_r, StrMatcher strMatcher_r )
211 AttrMatchData( sat::SolvAttr attr_r, StrMatcher strMatcher_r,
212 Predicate predicate_r, std::string predicateStr_r )
224 template<
class TPredicate>
225 void addPredicate(
const TPredicate & predicate_r )
236 std::string serialize()
const 238 std::string ret(
"AttrMatchData" );
249 static AttrMatchData
deserialize(
const std::string & str_r )
251 std::vector<std::string> words;
253 if ( words.empty() || words[0] !=
"AttrMatchData" )
254 ZYPP_THROW( Exception( str::Str() <<
"Expecting AttrMatchData: " << str_r ) );
255 if ( words.size() != 5 )
256 ZYPP_THROW( Exception( str::Str() <<
"Wrong number of words: " << str_r ) );
259 ret.attr = sat::SolvAttr( words[1] );
260 ret.strMatcher = StrMatcher( words[2] );
261 if (
Match::Mode mode = deserializeMode( words[3] ) )
262 ret.strMatcher.setFlags( mode );
263 ret.predicateStr = words[4];
268 if ( ! words.empty() )
270 if ( words[0] ==
"EditionRange" )
272 switch( words.size() )
275 ret.predicate = EditionRangePredicate( Rel(words[1]),
Edition(words[2]) );
278 ret.predicate = EditionRangePredicate( Rel(words[1]),
Edition(words[2]), Arch(words[3]) );
281 ZYPP_THROW( Exception( str::Str() <<
"Wrong number of words: " << str_r ) );
285 else if ( words[0] ==
"SolvableRange" )
287 switch( words.size() )
290 ret.predicate = SolvableRangePredicate( Rel(words[1]),
Edition(words[2]) );
293 ret.predicate = SolvableRangePredicate( Rel(words[1]),
Edition(words[2]), Arch(words[3]) );
296 ZYPP_THROW( Exception( str::Str() <<
"Wrong number of words: " << str_r ) );
300 else if ( words[0] ==
"CapabilityMatch" )
302 if ( words.size() != 2 )
303 ZYPP_THROW( Exception( str::Str() <<
"Wrong number of words: " << str_r ) );
304 ret.predicate = CapabilityMatchPredicate( Capability(words[1]) );
307 ZYPP_THROW( Exception( str::Str() <<
"Unknown predicate: " << str_r ) );
320 static std::string serializeMode(
Match::Mode mode_r )
327 #define OUTS(M,S) case Match::M: return #S; break 332 OUTS( STRINGSTART, S );
333 OUTS( STRINGEND, E );
334 OUTS( SUBSTRING, B );
346 static Match::Mode deserializeMode(
const std::string & str_r )
350 #define OUTS(M,C) case *#C: return Match::M; break 355 OUTS( STRINGSTART, S );
356 OUTS( STRINGEND, E );
357 OUTS( SUBSTRING, B );
370 inline std::ostream &
operator<<( std::ostream &
str,
const AttrMatchData & obj )
372 str << obj.attr <<
": " << obj.strMatcher;
373 if ( obj.kindPredicate )
374 str <<
" +(" << obj.kindPredicate <<
")";
376 str <<
" +(" << obj.predicateStr <<
")";
381 inline bool operator==(
const AttrMatchData & lhs,
const AttrMatchData & rhs )
383 return ( lhs.attr == rhs.attr
384 && lhs.strMatcher == rhs.strMatcher
385 && lhs.predicateStr == rhs.predicateStr );
389 inline bool operator!=(
const AttrMatchData & lhs,
const AttrMatchData & rhs )
390 {
return !( lhs == rhs ); }
393 inline bool operator<(
const AttrMatchData & lhs,
const AttrMatchData & rhs )
395 if ( lhs.attr != rhs.attr )
396 return ( lhs.attr < rhs.attr );
397 if ( lhs.strMatcher != rhs.strMatcher )
398 return ( lhs.strMatcher < rhs.strMatcher );
399 if ( lhs.predicateStr != rhs.predicateStr )
400 return ( lhs.predicateStr < rhs.predicateStr );
404 using AttrMatchList = std::list<AttrMatchData>;
427 Impl &operator=(
const Impl &) =
delete;
471 #define OUTS(A) if ( A != rhs.A ) return A < rhs.A; 474 OUTS( _uncompiledPredicated );
477 OUTS( _status_flags );
497 && _attrs.size() == 1
509 && _kinds == rhs.
_kinds );
522 void compile()
const;
534 friend Impl * rwcowClone<Impl>(
const Impl * rhs );
537 {
return new Impl( *
this ); }
566 _attrMatchList.clear();
589 else if (_attrs.size() == 1)
595 _attrMatchList.push_back( AttrMatchData( _attrs.begin()->first, joinedStrMatcher( joined, _flags ) ) );
602 bool attrvals_empty =
true;
603 for_( ai, _attrs.begin(), _attrs.end() )
605 if ( ai->second.empty() )
607 for_( it, ai->second.begin(), ai->second.end() )
611 attrvals_empty =
false;
615 if ( ! attrvals_empty )
620 bool attrvals_thesame =
true;
621 AttrRawStrMap::const_iterator ai = _attrs.begin();
624 for (; ai != _attrs.end(); ++ai)
628 set1.begin(), set1.end(),
629 ai->second.begin(), ai->second.end(),
630 inserter(result, result.begin()));
633 attrvals_thesame =
false;
642 if (attrvals_empty || attrvals_thesame)
656 StrMatcher matcher( joinedStrMatcher( joined, _flags ) );
657 for_( ai, _attrs.begin(), _attrs.end() )
659 _attrMatchList.push_back( AttrMatchData( ai->first, matcher ) );
669 for_(ai, _attrs.begin(), _attrs.end())
675 _attrMatchList.push_back( AttrMatchData( ai->first, joinedStrMatcher( joined, _flags ) ) );
681 if ( ! _uncompiledPredicated.empty() )
685 for_( it, _uncompiledPredicated.begin(), _uncompiledPredicated.end() )
691 const std::string & mstr( it->strMatcher.searchstring() );
692 if ( ! mstr.empty() )
693 joined.insert( mstr );
696 AttrMatchData nattr( *it );
697 nattr.strMatcher = joinedStrMatcher( joined, _flags );
698 _attrMatchList.push_back( std::move(nattr) );
703 _attrMatchList.push_back( *it );
709 if ( _attrMatchList.empty() )
711 _attrMatchList.push_back( AttrMatchData(
sat::SolvAttr::allAttr, joinedStrMatcher( _strings, _flags ) ) );
715 for_( it, _attrMatchList.begin(), _attrMatchList.end() )
717 it->strMatcher.compile();
729 std::string rxEscape( std::string str_r,
const Match & flags_r )
744 if ( container_r.empty() )
747 if ( container_r.size() == 1 && !_match_word )
748 return StrMatcher( *container_r.begin(), flags_r );
753 Match retflags( flags_r );
759 else if ( _match_word )
764 for ( const::std::string & s : container_r )
766 ret << sep << rxEscape( s, flags_r );
774 else if ( _match_word )
782 std::ostringstream o;
785 if ( _kinds.empty() )
789 for(Kinds::const_iterator it = _kinds.begin();
790 it != _kinds.end(); ++it)
796 if ( _repos.empty() )
800 for(StrContainer::const_iterator it = _repos.begin();
801 it != _repos.end(); ++it)
806 o <<
"version: "<< _op <<
" " << _edition.asString() << endl;
807 o <<
"status: " << ( _status_flags ? ( _status_flags == INSTALLED_ONLY ?
"INSTALLED_ONLY" :
"UNINSTALLED_ONLY" )
810 o <<
"string match flags: " <<
Match(_flags) << endl;
814 for(StrContainer::const_iterator it = _strings.begin();
815 it != _strings.end(); ++it)
819 o <<
"attributes: " << endl;
820 for(AttrRawStrMap::const_iterator ai = _attrs.begin(); ai != _attrs.end(); ++ai)
822 o <<
"* " << ai->first <<
": ";
823 for(StrContainer::const_iterator vi = ai->second.begin();
824 vi != ai->second.end(); ++vi)
829 o <<
"predicated: " << endl;
830 for_( it, _uncompiledPredicated.begin(), _uncompiledPredicated.end() )
832 o <<
"* " << *it << endl;
836 o <<
"last attribute matcher compiled: " << endl;
837 if ( _attrMatchList.empty() )
839 o <<
"not yet compiled" << endl;
843 for_( it, _attrMatchList.begin(), _attrMatchList.end() )
845 o <<
"* " << *it << endl;
868 if (repoalias.empty())
870 WAR <<
"ignoring an empty repository alias" << endl;
922 AttrMatchData attrMatchData(
attr );
924 attrMatchData.strMatcher =
StrMatcher( name, mode );
928 attrMatchData.strMatcher =
StrMatcher( strchr( name.c_str(),
':')+1, mode );
929 attrMatchData.kindPredicate = explicitKind;
932 if ( isDependencyAttribute(
attr ) )
933 attrMatchData.addPredicate( EditionRangePredicate( op,
edition, arch ) );
935 attrMatchData.addPredicate( SolvableRangePredicate( op,
edition, arch ) );
949 if ( isDependencyAttribute(
attr ) )
950 attrMatchData.addPredicate( CapabilityMatchPredicate( cap_r ) );
952 attrMatchData.addPredicate( SolvableRangePredicate( cap.
op(), cap.
ed() ) );
996 return it !=
_pimpl->
_attrs.end() ? it->second : nocontainer;
1154 bool finded_something =
false;
1162 if ((!s.empty()) && s[0]==
'#')
1168 if (s.empty() || pos == s.npos)
1170 if (finded_something)
1180 finded_something =
true;
1182 std::string attrName(
str::trim(std::string(s,0,pos)));
1183 std::string attrValue(
str::trim(std::string(s,pos+1,s.npos)));
1231 WAR <<
"unknown string type " << attrValue << endl;
1235 WAR <<
"forget recover some attribute defined as String type attribute: " << attrValue << endl;
1255 WAR <<
"unknown boolean value " << attrValue << endl;
1260 if( attrValue ==
"all" )
1264 else if( attrValue ==
"installed" )
1268 else if( attrValue ==
"not-installed" )
1274 WAR <<
"Unknown value for install status " << attrValue << endl;
1281 if (attrValue.find_first_of(
"=<>!") == 0)
1283 pos = attrValue.find_last_of(
"=<>");
1284 rel =
Rel(attrValue.substr(0, pos+1));
1285 attrValue =
str::trim(attrValue.substr(pos+1, attrValue.npos));
1304 WAR <<
"empty attribute name" << endl;
1308 std::string s = attrName;
1311 if (
a == SolvAttr::name || isDependencyAttribute(
a ) )
1345 if ( attrmatch.attr == SolvAttr::name && attrmatch.strMatcher.flags().mode() ==
Match::OTHER )
1350 std::vector<std::string> words;
1352 if ( words.size() < 4 || words[3].empty() )
1364 if ( attrmatch.kindPredicate )
1367 addKind( attrmatch.kindPredicate );
1371 addAttribute( SolvAttr::name, attrmatch.strMatcher.searchstring() );
1374 std::vector<std::string> words;
1376 if ( ! words.empty() )
1378 if ( words[0] ==
"EditionRange" || words[0] ==
"SolvableRange" )
1390 return finded_something;
1402 str <<
"repo: " << *it << delim ;
1408 << it->idStr() << delim ;
1423 <<
": substring" << delim;
1438 str <<
"case_sensitive: ";
1441 str <<
"on" << delim;
1445 str <<
"off" << delim;
1454 str <<
"install_status: all" << delim;
1457 str <<
"install_status: installed" << delim;
1460 str <<
"install_status: not-installed" << delim;
1472 std::string s = it->first.asString();
1474 for_( it2,it->second.begin(),it->second.end() )
1476 str << s <<
": "<< *it2 << delim;
1482 str <<
"complex: "<< it->serialize() << delim;
1485 if (
const std::string & c {
comment() }; not c.empty() )
1545 if ( base_r ==
end() )
1553 while ( base_r !=
end() )
1568 if ( base_r ==
end() )
1580 return_r.push_back( base );
1583 for ( ++base; base.
inSolvable() == inSolvable; ++base )
1586 return_r.push_back( base );
1594 const AttrMatchData & matchData( *mi );
1596 if ( matchData.strMatcher )
1602 const AttrMatchData::Predicate &
predicate( matchData.predicate );
1606 return_r.push_back( it );
1629 for_( it, query_r->_repos.begin(), query_r->_repos.end() )
1643 _kinds = query_r->_kinds;
1666 if (
_repos.size() == 1 )
1675 if ( matchData.strMatcher )
1727 bool globalKindOk =(
_kinds.empty() || inSolvable.isKind(
_kinds.begin(),
_kinds.end() ) );
1738 if ( matchData.kindPredicate )
1740 if ( matchData.kindPredicate != inSolvable.kind() )
1746 else if ( !globalKindOk )
1749 if ( !matchData.predicate || matchData.predicate( base_r ) )
1758 const AttrMatchData & matchData( *mi );
1760 if ( matchData.kindPredicate )
1762 if ( matchData.kindPredicate != inSolvable.kind() )
1765 else if ( !globalKindOk )
1769 if ( matchData.strMatcher )
1775 const AttrMatchData::Predicate &
predicate( matchData.predicate );
1817 if ( !
_matcher->advance( base_reference() ) )
1841 if ( ! obj.matchesEmpty() )
1843 for_( it, obj.matchesBegin(), obj.matchesEnd() )
1845 str << endl <<
" " << it->inSolvAttr() <<
"\t" << it->asString();
int _status_flags
Installed status filter flags.
std::ostream & operator<<(std::ostream &str, const FileConflicts &obj)
relates: FileConflicts Stream output
std::set< std::string > StrContainer
bool strToFalse(const C_Str &str)
Return false if str is 0, false, no, off, never.
bool operator<(const LocaleSupport &lhs, const LocaleSupport &rhs)
relates: LocaleSupport
static const PoolQueryAttr installStatusAttr
Rel _op
Operator for edition condition.
A Solvable object within the sat Pool.
static const SolvAttr dep_provides
void setUninstalledOnly()
Return only packages from repos other than .
StatusFilter
Installed status filter setters.
static const StringTypeAttr substringAttr
const AttrRawStrMap & attributes() const
Map (map<SolvAttr, StrContainer>) of attribute values added via addAttribute(), addDep in string form...
bool compareByRel(Rel op, const Tp &lhs, const Tp &rhs, TCompare compare)
Comparison of two elements using relational operator op.
function< bool(const sat::Solvable &)> ProcessResolvable
void addAttribute(const sat::SolvAttr &attr, const std::string &value="")
Filter by the value of the specified attr attribute.
void setAttr(SolvAttr attr_r)
Set the SolvAttr to search.
unsigned splitEscaped(const C_Str &line_r, TOutputIterator result_r, const C_Str &sepchars_r=" \, bool withEmpty=false)
Split line_r into words with respect to escape delimeters.
static const SolvAttr dep_obsoletes
void compile() const
Compile the regex.
std::vector< sat::LookupAttr::iterator > Matches
#define ZYPP_THROW(EXCPT)
Drops a logline and throws the Exception.
String matching option flags as used e.g.
static const SolvAttr allAttr
Value to request searching all Attributes (0).
std::set< ResKind > _kinds
Resolvable kinds to include.
Helper providing more detailed information about a Capability.
PoolQuery::StrContainer & _cont
void setComment(const std::string &comment) const
Set an optional comment string describing the purpose of the query.
std::string asString(const Patch::Category &obj)
relates: Patch::Category string representation.
static const StringTypeAttr noAttr
static ResKind explicitBuiltin(const char *str_r)
Return the builtin kind if str_r explicitly prefixed.
PoolQuery iterator as returned by PoolQuery::begin.
void setFlags(const Match &flags)
Free function to set libsolv repo search flags.
String matching (STRING|SUBSTRING|GLOB|REGEX).
bool empty() const
Test for an empty Arch (this is Arch_epmty, not Arch_noarch ).
static const PoolQueryAttr caseSensitiveAttr
bool requireAll() const ZYPP_DEPRECATED
void execute(ProcessResolvable fnc)
Executes the query with the current settings.
void addString(const std::string &value)
Add a global query string.
Lightweight attribute value lookup.
const StrContainer & strings() const
Search strings added via addString()
constPtrType getPtr() const
static const PoolQueryAttr commentAttr
Match::Mode matchMode() const
Returns string matching mode as enum.
std::ostream & dumpRange(std::ostream &str, TIterator begin, TIterator end, const std::string &intro="{", const std::string &pfx="\ ", const std::string &sep="\ ", const std::string &sfx="\, const std::string &extro="}")
Print range defined by iterators (multiline style).
const Matches & matches() const
void setMatchGlob()
Set to match globs.
void setMatchRegex()
Set to use the query strings as regexes.
const Arch Arch_empty(IdString::Empty)
String related utilities and Regular expression matching.
std::string rxEscapeStr(std::string str_r)
Escape plain STRING str_r for use in a regex (not anchored by "^" or "$").
StrMatcher joinedStrMatcher(const StrContainer &container_r, const Match &flags_r) const
Join patterns in container_r according to flags_r into a single StrMatcher.
static const SolvAttr dep_recommends
bool operator<(const PoolQuery &b) const
std::string getline(std::istream &str)
Read one line from stream.
bool operator==(const FileConflicts &lhs, const FileConflicts &rhs)
relates: FileConflicts
PoolQueryMatcher(const shared_ptr< const PoolQuery::Impl > &query_r)
Ctor stores the PoolQuery settings.
void addDependency(const sat::SolvAttr &attr, const std::string &name, const Rel &op, const Edition &edition)
Query "name|global op edition".
void setModeGlob()
Set the mode GLOB.
Access to the sat-pools string space.
void setCaseSensitive(bool value=true)
Turn case sentitivity on or off (unsets or sets SEARCH_NOCASE flag).
Match _flags
Sat solver search flags.
void addKind(const ResKind &kind)
Filter by selectable kind.
#define for_(IT, BEG, END)
Convenient for-loops using iterator.
Edition represents [epoch:]version[-release]
Store PoolQuery settings and assist PoolQueryIterator.
Edition _edition
Edition condition operand.
void setModeSubstring()
Set the mode SUBSTRING.
const Kinds & kinds() const
Base class for creating IdString based types.
PoolQueryAttr(const std::string &str_r)
std::string asString() const
String representation.
size_type size() const
Number of solvables in the query result.
static const PoolQueryAttr noAttr
static const PoolQueryAttr repoAttr
bool operator==(const PoolQuery &b) const
void serialize(std::ostream &str, char delim='\n') const
Writes a machine-readable string representation of the query to stream.
bool operator!=(const PoolQuery::Impl &rhs) const
std::string _comment
Optional comment string for serialization.
const StrContainer & attribute(const sat::SolvAttr &attr) const
AttrMatchList _attrMatchList
StrMatcher per attribtue.
iterator end() const
Iterator behind the end of query results.
void turn(const Match &rhs, bool onoff)
Depending on the value of onoff, set or unset flags.
Edition::MatchRange _range
bool caseSensitive() const
returns true if search is case sensitive
StringTypeAttr(const char *cstr_r)
static Pool instance()
Singleton ctor.
void setRequireAll(bool require_all=true) ZYPP_DEPRECATED
bool filesMatchFullPath() const
Whether searching in filelists looks at the full path or just at the basenames.
std::string asString() const
void setRepo(Repository repo_r, Location=SOLV_ATTR)
Set search in one Repository.
Convenient building of std::string via std::ostringstream Basically a std::ostringstream autoconverti...
void setStatusFilterFlags(StatusFilter flags)
Set status filter directly.
std::string trim(const std::string &s, const Trim trim_r)
const StrContainer & repos() const
static const SolvAttr dep_supplements
void addRepo(const std::string &repoalias)
Filter by repo.
void setModeRegex()
Set the mode REGEX.
std::string asUserHistory() const
A single (multiline) string composed of asUserString and historyAsString.
void setMatchWord()
Set substring to match words.
const_iterator begin() const
Query result accessers.
PoolQueryMatcher & operator=(const PoolQueryMatcher &)=default
void stayInThisSolvable()
Stop after all matches in the current Solvable are processed.
const std::string & comment() const
static const SolvAttr dep_enhances
void setStrMatcher(const StrMatcher &matcher_r)
Set the pattern to match.
MyInserter(PoolQuery::StrContainer &cont)
base_iterator startNewQyery() const
Initialize a new base query.
void nextSkipSolvable()
On the next call to operator++ advance to the next Solvable.
const Rel editionRel() const
static const SolvAttr name
StringTypeAttr(const std::string &str_r)
Kinds _kinds
Kinds to search.
for_use_in_switch inSwitch() const
Enumarator provided for use in switch statement.
void setInstalledOnly()
Return only repo packages.
static const StringTypeAttr exactAttr
std::ostream & dumpOn(std::ostream &str, const Capability &obj)
relates: Capability Detailed stream output
std::ostream & dumpOn(std::ostream &str, const PoolQueryIterator &obj)
relates: PoolQueryIterator Detailed stream output.
bool recover(std::istream &str, char delim='\n')
Reads from stream query.
Mode
Mode flags (mutual exclusive).
std::string asString() const
Return a human-readable description of the query.
const base_iterator & end() const
void matchDetail(const base_iterator &base_r, std::vector< base_iterator > &return_r) const
Provide all matching attributes within this solvable.
bool advance(base_iterator &base_r) const
Editions with v-r setparator highlighted.
const_iterator end() const
An iterator pointing to the end of the query result.
static const PoolQueryAttr stringTypeAttr
static const StringTypeAttr wordAttr
const Edition edition() const
bool operator<(const PoolQuery::Impl &rhs) const
void setMatchSubstring()
Set to substring (the default).
represents all atributes in PoolQuery except SolvAtributes, which are used as is (not needed extend a...
for_use_in_switch _op
The operator.
#define arrayBegin(A)
Simple C-array iterator.
static const SolvAttr dep_suggests
std::set< Repository > _repos
Repositories include in the search.
static const PoolQueryAttr stringAttr
bool deserialize(const std::string &str_r, DownloadMode &result_r)
relates: DownloadMode Parse from string.
std::set< AttrMatchData > _uncompiledPredicated
Uncompiled attributes with predicate.
Repository reposFind(const std::string &alias_r) const
Find a Repository named alias_r.
void setModeString()
Set the mode STRING.
std::set< ResKind > Kinds
static const Match NOCASE
If set, match case insensitive.
Base class for Exception.
std::string rxEscapeGlob(std::string str_r)
Escape GLOB str_r for use in a regex (not anchored by "^" or "$").
int get() const
Return the integer representation.
Range< Edition, Match > MatchRange
Edition Range based on Match.
Solvable inSolvable() const
The current Solvable.
static const PoolQueryAttr complexAttr
bool isModeGlob() const
Whether this has mode GLOB.
void setEdition(const Edition &edition, const Rel &op=Rel::EQ)
Set version condition.
void setMatchExact()
Set to match exact string instead of substring.
PoolQueryMatcher(const PoolQueryMatcher &)=default
shared_ptr< PoolQueryMatcher > _matcher
StatusFilter statusFilterFlags() const
static const SolvAttr dep_requires
void nextSkipRepo()
On the next call to operator++ advance to the next Repository.
std::map< sat::SolvAttr, StrContainer > AttrRawStrMap
bool matchSubstring() const
StrContainer _repos
Repos to search.
bool operator()(const std::string &str)
bool empty() const
Whether the result is empty.
shared_ptr< Matches > _matches
static const SolvAttr dep_conflicts
DefaultIntegral< bool, false > _neverMatchRepo
static const PoolQueryAttr requireAllAttr
Match flags() const
Free function to get libsolv repo search flags.
bool operator!=(const FileConflicts &lhs, const FileConflicts &rhs)
relates: FileConflicts
static const PoolQueryAttr editionAttr
bool isModeRegex() const
Whether this has mode REGEX.
void setFilesMatchFullPath(bool value=true)
If set (default), look at the full path when searching in filelists.
std::string asString() const
Conversion to std::string
bool test(const Match &rhs) const
Test whether all of the rhs bits are set (same mode if rhs has one).
RW_pointer< Impl > _pimpl
Pointer to implementation.
AttrMatchList _attrMatchList
StrMatcher per attribtue.
std::ostream & operator<<(std::ostream &str, const Capabilities &obj)
relates: Capabilities Stream output
StatusFilter _status_flags
Sat solver status flags.
std::string & replaceAll(std::string &str_r, const std::string &from_r, const std::string &to_r)
Replace all occurrences of from_r with to_r in str_r (inplace).
static const ResKind nokind
Value representing nokind ("")
Impl * clone() const
clone for RWCOW_pointer
PoolQueryAttr(const char *cstr_r)
bool isAMatch(base_iterator &base_r) const
Check whether we are on a match.
static const CapMatch yes
bool overlaps(const Range< Tp, TCompare > &lhs, const Range< Tp, TCompare > &rhs)
int invokeOnEach(TIterator begin_r, TIterator end_r, TFilter filter_r, TFunction fnc_r)
Iterate through [begin_r,end_r) and invoke fnc_r on each item that passes filter_r.
bool operator()(const std::string &str)
Easy-to use interface to the ZYPP dependency resolver.
static const PoolQueryAttr kindAttr
Repository inRepo() const
The current Repository.
static const Match FILES
LookupAttr: match full path when matching in filelists, otherwise just the basenames.
StrContainer _strings
Raw search strings.
bool isModeString() const
Whether this has mode STRING.
void appendEscaped(std::string &str_r, const C_Str &next_r, const char sep_r=' ')
Escape next_r and append it to str_r using separator sep_r.
bool empty() const
Whether the query is empty.
static const StringTypeAttr globAttr
iterator begin() const
Iterator to the begin of query results.
AttrRawStrMap _attrs
Raw attributes.
static const Edition noedition
Value representing noedition ("") This is in fact a valid Edition.
bool operator==(const PoolQuery::Impl &rhs) const
static const StringTypeAttr regexAttr
bool strToTrue(const C_Str &str)
Parsing boolean from string.
bool isModeSubstring() const
Whether this has mode SUBSTRING.