libzypp: zypp/sat/Solvable.cc Source File

libzypp 17.25.10

Solvable.cc
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | ____ _ __ __ ___ |
3 | |__ / \ / / . \ . \ |
4 | / / \ V /| _/ _/ |
5 | / /__ | | | | | | |
6 | /_____||_| |_| |_| |
7 | |
8 \---------------------------------------------------------------------*/
12 #include <iostream>
13
14 #include <zypp/base/Logger.h>
15 #include <zypp/base/Gettext.h>
16 #include <zypp/base/Exception.h>
17 #include <zypp/base/Functional.h>
18 #include <zypp/base/Collector.h>
19 #include <zypp/base/Xml.h>
20
21 #include <zypp/sat/detail/PoolImpl.h>
22 #include <zypp/sat/Solvable.h>
23 #include <zypp/sat/Pool.h>
24 #include <zypp/sat/LookupAttr.h>
25
26 #include <zypp/Repository.h>
27 #include <zypp/OnMediaLocation.h>
28 #include <zypp/ZConfig.h>
29
30 #include <zypp/ui/Selectable.h>
31
32 using std::endl;
33
35 namespace zypp
36 {
38 namespace sat
39 {
41 namespace
42 {
43 void _doSplit( IdString & _ident, ResKind & _kind, IdString & _name )
44 {
45 if ( ! _ident )
46 return;
47
48 ResKind explicitKind = ResKind::explicitBuiltin( _ident.c_str() );
49 // NOTE: kind package and srcpackage do not have namespaced ident!
50 if ( ! explicitKind )
51 {
52 _name = _ident;
53 // No kind defaults to package
54 if ( !_kind )
55 _kind = ResKind::package;
56 else if ( ! ( _kind == ResKind::package || _kind == ResKind::srcpackage ) )
57 _ident = IdString( str::form( "%s:%s", _kind.c_str(), _ident.c_str() ) );
58 }
59 else
60 {
61 // strip kind spec from name
62 _name = IdString( ::strchr( _ident.c_str(), ':' )+1 );
63 _kind = explicitKind;
64 if ( _kind == ResKind::package || _kind == ResKind::srcpackage )
65 _ident = _name;
66 }
67 return;
68 }
69 } // namespace
71
72 Solvable::SplitIdent::SplitIdent( IdString ident_r )
73 : _ident( ident_r )
74 { _doSplit( _ident, _kind, _name ); }
75
76 Solvable::SplitIdent::SplitIdent( const char * ident_r )
77 : _ident( ident_r )
78 { _doSplit( _ident, _kind, _name ); }
79
80 Solvable::SplitIdent::SplitIdent( const std::string & ident_r )
81 : _ident( ident_r )
82 { _doSplit( _ident, _kind, _name ); }
83
84 Solvable::SplitIdent::SplitIdent( ResKind kind_r, IdString name_r )
85 : _ident( name_r )
86 , _kind( kind_r )
87 { _doSplit( _ident, _kind, _name ); }
88
89 Solvable::SplitIdent::SplitIdent( ResKind kind_r, const C_Str & name_r )
90 : _ident( name_r )
91 , _kind( kind_r )
92 { _doSplit( _ident, _kind, _name ); }
93
95 // class Solvable
97
98 const Solvable Solvable::noSolvable;
99
100 const IdString Solvable::retractedToken { "retracted-patch-package()" };
101 const IdString Solvable::ptfToken { "ptf()" };
102
104
105 detail::CSolvable * Solvable::get() const
106 { return myPool().getSolvable( _id ); }
107
108 #define NO_SOLVABLE_RETURN( VAL ) \
109 detail::CSolvable * _solvable( get() ); \
110 if ( ! _solvable ) return VAL
111
112 Solvable Solvable::nextInPool() const
113 { return Solvable( myPool().getNextId( _id ) ); }
114
115 Solvable Solvable::nextInRepo() const
116 {
117 NO_SOLVABLE_RETURN( noSolvable );
118 for ( detail::SolvableIdType next = _id+1; next < unsigned(_solvable->repo->end); ++next )
119 {
120 detail::CSolvable * nextS( myPool().getSolvable( next ) );
121 if ( nextS && nextS->repo == _solvable->repo )
122 {
123 return Solvable( next );
124 }
125 }
126 return noSolvable;
127 }
128
129 std::string Solvable::lookupStrAttribute( const SolvAttr & attr ) const
130 {
131 NO_SOLVABLE_RETURN( std::string() );
132 const char * s = ::solvable_lookup_str( _solvable, attr.id() );
133 return s ? s : std::string();
134 }
135
136 std::string Solvable::lookupStrAttribute( const SolvAttr & attr, const Locale & lang_r ) const
137 {
138 NO_SOLVABLE_RETURN( std::string() );
139 const char * s = 0;
140 if ( !lang_r )
141 {
142 s = ::solvable_lookup_str_poollang( _solvable, attr.id() );
143 }
144 else
145 {
146 for ( Locale l( lang_r ); l; l = l.fallback() )
147 {
148 if ( (s = ::solvable_lookup_str_lang( _solvable, attr.id(), l.c_str(), 0 )) )
149 return s;
150 }
151 // here: no matching locale, so use default
152 s = ::solvable_lookup_str_lang( _solvable, attr.id(), 0, 0 );
153 }
154 return s ? s : std::string();
155 }
156
157 unsigned long long Solvable::lookupNumAttribute( const SolvAttr & attr ) const
158 {
159 NO_SOLVABLE_RETURN( 0 );
160 return ::solvable_lookup_num( _solvable, attr.id(), 0 );
161 }
162
163 unsigned long long Solvable::lookupNumAttribute( const SolvAttr & attr, unsigned long long notfound_r ) const
164 {
165 NO_SOLVABLE_RETURN( notfound_r );
166 return ::solvable_lookup_num( _solvable, attr.id(), notfound_r );
167 }
168
169 bool Solvable::lookupBoolAttribute( const SolvAttr & attr ) const
170 {
171 NO_SOLVABLE_RETURN( false );
172 return ::solvable_lookup_bool( _solvable, attr.id() );
173 }
174
175 detail::IdType Solvable::lookupIdAttribute( const SolvAttr & attr ) const
176 {
177 NO_SOLVABLE_RETURN( detail::noId );
178 return ::solvable_lookup_id( _solvable, attr.id() );
179 }
180
181 CheckSum Solvable::lookupCheckSumAttribute( const SolvAttr & attr ) const
182 {
183 NO_SOLVABLE_RETURN( CheckSum() );
184 detail::IdType chksumtype = 0;
185 const char * s = ::solvable_lookup_checksum( _solvable, attr.id(), &chksumtype );
186 if ( ! s )
187 return CheckSum();
188 switch ( chksumtype )
189 {
190 case REPOKEY_TYPE_MD5: return CheckSum::md5( s );
191 case REPOKEY_TYPE_SHA1: return CheckSum::sha1( s );
192 case REPOKEY_TYPE_SHA224: return CheckSum::sha224( s );
193 case REPOKEY_TYPE_SHA256: return CheckSum::sha256( s );
194 case REPOKEY_TYPE_SHA384: return CheckSum::sha384( s );
195 case REPOKEY_TYPE_SHA512: return CheckSum::sha512( s );
196 }
197 return CheckSum( std::string(), s ); // try to autodetect
198 }
199
201 namespace
202 {
203 inline Pathname lookupDatadirIn( Repository repor_r )
204 {
205 static const SolvAttr susetagsDatadir( "susetags:datadir" );
206 Pathname ret;
207 // First look for repo attribute "susetags:datadir". If not found,
208 // look into the solvables as Code11 libsolv placed it there.
209 LookupRepoAttr datadir( susetagsDatadir, repor_r );
210 if ( ! datadir.empty() )
211 ret = datadir.begin().asString();
212 else
213 {
214 LookupAttr datadir( susetagsDatadir, repor_r );
215 if ( ! datadir.empty() )
216 ret = datadir.begin().asString();
217 }
218 return ret;
219 }
220 } // namespace
222
223 OnMediaLocation Solvable::lookupLocation() const
224 {
225 NO_SOLVABLE_RETURN( OnMediaLocation() );
226 // medianumber and path
227 unsigned medianr;
228 const char * file = ::solvable_lookup_location( _solvable, &medianr );
229 if ( ! file )
230 return OnMediaLocation();
231 if ( ! medianr )
232 medianr = 1;
233
234 OnMediaLocation ret;
235
236 Pathname path;
237 switch ( repository().info().type().toEnum() )
238 {
239 case repo::RepoType::NONE_e:
240 {
241 path = lookupDatadirIn( repository() );
242 if ( ! path.empty() )
243 repository().info().setProbedType( repo::RepoType::YAST2_e );
244 }
245 break;
246
247 case repo::RepoType::YAST2_e:
248 {
249 path = lookupDatadirIn( repository() );
250 if ( path.empty() )
251 path = "suse";
252 }
253 break;
254
255 default:
256 break;
257 }
258 ret.setLocation ( path/file, medianr );
259 ret.setDownloadSize( ByteCount( lookupNumAttribute( SolvAttr::downloadsize ) ) );
260 ret.setChecksum ( lookupCheckSumAttribute( SolvAttr::checksum ) );
261 // Not needed/available for solvables?
262 //ret.setOpenSize ( ByteCount( lookupNumAttribute( SolvAttr::opensize ) ) );
263 //ret.setOpenChecksum( lookupCheckSumAttribute( SolvAttr::openchecksum ) );
264 return ret;
265 }
266
267
268 IdString Solvable::ident() const
269 {
270 NO_SOLVABLE_RETURN( IdString() );
271 return IdString( _solvable->name );
272 }
273
274 ResKind Solvable::kind() const
275 {
276 NO_SOLVABLE_RETURN( ResKind() );
277 // detect srcpackages by 'arch'
278 switch ( _solvable->arch )
279 {
280 case ARCH_SRC:
281 case ARCH_NOSRC:
282 return ResKind::srcpackage;
283 break;
284 }
285
286 // either explicitly prefixed...
287 const char * ident = IdString( _solvable->name ).c_str();
288 ResKind knownKind( ResKind::explicitBuiltin( ident ) );
289 if ( knownKind )
290 return knownKind;
291
292 // ...or no ':' in package names (hopefully)...
293 const char * sep = ::strchr( ident, ':' );
294 if ( ! sep )
295 return ResKind::package;
296
297 // ...or something unknown.
298 return ResKind( std::string( ident, sep-ident ) );
299 }
300
301 bool Solvable::isKind( const ResKind & kind_r ) const
302 {
303 NO_SOLVABLE_RETURN( false );
304
305 // detect srcpackages by 'arch'
306 switch ( _solvable->arch )
307 {
308 case ARCH_SRC:
309 case ARCH_NOSRC:
310 return( kind_r == ResKind::srcpackage );
311 break;
312 }
313
314 // no ':' in package names (hopefully)
315 const char * ident = IdString( _solvable->name ).c_str();
316 if ( kind_r == ResKind::package )
317 {
318 return( ::strchr( ident, ':' ) == 0 );
319 }
320
321 // look for a 'kind:' prefix
322 const char * kind = kind_r.c_str();
323 unsigned ksize = ::strlen( kind );
324 return( ::strncmp( ident, kind, ksize ) == 0
325 && ident[ksize] == ':' );
326 }
327
328 std::string Solvable::name() const
329 {
330 NO_SOLVABLE_RETURN( std::string() );
331 const char * ident = IdString( _solvable->name ).c_str();
332 const char * sep = ::strchr( ident, ':' );
333 return( sep ? sep+1 : ident );
334 }
335
336 Edition Solvable::edition() const
337 {
338 NO_SOLVABLE_RETURN( Edition() );
339 return Edition( _solvable->evr );
340 }
341
342 Arch Solvable::arch() const
343 {
344 NO_SOLVABLE_RETURN( Arch_noarch ); //ArchId() );
345 switch ( _solvable->arch )
346 {
347 case ARCH_SRC:
348 case ARCH_NOSRC:
349 return Arch_noarch; //ArchId( ARCH_NOARCH );
350 break;
351 }
352 return Arch( IdString(_solvable->arch).asString() );
353 //return ArchId( _solvable->arch );
354 }
355
356 IdString Solvable::vendor() const
357 {
358 NO_SOLVABLE_RETURN( IdString() );
359 return IdString( _solvable->vendor );
360 }
361
362 Repository Solvable::repository() const
363 {
364 NO_SOLVABLE_RETURN( Repository::noRepository );
365 return Repository( _solvable->repo );
366 }
367
368 RepoInfo Solvable::repoInfo() const
369 { return repository().info(); }
370
371
372 bool Solvable::isSystem() const
373 {
374 NO_SOLVABLE_RETURN( _id == detail::systemSolvableId );
375 return myPool().isSystemRepo( _solvable->repo );
376 }
377
378 bool Solvable::onSystemByUser() const
379 {
380 return isSystem() && myPool().isOnSystemByUser( ident() );
381 }
382
383 bool Solvable::onSystemByAuto() const
384 {
385 return isSystem() && myPool().isOnSystemByAuto( ident() );
386 }
387
388 bool Solvable::identIsAutoInstalled( const IdString & ident_r )
389 {
390 return myPool().isOnSystemByAuto( ident_r );
391 }
392
393 bool Solvable::isNeedreboot() const
394 {
395 NO_SOLVABLE_RETURN( false );
396 return myPool().isNeedreboot( *this );
397 }
398
399 bool Solvable::isRetracted() const
400 {
401 NO_SOLVABLE_RETURN( false );
402 if ( isKind<Package>() )
403 return provides().contains( Capability( retractedToken.id() ) );
404 if ( isKind<Patch>() )
405 return lookupStrAttribute( SolvAttr::updateStatus ) == "retracted";
406 return false;
407 }
408
409 bool Solvable::isPtf() const
410 {
411 NO_SOLVABLE_RETURN( false );
412 return provides().contains( Capability( ptfToken.id() ) );
413 }
414
415 bool Solvable::multiversionInstall() const
416 {
417 NO_SOLVABLE_RETURN( false );
418 return myPool().isMultiversion( *this );
419 }
420
421 Date Solvable::buildtime() const
422 {
423 NO_SOLVABLE_RETURN( Date() );
424 return Date( lookupNumAttribute( SolvAttr::buildtime ) );
425 }
426
427 Date Solvable::installtime() const
428 {
429 NO_SOLVABLE_RETURN( Date() );
430 return Date( lookupNumAttribute( SolvAttr::installtime ) );
431 }
432
433 std::string Solvable::asString() const
434 {
435 NO_SOLVABLE_RETURN( (_id == detail::systemSolvableId ? "systemSolvable" : "noSolvable") );
436 return str::form( "%s-%s.%s",
437 IdString( _solvable->name ).c_str(),
438 IdString( _solvable->evr ).c_str(),
439 IdString( _solvable->arch ).c_str() );
440 }
441
442 std::string Solvable::asUserString() const\
443 {
444 NO_SOLVABLE_RETURN( (_id == detail::systemSolvableId ? "systemSolvable" : "noSolvable") );
445 return str::form( "%s-%s.%s (%s)",
446 IdString( _solvable->name ).c_str(),
447 IdString( _solvable->evr ).c_str(),
448 IdString( _solvable->arch ).c_str(),
449 repository().asUserString().c_str() );
450 }
451
452 bool Solvable::identical( const Solvable & rhs ) const
453 {
454 NO_SOLVABLE_RETURN( ! rhs.get() );
455 detail::CSolvable * rhssolvable( rhs.get() );
456 return rhssolvable && ( _solvable == rhssolvable || ::solvable_identical( _solvable, rhssolvable ) );
457 }
458
460 namespace
461 {
462 inline Capabilities _getCapabilities( detail::IdType * idarraydata_r, ::Offset offs_r )
463 {
464 return offs_r ? Capabilities( idarraydata_r + offs_r ) : Capabilities();
465 }
466 } // namespace
468
469 Capabilities Solvable::provides() const
470 {
471 NO_SOLVABLE_RETURN( Capabilities() );
472 return _getCapabilities( _solvable->repo->idarraydata, _solvable->provides );
473 }
474 Capabilities Solvable::requires() const
475 {
476 NO_SOLVABLE_RETURN( Capabilities() );
477 return _getCapabilities( _solvable->repo->idarraydata, _solvable->requires );
478 }
479 Capabilities Solvable::conflicts() const
480 {
481 NO_SOLVABLE_RETURN( Capabilities() );
482 return _getCapabilities( _solvable->repo->idarraydata, _solvable->conflicts );
483 }
484 Capabilities Solvable::obsoletes() const
485 {
486 NO_SOLVABLE_RETURN( Capabilities() );
487 return _getCapabilities( _solvable->repo->idarraydata, _solvable->obsoletes );
488 }
489 Capabilities Solvable::recommends() const
490 {
491 NO_SOLVABLE_RETURN( Capabilities() );
492 return _getCapabilities( _solvable->repo->idarraydata, _solvable->recommends );
493 }
494 Capabilities Solvable::suggests() const
495 {
496 NO_SOLVABLE_RETURN( Capabilities() );
497 return _getCapabilities( _solvable->repo->idarraydata, _solvable->suggests );
498 }
499 Capabilities Solvable::enhances() const
500 {
501 NO_SOLVABLE_RETURN( Capabilities() );
502 return _getCapabilities( _solvable->repo->idarraydata, _solvable->enhances );
503 }
504 Capabilities Solvable::supplements() const
505 {
506 NO_SOLVABLE_RETURN( Capabilities() );
507 return _getCapabilities( _solvable->repo->idarraydata, _solvable->supplements );
508 }
509 Capabilities Solvable::prerequires() const
510 {
511 NO_SOLVABLE_RETURN( Capabilities() );
512 // prerequires are a subset of requires
513 ::Offset offs = _solvable->requires;
514 return offs ? Capabilities( _solvable->repo->idarraydata + offs, detail::solvablePrereqMarker )
515 : Capabilities();
516 }
517
518 CapabilitySet Solvable::providesNamespace( const std::string & namespace_r ) const
519 {
520 NO_SOLVABLE_RETURN( CapabilitySet() );
521 CapabilitySet ret;
522 Capabilities caps( provides() );
523 for_( it, caps.begin(), caps.end() )
524 {
525 CapDetail caprep( it->detail() );
526 if ( str::hasPrefix( caprep.name().c_str(), namespace_r ) && *(caprep.name().c_str()+namespace_r.size()) == '(' )
527 ret.insert( *it );
528 }
529 return ret;
530 }
531
532 CapabilitySet Solvable::valuesOfNamespace( const std::string & namespace_r ) const
533 {
534 NO_SOLVABLE_RETURN( CapabilitySet() );
535 CapabilitySet ret;
536 Capabilities caps( provides() );
537 for_( it, caps.begin(), caps.end() )
538 {
539 CapDetail caprep( it->detail() );
540 if ( str::hasPrefix( caprep.name().c_str(), namespace_r ) && *(caprep.name().c_str()+namespace_r.size()) == '(' )
541 {
542 std::string value( caprep.name().c_str()+namespace_r.size()+1 );
543 value[value.size()-1] = '\0'; // erase the trailing ')'
544 ret.insert( Capability( value, caprep.op(), caprep.ed() ) );
545 }
546 }
547 return ret;
548 }
549
550 std::pair<bool, CapabilitySet> Solvable::matchesSolvable(const SolvAttr &attr, const Solvable &solv) const
551 {
552 sat::Queue capQueue;
553 int res = solvable_matchessolvable( get(), attr.id(), static_cast<Id>( solv.id() ), capQueue, 0 );
554
555 CapabilitySet caps;
556 if ( capQueue.size() )
557 std::for_each( capQueue.begin(), capQueue.end(), [ &caps ]( auto cap ){ caps.insert( Capability(cap) );});
558
559 return std::make_pair( res == 1, std::move(caps) );
560 }
561
563 namespace
564 {
569 int invokeOnEachSupportedLocale( Capability cap_r, function<bool (const Locale &)> fnc_r )
570 {
571 CapDetail detail( cap_r );
572 if ( detail.kind() == CapDetail::EXPRESSION )
573 {
574 switch ( detail.capRel() )
575 {
576 case CapDetail::CAP_AND:
577 case CapDetail::CAP_OR:
578 // expand
579 {
580 int res = invokeOnEachSupportedLocale( detail.lhs(), fnc_r );
581 if ( res < 0 )
582 return res; // negative on abort.
583 int res2 = invokeOnEachSupportedLocale( detail.rhs(), fnc_r );
584 if ( res2 < 0 )
585 return -res + res2; // negative on abort.
586 return res + res2;
587 }
588 break;
589
590 case CapDetail::CAP_NAMESPACE:
591 if ( detail.lhs().id() == NAMESPACE_LANGUAGE )
592 {
593 return ( !fnc_r || fnc_r( Locale( IdString(detail.rhs().id()) ) ) ) ? 1 : -1; // negative on abort.
594 }
595 break;
596
597 case CapDetail::REL_NONE:
598 case CapDetail::CAP_WITH:
599 case CapDetail::CAP_ARCH:
600 break; // unwanted
601 }
602 }
603 return 0;
604 }
605
610 inline int invokeOnEachSupportedLocale( Capabilities cap_r, function<bool (Locale)> fnc_r )
611 {
612 int cnt = 0;
613 for_( cit, cap_r.begin(), cap_r.end() )
614 {
615 int res = invokeOnEachSupportedLocale( *cit, fnc_r );
616 if ( res < 0 )
617 return -cnt + res; // negative on abort.
618 cnt += res;
619 }
620 return cnt;
621 }
623
624 // Functor returning false if a Locale is in the set.
625 struct NoMatchIn
626 {
627 NoMatchIn( const LocaleSet & locales_r ) : _locales( locales_r ) {}
628
629 bool operator()( const Locale & locale_r ) const
630 {
631 return _locales.find( locale_r ) == _locales.end();
632 }
633
634 const LocaleSet & _locales;
635 };
636 } // namespace
638
639 bool Solvable::supportsLocales() const
640 {
641 // false_c stops on 1st Locale.
642 return invokeOnEachSupportedLocale( supplements(), functor::false_c() ) < 0;
643 }
644
645 bool Solvable::supportsLocale( const Locale & locale_r ) const
646 {
647 // not_equal_to stops on == Locale.
648 return invokeOnEachSupportedLocale( supplements(), bind( std::not_equal_to<Locale>(), locale_r, _1 ) ) < 0;
649 }
650
651 bool Solvable::supportsLocale( const LocaleSet & locales_r ) const
652 {
653 if ( locales_r.empty() )
654 return false;
655 // NoMatchIn stops if Locale is included.
656 return invokeOnEachSupportedLocale( supplements(), NoMatchIn(locales_r) ) < 0;
657 }
658
659 bool Solvable::supportsRequestedLocales() const
660 { return supportsLocale( myPool().getRequestedLocales() ); }
661
662 LocaleSet Solvable::getSupportedLocales() const
663 {
664 LocaleSet ret;
665 invokeOnEachSupportedLocale( supplements(), functor::collector( std::inserter( ret, ret.begin() ) ) );
666 return ret;
667 }
668
669 CpeId Solvable::cpeId() const
670 {
671 NO_SOLVABLE_RETURN( CpeId() );
672 return CpeId( lookupStrAttribute( SolvAttr::cpeid ), CpeId::noThrow );
673 }
674
675 unsigned Solvable::mediaNr() const
676 {
677 NO_SOLVABLE_RETURN( 0U );
678 // medianumber and path
679 unsigned medianr = 0U;
680 const char * file = ::solvable_lookup_location( _solvable, &medianr );
681 if ( ! file )
682 medianr = 0U;
683 else if ( ! medianr )
684 medianr = 1U;
685 return medianr;
686 }
687
688 ByteCount Solvable::installSize() const
689 {
690 NO_SOLVABLE_RETURN( ByteCount() );
691 return ByteCount( lookupNumAttribute( SolvAttr::installsize ) );
692 }
693
694 ByteCount Solvable::downloadSize() const
695 {
696 NO_SOLVABLE_RETURN( ByteCount() );
697 return ByteCount( lookupNumAttribute( SolvAttr::downloadsize ) );
698 }
699
700 std::string Solvable::distribution() const
701 {
702 NO_SOLVABLE_RETURN( std::string() );
703 return lookupStrAttribute( SolvAttr::distribution );
704 }
705
706 std::string Solvable::summary( const Locale & lang_r ) const
707 {
708 NO_SOLVABLE_RETURN( std::string() );
709 return lookupStrAttribute( SolvAttr::summary, lang_r );
710 }
711
712 std::string Solvable::description( const Locale & lang_r ) const
713 {
714 NO_SOLVABLE_RETURN( std::string() );
715 return lookupStrAttribute( SolvAttr::description, lang_r );
716 }
717
718 std::string Solvable::insnotify( const Locale & lang_r ) const
719 {
720 NO_SOLVABLE_RETURN( std::string() );
721 return lookupStrAttribute( SolvAttr::insnotify, lang_r );
722 }
723
724 std::string Solvable::delnotify( const Locale & lang_r ) const
725 {
726 NO_SOLVABLE_RETURN( std::string() );
727 return lookupStrAttribute( SolvAttr::delnotify, lang_r );
728 }
729
730 std::string Solvable::licenseToConfirm( const Locale & lang_r ) const
731 {
732 NO_SOLVABLE_RETURN( std::string() );
733 std::string ret = lookupStrAttribute( SolvAttr::eula, lang_r );
734 if ( ret.empty() && isKind<Product>() )
735 {
736 const RepoInfo & ri( repoInfo() );
737 std::string riname( name() ); // "license-"+name with fallback "license"
738 if ( ! ri.hasLicense( riname ) )
739 riname.clear();
740
741 if ( ri.needToAcceptLicense( riname ) || ! ui::Selectable::get( *this )->hasInstalledObj() )
742 ret = ri.getLicense( riname, lang_r ); // bnc#908976: suppress informal license upon update
743 }
744 return ret;
745 }
746
747 bool Solvable::needToAcceptLicense() const
748 {
749 NO_SOLVABLE_RETURN( false );
750 if ( isKind<Product>() )
751 {
752 const RepoInfo & ri( repoInfo() );
753 std::string riname( name() ); // "license-"+name with fallback "license"
754 if ( ! ri.hasLicense( riname ) )
755 riname.clear();
756
757 return ri.needToAcceptLicense( riname );
758 }
759 return true;
760 }
761
762
763 std::ostream & operator<<( std::ostream & str, const Solvable & obj )
764 {
765 if ( ! obj )
766 return str << (obj.isSystem() ? "systemSolvable" : "noSolvable" );
767
768 return str << "(" << obj.id() << ")"
769 << ( obj.isKind( ResKind::srcpackage ) ? "srcpackage:" : "" ) << obj.ident()
770 << '-' << obj.edition() << '.' << obj.arch() << "("
771 << obj.repository().alias() << ")";
772 }
773
774 std::ostream & dumpOn( std::ostream & str, const Solvable & obj )
775 {
776 str << obj;
777 if ( obj )
778 {
779 #define OUTS(X) if ( ! obj[Dep::X].empty() ) str << endl << " " #X " " << obj[Dep::X]
780 OUTS(PROVIDES);
781 OUTS(PREREQUIRES);
782 OUTS(REQUIRES);
783 OUTS(CONFLICTS);
784 OUTS(OBSOLETES);
785 OUTS(RECOMMENDS);
786 OUTS(SUGGESTS);
787 OUTS(ENHANCES);
788 OUTS(SUPPLEMENTS);
789 #undef OUTS
790 }
791 return str;
792 }
793
794 std::ostream & dumpAsXmlOn( std::ostream & str, const Solvable & obj )
795 {
796 xmlout::Node guard( str, "solvable" );
797
798 dumpAsXmlOn( *guard, obj.kind() );
799 *xmlout::Node( *guard, "name" ) << obj.name();
800 dumpAsXmlOn( *guard, obj.edition() );
801 dumpAsXmlOn( *guard, obj.arch() );
802 dumpAsXmlOn( *guard, obj.repository() );
803 return str;
804 }
805
806 } // namespace sat
808 } // namespace zypp
Collector.h
for_
#define for_(IT, BEG, END)
Convenient for-loops using iterator.
Definition: Easy.h:28
Exception.h
Functional.h
Gettext.h
Interface to gettext.
Logger.h
LookupAttr.h
OnMediaLocation.h
attr
sat::SolvAttr attr
Definition: PoolQuery.cc:311
Pool.h
Repository.h
Selectable.h
_locales
const LocaleSet & _locales
Definition: Solvable.cc:634
OUTS
#define OUTS(X)
NO_SOLVABLE_RETURN
#define NO_SOLVABLE_RETURN(VAL)
Definition: Solvable.cc:108
Solvable.h
Xml.h
ZConfig.h
zypp::Arch
Architecture.
Definition: Arch.h:37
zypp::ByteCount
Store and operate with byte count.
Definition: ByteCount.h:31
zypp::C_Str
Convenience char* constructible from std::string and char*, it maps (char*)0 to an empty string.
Definition: String.h:91
zypp::CapDetail
Helper providing more detailed information about a Capability.
Definition: Capability.h:299
zypp::CapDetail::EXPRESSION
@ EXPRESSION
Definition: Capability.h:306
zypp::CapDetail::name
IdString name() const
Definition: Capability.h:345
zypp::CapDetail::ed
Edition ed() const
Definition: Capability.h:347
zypp::CapDetail::op
Rel op() const
Definition: Capability.h:346
zypp::CapDetail::CAP_OR
@ CAP_OR
Definition: Capability.h:316
zypp::CapDetail::REL_NONE
@ REL_NONE
Definition: Capability.h:314
zypp::CapDetail::CAP_AND
@ CAP_AND
Definition: Capability.h:315
zypp::CapDetail::CAP_ARCH
@ CAP_ARCH
Definition: Capability.h:319
zypp::CapDetail::CAP_NAMESPACE
@ CAP_NAMESPACE
Definition: Capability.h:318
zypp::CapDetail::CAP_WITH
@ CAP_WITH
Definition: Capability.h:317
zypp::Capabilities
Container of Capability (currently read only).
Definition: Capabilities.h:36
zypp::Capabilities::contains
bool contains(const Capability &lhs) const
Return whether the set contains lhs (the Id)
Definition: Capabilities.h:175
zypp::Capabilities::begin
const_iterator begin() const
Iterator pointing to the first Capability.
Definition: Capabilities.h:169
zypp::Capabilities::end
const_iterator end() const
Iterator pointing behind the last Capability.
Definition: Capabilities.h:172
zypp::Capability
A sat capability.
Definition: Capability.h:60
zypp::CheckSum
Definition: CheckSum.h:34
zypp::CheckSum::md5
static CheckSum md5(const std::string &checksum)
Definition: CheckSum.h:73
zypp::CheckSum::sha384
static CheckSum sha384(const std::string &checksum)
Definition: CheckSum.h:78
zypp::CheckSum::sha1
static CheckSum sha1(const std::string &checksum)
Definition: CheckSum.h:75
zypp::CheckSum::sha512
static CheckSum sha512(const std::string &checksum)
Definition: CheckSum.h:79
zypp::CheckSum::sha256
static CheckSum sha256(const std::string &checksum)
Definition: CheckSum.h:77
zypp::CheckSum::sha224
static CheckSum sha224(const std::string &checksum)
Definition: CheckSum.h:76
zypp::CpeId
Common Platform Enumearation (2.3) See http://cpe.mitre.org/ for more information on the Common Platf...
Definition: CpeId.h:32
zypp::CpeId::noThrow
static constexpr NoThrowType noThrow
Indicator argument for non-trowing ctor.
Definition: CpeId.h:62
zypp::Date
Store and operate on date (time_t).
Definition: Date.h:33
zypp::Edition
Edition represents [epoch:]version[-release]
Definition: Edition.h:61
zypp::IdStringType::c_str
const char * c_str() const
Definition: IdStringType.h:105
zypp::IdString
Access to the sat-pools string space.
Definition: IdString.h:43
zypp::IdString::c_str
const char * c_str() const
Conversion to const char *
Definition: IdString.cc:50
zypp::IdString::id
IdType id() const
Expert backdoor.
Definition: IdString.h:122
zypp::IdString::asString
std::string asString() const
Conversion to std::string
Definition: IdString.h:98
zypp::Locale
'Language[_Country]' codes.
Definition: Locale.h:50
zypp::Locale::fallback
Locale fallback() const
Return the fallback locale for this locale, if no fallback exists the empty Locale::noCode.
Definition: Locale.cc:208
zypp::OnMediaLocation
Describes a resource file located on a medium.
Definition: OnMediaLocation.h:39
zypp::OnMediaLocation::setDownloadSize
OnMediaLocation & setDownloadSize(ByteCount val_r)
Set the downloadSize.
Definition: OnMediaLocation.cc:115
zypp::OnMediaLocation::setChecksum
OnMediaLocation & setChecksum(CheckSum val_r)
Set the checksum.
Definition: OnMediaLocation.cc:121
zypp::OnMediaLocation::setLocation
OnMediaLocation & setLocation(Pathname filename_r, unsigned medianr_r=1)
Set filename_r and medianr_r (defaults to 1).
Definition: OnMediaLocation.cc:91
zypp::RepoInfo
What is known about a repository.
Definition: RepoInfo.h:72
zypp::RepoInfo::getLicense
std::string getLicense(const Locale &lang_r=Locale()) const
Return the best license for the current (or a specified) locale.
Definition: RepoInfo.cc:805
zypp::RepoInfo::setProbedType
void setProbedType(const repo::RepoType &t) const
This allows to adjust the RepoType lazy, from NONE to some probed value, even for const objects.
Definition: RepoInfo.cc:658
zypp::RepoInfo::needToAcceptLicense
bool needToAcceptLicense() const
Whether the repo license has to be accepted, e.g.
Definition: RepoInfo.cc:770
zypp::RepoInfo::hasLicense
bool hasLicense() const
Whether there is a license associated with the repo.
Definition: RepoInfo.cc:763
zypp::Repository
Definition: Repository.h:40
zypp::Repository::noRepository
static const Repository noRepository
Represents no Repository.
Definition: Repository.h:62
zypp::Repository::alias
std::string alias() const
Short unique string to identify a repo.
Definition: Repository.cc:59
zypp::Repository::info
RepoInfo info() const
Return any associated RepoInfo.
Definition: Repository.cc:273
zypp::ResKind
Resolvable kinds.
Definition: ResKind.h:33
zypp::ResKind::srcpackage
static const ResKind srcpackage
Definition: ResKind.h:44
zypp::ResKind::explicitBuiltin
static ResKind explicitBuiltin(const char *str_r)
Return the builtin kind if str_r explicitly prefixed.
Definition: ResKind.cc:46
zypp::ResKind::package
static const ResKind package
Definition: ResKind.h:40
zypp::filesystem::Pathname
Pathname.
Definition: Pathname.h:45
zypp::filesystem::Pathname::asString
const std::string & asString() const
String representation.
Definition: Pathname.h:91
zypp::filesystem::Pathname::empty
bool empty() const
Test for an empty path.
Definition: Pathname.h:114
zypp::sat::LookupAttr
Lightweight attribute value lookup.
Definition: LookupAttr.h:108
zypp::sat::LookupRepoAttr
Lightweight repository attribute value lookup.
Definition: LookupAttr.h:258
zypp::sat::Queue
Libsolv Id queue wrapper.
Definition: Queue.h:35
zypp::sat::Queue::size
size_type size() const
Definition: Queue.cc:49
zypp::sat::Queue::end
const_iterator end() const
Definition: Queue.cc:55
zypp::sat::Queue::begin
const_iterator begin() const
Definition: Queue.cc:52
zypp::sat::SolvAttr
Solvable attribute keys.
Definition: SolvAttr.h:41
zypp::sat::SolvAttr::cpeid
static const SolvAttr cpeid
Definition: SolvAttr.h:81
zypp::sat::SolvAttr::buildtime
static const SolvAttr buildtime
Definition: SolvAttr.h:77
zypp::sat::SolvAttr::distribution
static const SolvAttr distribution
Definition: SolvAttr.h:92
zypp::sat::SolvAttr::description
static const SolvAttr description
Definition: SolvAttr.h:72
zypp::sat::SolvAttr::delnotify
static const SolvAttr delnotify
Definition: SolvAttr.h:74
zypp::sat::SolvAttr::installsize
static const SolvAttr installsize
Definition: SolvAttr.h:78
zypp::sat::SolvAttr::downloadsize
static const SolvAttr downloadsize
Definition: SolvAttr.h:79
zypp::sat::SolvAttr::insnotify
static const SolvAttr insnotify
Definition: SolvAttr.h:73
zypp::sat::SolvAttr::summary
static const SolvAttr summary
Definition: SolvAttr.h:71
zypp::sat::SolvAttr::checksum
static const SolvAttr checksum
Definition: SolvAttr.h:86
zypp::sat::SolvAttr::updateStatus
static const SolvAttr updateStatus
Definition: SolvAttr.h:115
zypp::sat::SolvAttr::installtime
static const SolvAttr installtime
Definition: SolvAttr.h:76
zypp::sat::SolvAttr::eula
static const SolvAttr eula
Definition: SolvAttr.h:75
zypp::sat::Solvable::SplitIdent::_name
IdString _name
Definition: Solvable.h:332
zypp::sat::Solvable::SplitIdent::SplitIdent
SplitIdent()
Definition: Solvable.h:318
zypp::sat::Solvable::SplitIdent::_ident
IdString _ident
Definition: Solvable.h:330
zypp::sat::Solvable::SplitIdent::_kind
ResKind _kind
Definition: Solvable.h:331
zypp::sat::Solvable
A Solvable object within the sat Pool.
Definition: Solvable.h:54
zypp::sat::Solvable::suggests
Capabilities suggests() const
Definition: Solvable.cc:494
zypp::sat::Solvable::id
IdType id() const
Expert backdoor.
Definition: Solvable.h:399
zypp::sat::Solvable::dumpOn
std::ostream & dumpOn(std::ostream &str, const Solvable &obj)
More verbose stream output including dependencies.
Definition: Solvable.cc:774
zypp::sat::Solvable::isNeedreboot
bool isNeedreboot() const
Whether this solvable triggers the reboot-needed hint if installed/updated.
Definition: Solvable.cc:393
zypp::sat::Solvable::identIsAutoInstalled
bool identIsAutoInstalled() const
Whether an installed solvable with the same ident is flagged as AutoInstalled.
Definition: Solvable.h:137
zypp::sat::Solvable::lookupLocation
OnMediaLocation lookupLocation() const
returns OnMediaLocation data: This is everything we need to download e.g.
Definition: Solvable.cc:223
zypp::sat::Solvable::lookupBoolAttribute
bool lookupBoolAttribute(const SolvAttr &attr) const
returns the boolean attribute value for attr or false if it does not exists.
Definition: Solvable.cc:169
zypp::sat::Solvable::vendor
IdString vendor() const
The vendor.
Definition: Solvable.cc:356
zypp::sat::Solvable::_id
IdType _id
Definition: Solvable.h:402
zypp::sat::Solvable::installSize
ByteCount installSize() const
Installed (unpacked) size.
Definition: Solvable.cc:688
zypp::sat::Solvable::buildtime
Date buildtime() const
The items build time.
Definition: Solvable.cc:421
zypp::sat::Solvable::needToAcceptLicense
bool needToAcceptLicense() const
True except for well known exceptions (i.e show license but no need to accept it).
Definition: Solvable.cc:747
zypp::sat::Solvable::kind
ResKind kind() const
The Solvables ResKind.
Definition: Solvable.cc:274
zypp::sat::Solvable::providesNamespace
CapabilitySet providesNamespace(const std::string &namespace_r) const
Return the namespaced provides 'namespace([value])[ op edition]' of this Solvable.
Definition: Solvable.cc:518
zypp::sat::Solvable::noSolvable
static const Solvable noSolvable
Represents no Solvable.
Definition: Solvable.h:74
zypp::sat::Solvable::asString
std::string asString() const
String representation "ident-edition.arch" or "noSolvable".
Definition: Solvable.cc:433
zypp::sat::Solvable::distribution
std::string distribution() const
The distribution string.
Definition: Solvable.cc:700
zypp::sat::Solvable::mediaNr
unsigned mediaNr() const
Media number the solvable is located on (0 if no media access required).
Definition: Solvable.cc:675
zypp::sat::Solvable::lookupNumAttribute
unsigned long long lookupNumAttribute(const SolvAttr &attr) const
returns the numeric attribute value for attr or 0 if it does not exists.
Definition: Solvable.cc:157
zypp::sat::Solvable::lookupStrAttribute
std::string lookupStrAttribute(const SolvAttr &attr) const
returns the string attribute value for attr or an empty string if it does not exists.
Definition: Solvable.cc:129
zypp::sat::Solvable::multiversionInstall
bool multiversionInstall() const
Whether different versions of this package can be installed at the same time.
Definition: Solvable.cc:415
zypp::sat::Solvable::cpeId
CpeId cpeId() const
The solvables CpeId if available.
Definition: Solvable.cc:669
zypp::sat::Solvable::nextInRepo
Solvable nextInRepo() const
Return next Solvable in Repo (or noSolvable).
Definition: Solvable.cc:115
zypp::sat::Solvable::installtime
Date installtime() const
The items install time (false if not installed).
Definition: Solvable.cc:427
zypp::sat::Solvable::edition
Edition edition() const
The edition (version-release).
Definition: Solvable.cc:336
zypp::sat::Solvable::prerequires
Capabilities prerequires() const
Definition: Solvable.cc:509
zypp::sat::Solvable::Solvable
Solvable()
Default ctor creates noSolvable.
Definition: Solvable.h:63
zypp::sat::Solvable::enhances
Capabilities enhances() const
Definition: Solvable.cc:499
zypp::sat::Solvable::getSupportedLocales
LocaleSet getSupportedLocales() const
Return the supported locales.
Definition: Solvable.cc:662
zypp::sat::Solvable::supportsRequestedLocales
bool supportsRequestedLocales() const
Whether this Solvable supports at least one requested locale.
Definition: Solvable.cc:659
zypp::sat::Solvable::get
detail::CSolvable * get() const
Expert backdoor.
Definition: Solvable.cc:105
zypp::sat::Solvable::arch
Arch arch() const
The architecture.
Definition: Solvable.cc:342
zypp::sat::Solvable::isSystem
bool isSystem() const
Return whether this Solvable belongs to the system repo.
Definition: Solvable.cc:372
zypp::sat::Solvable::nextInPool
Solvable nextInPool() const
Return next Solvable in Pool (or noSolvable).
Definition: Solvable.cc:112
zypp::sat::Solvable::const
Capabilities const
Definition: Solvable.h:191
zypp::sat::Solvable::licenseToConfirm
std::string licenseToConfirm(const Locale &lang_r=Locale()) const
License or agreement to accept before installing the solvable (opt.
Definition: Solvable.cc:730
zypp::sat::Solvable::supportsLocales
bool supportsLocales() const
Whether this Solvable claims to support locales.
Definition: Solvable.cc:639
zypp::sat::Solvable::operator<<
std::ostream & operator<<(std::ostream &str, const Solvable &obj)
Stream output.
Definition: Solvable.cc:763
zypp::sat::Solvable::provides
Capabilities provides() const
Definition: Solvable.cc:469
zypp::sat::Solvable::asUserString
std::string asUserString() const
String representation "ident-edition.arch(repo)" or "noSolvable".
Definition: Solvable.cc:442
zypp::sat::Solvable::ptfToken
static const IdString ptfToken
Indicator provides ptf()
Definition: Solvable.h:59
zypp::sat::Solvable::retractedToken
static const IdString retractedToken
Indicator provides retracted-patch-package()
Definition: Solvable.h:58
zypp::sat::Solvable::summary
std::string summary(const Locale &lang_r=Locale()) const
Short (singleline) text describing the solvable (opt.
Definition: Solvable.cc:706
zypp::sat::Solvable::conflicts
Capabilities conflicts() const
Definition: Solvable.cc:479
zypp::sat::Solvable::obsoletes
Capabilities obsoletes() const
Definition: Solvable.cc:484
zypp::sat::Solvable::lookupIdAttribute
detail::IdType lookupIdAttribute(const SolvAttr &attr) const
returns the id attribute value for attr or detail::noId if it does not exists.
Definition: Solvable.cc:175
zypp::sat::Solvable::matchesSolvable
std::pair< bool, CapabilitySet > matchesSolvable(const SolvAttr &attr, const sat::Solvable &solv) const
Definition: Solvable.cc:550
zypp::sat::Solvable::name
std::string name() const
The name (without any ResKind prefix).
Definition: Solvable.cc:328
zypp::sat::Solvable::supportsLocale
bool supportsLocale(const Locale &locale_r) const
Whether this Solvable supports a specific Locale.
Definition: Solvable.cc:645
zypp::sat::Solvable::supplements
Capabilities supplements() const
Definition: Solvable.cc:504
zypp::sat::Solvable::downloadSize
ByteCount downloadSize() const
Download size.
Definition: Solvable.cc:694
zypp::sat::Solvable::isKind
bool isKind(const ResKind &kind_r) const
Test whether a Solvable is of a certain ResKind.
Definition: Solvable.cc:301
zypp::sat::Solvable::onSystemByAuto
bool onSystemByAuto() const
Whether this is known to be automatically installed (as dependency of a user request package).
Definition: Solvable.cc:383
zypp::sat::Solvable::delnotify
std::string delnotify(const Locale &lang_r=Locale()) const
UI hint text when selecting the solvable for uninstall (opt.
Definition: Solvable.cc:724
zypp::sat::Solvable::valuesOfNamespace
CapabilitySet valuesOfNamespace(const std::string &namespace_r) const
Return 'value[ op edition]' for namespaced provides 'namespace(value)[ op edition]'.
Definition: Solvable.cc:532
zypp::sat::Solvable::ident
IdString ident() const
The identifier.
Definition: Solvable.cc:268
zypp::sat::Solvable::dumpAsXmlOn
std::ostream & dumpAsXmlOn(std::ostream &str, const Solvable &obj)
XML output.
Definition: Solvable.cc:794
zypp::sat::Solvable::lookupCheckSumAttribute
CheckSum lookupCheckSumAttribute(const SolvAttr &attr) const
returns the CheckSum attribute value for attr or an empty CheckSum if ir does not exist.
Definition: Solvable.cc:181
zypp::sat::Solvable::description
std::string description(const Locale &lang_r=Locale()) const
Long (multiline) text describing the solvable (opt.
Definition: Solvable.cc:712
zypp::sat::Solvable::onSystemByUser
bool onSystemByUser() const
Whether this is known to be installed on behalf of a user request.
Definition: Solvable.cc:378
zypp::sat::Solvable::recommends
Capabilities recommends() const
Definition: Solvable.cc:489
zypp::sat::Solvable::repoInfo
RepoInfo repoInfo() const
The repositories RepoInfo.
Definition: Solvable.cc:368
zypp::sat::Solvable::repository
Repository repository() const
The Repository this Solvable belongs to.
Definition: Solvable.cc:362
zypp::sat::Solvable::isPtf
bool isPtf() const
Whether this solvable is a PTF (provides ptfToken).
Definition: Solvable.cc:409
zypp::sat::Solvable::isRetracted
bool isRetracted() const
Whether this solvable is retracted (provides retractedToken).
Definition: Solvable.cc:399
zypp::sat::Solvable::isKind
bool isKind() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: Solvable.h:97
zypp::sat::Solvable::insnotify
std::string insnotify(const Locale &lang_r=Locale()) const
UI hint text when selecting the solvable for install (opt.
Definition: Solvable.cc:718
zypp::sat::Solvable::identical
bool identical(const Solvable &rhs) const
Test whether two Solvables have the same content.
Definition: Solvable.cc:452
zypp::sat::detail::PoolImpl::isSystemRepo
bool isSystemRepo(CRepo *repo_r) const
Definition: PoolImpl.h:100
zypp::sat::detail::PoolImpl::getSolvable
CSolvable * getSolvable(SolvableIdType id_r) const
Return pointer to the sat-solvable or NULL if it is not valid.
Definition: PoolImpl.h:181
zypp::sat::detail::PoolImpl::isNeedreboot
bool isNeedreboot(const Solvable &solv_r) const
Whether solv_r matches the spec.
Definition: PoolImpl.h:329
zypp::sat::detail::PoolImpl::isOnSystemByAuto
bool isOnSystemByAuto(IdString ident_r) const
Definition: PoolImpl.h:314
zypp::sat::detail::PoolImpl::isMultiversion
bool isMultiversion(const Solvable &solv_r) const
Definition: PoolImpl.cc:628
zypp::sat::detail::PoolImpl::isOnSystemByUser
bool isOnSystemByUser(IdString ident_r) const
Definition: PoolImpl.h:311
zypp::ui::Selectable::get
static Ptr get(const pool::ByIdent &ident_r)
Get the Selctable.
Definition: Selectable.cc:28
str
String related utilities and Regular expression matching.
zypp::functor::false_c
False false_c()
Convenience function for creating a False.
Definition: Functional.h:265
zypp::sat::detail::solvablePrereqMarker
static const IdType solvablePrereqMarker(15)
Internal ids satlib includes in dependencies.
zypp::sat::detail::noId
static const IdType noId(0)
zypp::sat::detail::IdType
int IdType
Generic Id type.
Definition: PoolMember.h:104
zypp::sat::detail::CSolvable
::s_Solvable CSolvable
Wrapped libsolv C data type exposed as backdoor.
Definition: PoolMember.h:64
zypp::sat::detail::SolvableIdType
unsigned SolvableIdType
Id type to connect Solvable and sat-solvable.
Definition: PoolMember.h:125
zypp::sat::detail::systemSolvableId
static const SolvableIdType systemSolvableId(1)
Id to denote the usually hidden Solvable::systemSolvable.
zypp::str::hasPrefix
bool hasPrefix(const C_Str &str_r, const C_Str &prefix_r)
Return whether str_r has prefix prefix_r.
Definition: String.h:1023
zypp::str::form
std::string form(const char *format,...) __attribute__((format(printf
Printf style construction of std::string.
Definition: String.cc:36
zypp
Easy-to use interface to the ZYPP dependency resolver.
Definition: CodePitfalls.doc:2
zypp::CapabilitySet
std::unordered_set< Capability > CapabilitySet
Definition: Capability.h:33
zypp::LocaleSet
std::unordered_set< Locale > LocaleSet
Definition: Locale.h:27
PoolImpl.h
zypp::repo::RepoType::NONE_e
@ NONE_e
Definition: RepoType.h:36
zypp::repo::RepoType::YAST2_e
@ YAST2_e
Definition: RepoType.h:38
zypp::sat::detail::PoolMember::myPool
static PoolImpl & myPool()
Definition: PoolImpl.cc:178
zypp::xmlout::Node
RAII writing a nodes start/end tag.
Definition: Xml.h:85