Go to the documentation of this file.
28 #undef ZYPP_BASE_LOGGER_LOGGROUP
29 #define ZYPP_BASE_LOGGER_LOGGROUP "PoolQuery"
46 bool isDependencyAttribute( sat::SolvAttr attr_r )
48 static sat::SolvAttr deps[] = {
68 struct EditionRangePredicate
70 EditionRangePredicate(
const Rel & op,
const Edition & edition )
74 EditionRangePredicate(
const Rel & op,
const Edition & edition,
const Arch & arch )
79 bool operator()( sat::LookupAttr::iterator iter_r )
81 if ( !
_arch.empty() && iter_r.inSolvable().arch() !=
_arch )
84 CapDetail cap( iter_r.id() );
85 if ( ! cap.isSimple() )
92 std::string serialize()
const
94 std::string ret(
"EditionRange" );
106 struct SolvableRangePredicate
108 SolvableRangePredicate(
const Rel & op,
const Edition & edition )
113 SolvableRangePredicate(
const Rel & op,
const Edition & edition,
const Arch & arch )
118 bool operator()( sat::LookupAttr::iterator iter_r )
120 if ( !
_arch.empty() && iter_r.inSolvable().arch() !=
_arch )
125 std::string serialize()
const
127 std::string ret(
"SolvableRange" );
142 struct CapabilityMatchPredicate
144 CapabilityMatchPredicate( Capability cap_r )
148 bool operator()( sat::LookupAttr::iterator iter_r )
const
153 std::string serialize()
const
155 std::string ret(
"CapabilityMatch" );
193 typedef function<
bool(sat::LookupAttr::iterator)> Predicate;
195 static bool always( sat::LookupAttr::iterator ) {
return true; }
196 static bool never( sat::LookupAttr::iterator ) {
return false; }
201 AttrMatchData( sat::SolvAttr attr_r )
205 AttrMatchData( sat::SolvAttr attr_r,
const StrMatcher & strMatcher_r )
210 AttrMatchData( sat::SolvAttr attr_r,
const StrMatcher & strMatcher_r,
211 const Predicate & predicate_r,
const std::string & predicateStr_r )
223 template<
class TPredicate>
224 void addPredicate(
const TPredicate & predicate_r )
235 std::string serialize()
const
237 std::string ret(
"AttrMatchData" );
248 static AttrMatchData
deserialize(
const std::string & str_r )
250 std::vector<std::string> words;
252 if ( words.empty() || words[0] !=
"AttrMatchData" )
253 ZYPP_THROW( Exception( str::Str() <<
"Expecting AttrMatchData: " << str_r ) );
254 if ( words.size() != 5 )
255 ZYPP_THROW( Exception( str::Str() <<
"Wrong number of words: " << str_r ) );
258 ret.attr = sat::SolvAttr( words[1] );
259 ret.strMatcher = StrMatcher( words[2] );
260 if (
Match::Mode mode = deserializeMode( words[3] ) )
261 ret.strMatcher.setFlags( mode );
262 ret.predicateStr = words[4];
267 if ( ! words.empty() )
269 if ( words[0] ==
"EditionRange" )
271 switch( words.size() )
274 ret.predicate = EditionRangePredicate( Rel(words[1]), Edition(words[2]) );
277 ret.predicate = EditionRangePredicate( Rel(words[1]), Edition(words[2]), Arch(words[3]) );
280 ZYPP_THROW( Exception( str::Str() <<
"Wrong number of words: " << str_r ) );
284 else if ( words[0] ==
"SolvableRange" )
286 switch( words.size() )
289 ret.predicate = SolvableRangePredicate( Rel(words[1]), Edition(words[2]) );
292 ret.predicate = SolvableRangePredicate( Rel(words[1]), Edition(words[2]), Arch(words[3]) );
295 ZYPP_THROW( Exception( str::Str() <<
"Wrong number of words: " << str_r ) );
299 else if ( words[0] ==
"CapabilityMatch" )
301 if ( words.size() != 2 )
302 ZYPP_THROW( Exception( str::Str() <<
"Wrong number of words: " << str_r ) );
303 ret.predicate = CapabilityMatchPredicate( Capability(words[1]) );
306 ZYPP_THROW( Exception( str::Str() <<
"Unknown predicate: " << str_r ) );
319 static std::string serializeMode(
Match::Mode mode_r )
326 #define OUTS(M,S) case Match::M: return #S; break
331 OUTS( STRINGSTART, S );
332 OUTS( STRINGEND, E );
333 OUTS( SUBSTRING, B );
345 static Match::Mode deserializeMode(
const std::string & str_r )
349 #define OUTS(M,C) case *#C: return Match::M; break
354 OUTS( STRINGSTART, S );
355 OUTS( STRINGEND, E );
356 OUTS( SUBSTRING, B );
369 inline std::ostream &
operator<<( std::ostream &
str,
const AttrMatchData & obj )
371 str << obj.attr <<
": " << obj.strMatcher;
372 if ( obj.kindPredicate )
373 str <<
" +(" << obj.kindPredicate <<
")";
375 str <<
" +(" << obj.predicateStr <<
")";
380 inline bool operator==(
const AttrMatchData & lhs,
const AttrMatchData & rhs )
382 return ( lhs.attr == rhs.attr
383 && lhs.strMatcher == rhs.strMatcher
384 && lhs.predicateStr == rhs.predicateStr );
388 inline bool operator!=(
const AttrMatchData & lhs,
const AttrMatchData & rhs )
389 {
return !( lhs == rhs ); }
392 inline bool operator<(
const AttrMatchData & lhs,
const AttrMatchData & rhs )
394 if ( lhs.attr != rhs.attr )
395 return ( lhs.attr < rhs.attr );
396 if ( lhs.strMatcher != rhs.strMatcher )
397 return ( lhs.strMatcher < rhs.strMatcher );
398 if ( lhs.predicateStr != rhs.predicateStr )
399 return ( lhs.predicateStr < rhs.predicateStr );
403 typedef std::list<AttrMatchData> AttrMatchList;
463 #define OUTS(A) if ( A != rhs.A ) return A < rhs.A;
466 OUTS( _uncompiledPredicated );
469 OUTS( _status_flags );
489 && _attrs.size() == 1
500 && _kinds == rhs.
_kinds );
513 void compile()
const;
525 friend Impl * rwcowClone<Impl>(
const Impl * rhs );
528 {
return new Impl( *
this ); }
557 _attrMatchList.clear();
580 else if (_attrs.size() == 1)
586 _attrMatchList.push_back( AttrMatchData( _attrs.begin()->first, joinedStrMatcher( joined, _flags ) ) );
593 bool attrvals_empty =
true;
594 for_( ai, _attrs.begin(), _attrs.end() )
596 if ( ai->second.empty() )
598 for_( it, ai->second.begin(), ai->second.end() )
602 attrvals_empty =
false;
606 if ( ! attrvals_empty )
611 bool attrvals_thesame =
true;
612 AttrRawStrMap::const_iterator ai = _attrs.begin();
615 for (; ai != _attrs.end(); ++ai)
619 set1.begin(), set1.end(),
620 ai->second.begin(), ai->second.end(),
621 inserter(result, result.begin()));
624 attrvals_thesame =
false;
633 if (attrvals_empty || attrvals_thesame)
647 StrMatcher matcher( joinedStrMatcher( joined, _flags ) );
648 for_( ai, _attrs.begin(), _attrs.end() )
650 _attrMatchList.push_back( AttrMatchData( ai->first, matcher ) );
660 for_(ai, _attrs.begin(), _attrs.end())
666 _attrMatchList.push_back( AttrMatchData( ai->first, joinedStrMatcher( joined, _flags ) ) );
672 if ( ! _uncompiledPredicated.empty() )
676 for_( it, _uncompiledPredicated.begin(), _uncompiledPredicated.end() )
682 const std::string & mstr( it->strMatcher.searchstring() );
683 if ( ! mstr.empty() )
684 joined.insert( mstr );
687 AttrMatchData nattr( *it );
688 nattr.strMatcher = joinedStrMatcher( joined, _flags );
689 _attrMatchList.push_back( std::move(nattr) );
694 _attrMatchList.push_back( *it );
700 if ( _attrMatchList.empty() )
702 _attrMatchList.push_back( AttrMatchData(
sat::SolvAttr::allAttr, joinedStrMatcher( _strings, _flags ) ) );
706 for_( it, _attrMatchList.begin(), _attrMatchList.end() )
708 it->strMatcher.compile();
720 std::string rxEscape( std::string str_r,
const Match & flags_r )
735 if ( container_r.empty() )
738 if ( container_r.size() == 1 && !_match_word )
739 return StrMatcher( *container_r.begin(), flags_r );
744 Match retflags( flags_r );
750 else if ( _match_word )
755 for ( const::std::string & s : container_r )
757 ret << sep << rxEscape( s, flags_r );
765 else if ( _match_word )
773 std::ostringstream o;
776 if ( _kinds.empty() )
780 for(Kinds::const_iterator it = _kinds.begin();
781 it != _kinds.end(); ++it)
787 if ( _repos.empty() )
791 for(StrContainer::const_iterator it = _repos.begin();
792 it != _repos.end(); ++it)
797 o <<
"version: "<< _op <<
" " << _edition.asString() << endl;
798 o <<
"status: " << ( _status_flags ? ( _status_flags == INSTALLED_ONLY ?
"INSTALLED_ONLY" :
"UNINSTALLED_ONLY" )
801 o <<
"string match flags: " <<
Match(_flags) << endl;
805 for(StrContainer::const_iterator it = _strings.begin();
806 it != _strings.end(); ++it)
810 o <<
"attributes: " << endl;
811 for(AttrRawStrMap::const_iterator ai = _attrs.begin(); ai != _attrs.end(); ++ai)
813 o <<
"* " << ai->first <<
": ";
814 for(StrContainer::const_iterator vi = ai->second.begin();
815 vi != ai->second.end(); ++vi)
820 o <<
"predicated: " << endl;
821 for_( it, _uncompiledPredicated.begin(), _uncompiledPredicated.end() )
823 o <<
"* " << *it << endl;
827 o <<
"last attribute matcher compiled: " << endl;
828 if ( _attrMatchList.empty() )
830 o <<
"not yet compiled" << endl;
834 for_( it, _attrMatchList.begin(), _attrMatchList.end() )
836 o <<
"* " << *it << endl;
859 if (repoalias.empty())
861 WAR <<
"ignoring an empty repository alias" << endl;
910 AttrMatchData attrMatchData(
attr );
912 attrMatchData.strMatcher =
StrMatcher( name, mode );
916 attrMatchData.strMatcher =
StrMatcher( strchr( name.c_str(),
':')+1, mode );
917 attrMatchData.kindPredicate = explicitKind;
920 if ( isDependencyAttribute(
attr ) )
921 attrMatchData.addPredicate( EditionRangePredicate( op,
edition, arch ) );
923 attrMatchData.addPredicate( SolvableRangePredicate( op,
edition, arch ) );
937 if ( isDependencyAttribute(
attr ) )
938 attrMatchData.addPredicate( CapabilityMatchPredicate( cap_r ) );
940 attrMatchData.addPredicate( SolvableRangePredicate( cap.
op(), cap.
ed() ) );
984 return it !=
_pimpl->
_attrs.end() ? it->second : nocontainer;
1137 bool finded_something =
false;
1145 if ((!s.empty()) && s[0]==
'#')
1151 if (s.empty() || pos == s.npos)
1153 if (finded_something)
1163 finded_something =
true;
1165 std::string attrName(
str::trim(std::string(s,0,pos)));
1166 std::string attrValue(
str::trim(std::string(s,pos+1,s.npos)));
1210 WAR <<
"unknown string type " << attrValue << endl;
1214 WAR <<
"forget recover some attribute defined as String type attribute: " << attrValue << endl;
1234 WAR <<
"unknown boolean value " << attrValue << endl;
1239 if( attrValue ==
"all" )
1243 else if( attrValue ==
"installed" )
1247 else if( attrValue ==
"not-installed" )
1253 WAR <<
"Unknown value for install status " << attrValue << endl;
1260 if (attrValue.find_first_of(
"=<>!") == 0)
1262 pos = attrValue.find_last_of(
"=<>");
1263 rel =
Rel(attrValue.substr(0, pos+1));
1264 attrValue =
str::trim(attrValue.substr(pos+1, attrValue.npos));
1283 WAR <<
"empty attribute name" << endl;
1287 std::string s = attrName;
1290 if ( a == SolvAttr::name || isDependencyAttribute( a ) )
1324 if ( attrmatch.attr == SolvAttr::name && attrmatch.strMatcher.flags().mode() ==
Match::OTHER )
1329 std::vector<std::string> words;
1331 if ( words.size() < 4 || words[3].empty() )
1343 if ( attrmatch.kindPredicate )
1346 addKind( attrmatch.kindPredicate );
1350 addAttribute( SolvAttr::name, attrmatch.strMatcher.searchstring() );
1353 std::vector<std::string> words;
1355 if ( ! words.empty() )
1357 if ( words[0] ==
"EditionRange" || words[0] ==
"SolvableRange" )
1369 return finded_something;
1381 str <<
"repo: " << *it << delim ;
1387 << it->idStr() << delim ;
1402 <<
": substring" << delim;
1417 str <<
"case_sensitive: ";
1420 str <<
"on" << delim;
1424 str <<
"off" << delim;
1433 str <<
"install_status: all" << delim;
1436 str <<
"install_status: installed" << delim;
1439 str <<
"install_status: not-installed" << delim;
1451 std::string s = it->first.asString();
1453 for_( it2,it->second.begin(),it->second.end() )
1455 str << s <<
": "<< *it2 << delim;
1461 str <<
"complex: "<< it->serialize() << delim;
1521 if ( base_r ==
end() )
1529 while ( base_r !=
end() )
1544 if ( base_r ==
end() )
1556 return_r.push_back( base );
1559 for ( ++base; base.
inSolvable() == inSolvable; ++base )
1562 return_r.push_back( base );
1570 const AttrMatchData & matchData( *mi );
1572 if ( matchData.strMatcher )
1578 const AttrMatchData::Predicate &
predicate( matchData.predicate );
1582 return_r.push_back( it );
1600 for_( it, query_r->_repos.begin(), query_r->_repos.end() )
1614 _kinds = query_r->_kinds;
1637 if (
_repos.size() == 1 )
1646 if ( matchData.strMatcher )
1709 if ( matchData.kindPredicate )
1711 if ( matchData.kindPredicate != inSolvable.
kind() )
1717 else if ( !globalKindOk )
1720 if ( !matchData.predicate || matchData.predicate( base_r ) )
1729 const AttrMatchData & matchData( *mi );
1731 if ( matchData.kindPredicate )
1733 if ( matchData.kindPredicate != inSolvable.
kind() )
1736 else if ( !globalKindOk )
1740 if ( matchData.strMatcher )
1746 const AttrMatchData::Predicate &
predicate( matchData.predicate );
1788 if ( !
_matcher->advance( base_reference() ) )
1812 if ( ! obj.matchesEmpty() )
1814 for_( it, obj.matchesBegin(), obj.matchesEnd() )
1816 str << endl <<
" " << it->inSolvAttr() <<
"\t" << it->asString();
static const SolvAttr recommends
static Pool instance()
Singleton ctor.
const AttrRawStrMap & attributes() const
Map (map<SolvAttr, StrContainer>) of attribute values added via addAttribute(), addDep in string form...
std::set< ResKind > Kinds
static const StringTypeAttr globAttr
static const SolvAttr allAttr
Value to request searching all Attributes (0).
Rel _op
Operator for edition condition.
A Solvable object within the sat Pool.
void addString(const std::string &value)
Add a global query string.
AttrMatchList _attrMatchList
StrMatcher per attribtue.
represents all atributes in PoolQuery except SolvAtributes, which are used as is (not needed extend a...
bool empty() const
Whether the query is empty.
void setFlags(const Match &flags)
Free function to set libsolv repo search flags.
StatusFilter
Installed status filter setters.
static const SolvAttr conflicts
ResKind kind() const
The Solvables ResKind.
bool requireAll() const ZYPP_DEPRECATED
Base class for Exception.
String matching (STRING|SUBSTRING|GLOB|REGEX).
PoolQuery::StrContainer & _cont
void addAttribute(const sat::SolvAttr &attr, const std::string &value="")
Filter by the value of the specified attr attribute.
void setMatchGlob()
Set to match globs.
static const PoolQueryAttr stringAttr
bool operator<(const SolvableType< Derived > &lhs, const Solvable &rhs)
This is an overloaded member function, provided for convenience. It differs from the above function o...
int get() const
Return the integer representation.
static const Match FILES
LookupAttr: match full path when matching in filelists, otherwise just the basenames.
Base class for creating IdString based types.
constPtrType getPtr() const
StrContainer _strings
Raw search strings.
Match::Mode matchMode() const
Returns string matching mode as enum.
static const StringTypeAttr regexAttr
std::ostream & dumpRange(std::ostream &str, TIterator begin, TIterator end, const std::string &intro="{", const std::string &pfx="\n ", const std::string &sep="\n ", const std::string &sfx="\n", const std::string &extro="}")
Print range defined by iterators (multiline style).
bool isKind(const ResKind &kind_r) const
Test whether a Solvable is of a certain ResKind.
iterator begin() const
Iterator to the begin of query results.
static const PoolQueryAttr stringTypeAttr
static const PoolQueryAttr complexAttr
#define arrayBegin(A)
Simple C-array iterator.
void addDependency(const sat::SolvAttr &attr, const std::string &name, const Rel &op, const Edition &edition)
Query "name|global op edition".
void setCaseSensitive(bool value=true)
Turn case sentitivity on or off (unsets or sets SEARCH_NOCASE flag).
void stayInThisSolvable()
Stop after all matches in the current Solvable are processed.
PoolQuery iterator as returned by PoolQuery::begin.
bool operator<(const PoolQuery &b) const
Mode
Mode flags (mutual exclusive).
void execute(ProcessResolvable fnc)
Executes the query with the current settings.
bool operator()(const std::string &str)
const StrContainer & strings() const
Search strings added via addString()
Edition represents [epoch:]version[-release]
Solvable inSolvable() const
The current Solvable.
void setMatchRegex()
Set to use the query strings as regexes.
bool strToTrue(const C_Str &str)
Parsing boolean from string.
void setModeRegex()
Set the mode REGEX.
void matchDetail(const base_iterator &base_r, std::vector< base_iterator > &return_r) const
Provide all matching attributes within this solvable.
const Matches & matches() const
@ REGEX
Regular Expression.
@ SUBSTRING
Match substring.
bool isModeRegex() const
Whether this has mode REGEX.
#define ZYPP_THROW(EXCPT)
Drops a logline and throws the Exception.
void nextSkipSolvable()
On the next call to operator++ advance to the next Solvable.
static const PoolQueryAttr requireAllAttr
AttrMatchList _attrMatchList
StrMatcher per attribtue.
int _status_flags
Installed status filter flags.
static const PoolQueryAttr editionAttr
Edition::MatchRange _range
bool empty() const
Test for an empty Arch (this is Arch_epmty, not Arch_noarch ).
void compile() const
Compile the regex.
void addKind(const ResKind &kind)
Filter by selectable kind.
PoolQueryAttr(const char *cstr_r)
static const CapMatch yes
size_type size() const
Number of solvables in the query result.
bool isModeGlob() const
Whether this has mode GLOB.
for_use_in_switch _op
The operator.
void turn(const Match &rhs, bool onoff)
Depending on the value of onoff, set or unset flags.
std::string getline(std::istream &str)
Read one line from stream.
static const PoolQueryAttr kindAttr
bool isModeString() const
Whether this has mode STRING.
PoolQueryMatcher(const shared_ptr< const PoolQuery::Impl > &query_r)
Ctor stores the PoolQuery settings.
AttrRawStrMap _attrs
Raw attributes.
const Kinds & kinds() const
StrContainer _repos
Repos to search.
void nextSkipRepo()
On the next call to operator++ advance to the next Repository.
std::set< ResKind > _kinds
Resolvable kinds to include.
bool filesMatchFullPath() const
Whether searching in filelists looks at the full path or just at the basenames.
bool isModeSubstring() const
Whether this has mode SUBSTRING.
void setRequireAll(bool require_all=true) ZYPP_DEPRECATED
std::string asString() const
Conversion to std::string
void setStatusFilterFlags(StatusFilter flags)
Set status filter directly.
static const SolvAttr suggests
Access to the sat-pools string space.
void addRepo(const std::string &repoalias)
Filter by repo.
const StrContainer & attribute(const sat::SolvAttr &attr) const
MyInserter(PoolQuery::StrContainer &cont)
bool caseSensitive() const
returns true if search is case sensitive
void serialize(std::ostream &str, char delim='\n') const
Writes a machine-readable string representation of the query to stream.
std::ostream & dumpOn(std::ostream &str, const PoolQueryIterator &obj)
std::string asUserHistory() const
A single (multiline) string composed of asUserString and historyAsString.
bool operator==(const PoolQuery &b) const
static const ResKind nokind
Value representing nokind ("")
std::vector< sat::LookupAttr::iterator > Matches
DefaultIntegral< bool, false > _neverMatchRepo
Match _flags
Sat solver search flags.
Edition edition() const
The edition (version-release).
static const PoolQueryAttr installStatusAttr
static const SolvAttr enhances
std::set< std::string > StrContainer
Edition _edition
Edition condition operand.
static const SolvAttr name
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).
Repository inRepo() const
The current Repository.
static const StringTypeAttr exactAttr
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.
const StrContainer & repos() const
void setMatchWord()
Set substring to match words.
void setModeSubstring()
Set the mode SUBSTRING.
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.
std::ostream & operator<<(std::ostream &str, const FileConflicts &obj)
unsigned splitEscaped(const C_Str &line_r, TOutputIterator result_r, const C_Str &sepchars_r=" \t", bool withEmpty=false)
Split line_r into words with respect to escape delimeters.
const_iterator end() const
An iterator pointing to the end of the query result.
void setInstalledOnly()
Return only @System repo packages.
for_use_in_switch inSwitch() const
Enumarator provided for use in switch statement.
Easy-to use interface to the ZYPP dependency resolver.
const_iterator begin() const
Query result accessers.
std::string rxEscapeGlob(std::string str_r)
Escape GLOB str_r for use in a regex (not anchored by "^" or "$").
StringTypeAttr(const char *cstr_r)
const Rel editionRel() const
static const PoolQueryAttr caseSensitiveAttr
Convenient building of std::string via std::ostringstream Basically a std::ostringstream autoconverti...
std::string rxEscapeStr(std::string str_r)
Escape plain STRING str_r for use in a regex (not anchored by "^" or "$").
bool deserialize(const std::string &str_r, DownloadMode &result_r)
bool isAMatch(base_iterator &base_r) const
Check whether we are on a match.
bool recover(std::istream &str, char delim='\n')
Reads from stream query.
static const SolvAttr obsoletes
bool operator()(const std::string &str)
std::string asString() const
StrMatcher joinedStrMatcher(const StrContainer &container_r, const Match &flags_r) const
Join patterns in container_r according to flags_r into a single StrMatcher.
void setRepo(Repository repo_r, Location=SOLV_ATTR)
Set search in one Repository.
void setModeGlob()
Set the mode GLOB.
std::map< sat::SolvAttr, StrContainer > AttrRawStrMap
std::set< AttrMatchData > _uncompiledPredicated
Uncompiled attributes with predicate.
void setEdition(const Edition &edition, const Rel &op=Rel::EQ)
Set version condition.
Range< Edition, Match > MatchRange
Edition Range based on Match.
std::string asString() const
Return a human-readable description of the query.
bool operator<(const PoolQuery::Impl &rhs) const
shared_ptr< PoolQueryMatcher > _matcher
std::string asString(const DefaultIntegral< Tp, TInitial > &obj)
bool strToFalse(const C_Str &str)
Return false if str is 0, false, no, off, never.
static const Edition noedition
Value representing noedition ("") This is in fact a valid Edition.
Kinds _kinds
Kinds to search.
void setMatchSubstring()
Set to substring (the default).
bool isSystemRepo() const
Return whether this is the system repository.
StringTypeAttr(const std::string &str_r)
std::ostream & operator<<(std::ostream &str, const Exception &obj)
bool empty() const
Whether the result is empty.
#define for_(IT, BEG, END)
Convenient for-loops using iterator.
std::string asString() const
String representation.
Store PoolQuery settings and assist PoolQueryIterator.
static const SolvAttr requires
bool operator!=(const PoolQuery::Impl &rhs) const
static const StringTypeAttr wordAttr
PoolQueryAttr(const std::string &str_r)
static const SolvAttr provides
RW_pointer< Impl > _pimpl
Pointer to implementation.
void setMatchExact()
Set to match exact string instead of substring.
iterator end() const
Iterator behind the end of query results.
base_iterator startNewQyery() const
Initialize a new base query.
Impl * clone() const
clone for RWCOW_pointer
static const PoolQueryAttr repoAttr
const Arch Arch_empty(IdString::Empty)
bool matchSubstring() const
StatusFilter statusFilterFlags() const
bool operator==(const PoolQuery::Impl &rhs) const
bool compareByRel(Rel op, const Tp &lhs, const Tp &rhs, TCompare compare)
Comparison of two elements using relational operator op.
Match flags() const
Free function to get libsolv repo search flags.
void setModeString()
Set the mode STRING.
static const Match NOCASE
If set, match case insensitive.
void setAttr(SolvAttr attr_r)
Set the SolvAttr to search.
bool advance(base_iterator &base_r) const
String related utilities and Regular expression matching.
function< bool(const sat::Solvable &)> ProcessResolvable
shared_ptr< Matches > _matches
bool test(const Match &rhs) const
Test whether all of the rhs bits are set (same mode if rhs has one).
StatusFilter _status_flags
Sat solver status flags.
sat::LookupAttr::iterator base_iterator
void setFilesMatchFullPath(bool value=true)
If set (default), look at the full path when searching in filelists.
static const PoolQueryAttr noAttr
String matching option flags as used e.g. by StrMatcher.
std::ostream & dumpOn(std::ostream &str, const Capability &obj)
std::string trim(const std::string &s, const Trim trim_r)
std::set< Repository > _repos
Repositories include in the search.
Repository reposFind(const std::string &alias_r) const
Find a Repository named alias_r.
const Edition edition() const
bool overlaps(const Range< Tp, TCompare > &lhs, const Range< Tp, TCompare > &rhs)
bool operator==(const Map &lhs, const Map &rhs)
void setStrMatcher(const StrMatcher &matcher_r)
Set the pattern to match.
bool operator!=(const SolvableType< Derived > &lhs, const Solvable &rhs)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Resolvable kinds. A lowercased string and used as identification. Comparison against string values is...
const base_iterator & end() const
Lightweight attribute value lookup.
static const SolvAttr supplements
static const StringTypeAttr noAttr
static ResKind explicitBuiltin(const char *str_r)
Return the builtin kind if str_r explicitly prefixed.
Helper providing more detailed information about a Capability.
static const StringTypeAttr substringAttr
void setUninstalledOnly()
Return only packages from repos other than @System.