36 static const IdString support_unsupported(
"support_unsupported" );
37 static const IdString support_acc(
"support_acc" );
38 static const IdString support_l1(
"support_l1" );
39 static const IdString support_l2(
"support_l2" );
40 static const IdString support_l3(
"support_l3" );
41 static const IdString support_superseded(
"support_superseded" );
48 if ( solv.edition() == solv_r.
edition()
49 && solv.ident() == solv_r.
ident()
70 if ( strv::hasPrefix( kw.asStringView(), support_superseded.asStringView() ) ) {
72 if ( kw.c_str()[support_superseded.
size()] ==
'(' && kw.c_str()[kw.size()-1] ==
')' ) {
73 std::string_view val { kw.c_str()+support_superseded.
size()+1, kw.size()-support_superseded.
size()-2 };
74 if ( not val.empty() ) {
76 ret.second = std::set<std::string_view>();
77 ret.second->insert( val );
79 WAR <<
"No superseding package defined in " << kw << endl;
82 WAR <<
"No superseding package defined in " << kw << endl;
94 const std::string & s( url_r.
getScheme() );
95 return s ==
"dir" || s ==
"file";
174 std::vector<std::string> ret;
178 for (
const auto & v : *res.second )
179 ret.push_back( std::string( v ) );
187 std::pair<std::vector<IdString>,std::vector<std::string>> ret;
189 if ( not todo.empty() )
191 std::set<std::string> done;
192 std::set<std::string> unresolved;
193 std::set<IdString> resolved;
194 while ( not todo.empty() ) {
195 auto doneit { done.insert( std::move(todo.back()) ) };
197 if ( not doneit.second )
199 const std::string & next { *doneit.first };
202 const std::vector<std::string> & more { sel->supersededBy() };
203 if ( more.empty() ) {
204 resolved.insert( sel->ident() );
206 todo.insert( todo.end(), more.begin(), more.end() );
209 unresolved.insert( next );
212 if ( not resolved.empty() )
213 ret.first.insert( ret.first.end(), resolved.begin(), resolved.end() );
214 if ( not unresolved.empty() )
215 ret.second.insert( ret.second.end(), unresolved.begin(), unresolved.end() );
225 ERR <<
"Target not initialized. Changelog is not available." << std::endl;
233 return header ? header->tag_changelog() :
Changelog();
235 WAR <<
"changelog is not available for uninstalled packages" << std::endl;
265 std::list<std::string> ret;
Store and operate with byte count.
static const std::string & md5Type()
Edition represents [epoch:]version[-release]
Access to the sat-pools string space.
unsigned size() const
The strings size.
IdType id() const
Expert backdoor.
std::string asString() const
Conversion to std::string
std::string packager() const
std::string sourcePkgLongName() const
The source rpms "name-version-release.type".
sat::ArrayAttr< PackageKeyword, IdString > Keywords
bool maybeUnsupported() const
True if the vendor support for this package is unknown or explicitly unsupported.
Keywords keywords() const
Pathname cachedLocation() const
Location of the downloaded package in cache or an empty path.
std::vector< std::string > supersededBy() const
The name(s) of the successor package if vendorSupport is VendorSupportSuperseded.
OnMediaLocation location() const
Location of the resolvable in the repository.
FileList filelist() const
Return the packages filelist (if available).
std::string sourcePkgName() const
Name of the source rpm this package was built from.
sat::ArrayAttr< std::string, std::string > FileList
std::string url() const
Don't ship it as class Url, because it might be in fact anything but a legal Url.
std::string sourcePkgType() const
The type of the source rpm ("src" or "nosrc").
Package(const sat::Solvable &solvable_r)
Ctor.
Edition sourcePkgEdition() const
Edition of the source rpm this package was built from.
VendorSupportOption vendorSupport() const
Returns the level of supportability the vendor gives to this package.
CheckSum checksum() const
Checksum the source says this package should have.
ByteCount sourcesize() const
Size of corresponding the source package.
std::list< std::string > authors() const
std::string group() const
std::string buildhost() const
Changelog changelog() const
Get the package change log.
std::pair< std::vector< IdString >, std::vector< std::string > > supersededByItems() const
The successor package(s) if vendorSupport is VendorSupportSuperseded.
std::string distribution() const
std::string license() const
What is known about a repository.
Url url() const
Pars pro toto: The first repository url, this is either baseUrls().front() or if no baseUrl is define...
Pathname path() const
Repository path.
Pathname packagesPath() const
Path where this repo packages are cached.
ResObject(const sat::Solvable &solvable_r)
Ctor.
std::string getScheme() const
Returns the scheme name of the URL.
ZYpp::Ptr getZYpp()
Convenience to get the Pointer to the ZYpp instance.
Wrapper class for stat/lstat.
const Pathname & path() const
Return current Pathname.
bool isExist() const
Return whether valid stat info exists.
const char * c_str() const
Return current Pathname as C-string.
static const SolvAttr filelist
static const SolvAttr distribution
static const SolvAttr group
static const SolvAttr sourceevr
static const SolvAttr sourcesize
static const SolvAttr packager
static const SolvAttr url
static const SolvAttr sourcename
static const SolvAttr checksum
static const SolvAttr sourcearch
static const SolvAttr keywords
static const SolvAttr authors
static const SolvAttr license
static const SolvAttr buildhost
A Solvable object within the sat Pool.
Edition edition() const
The edition (version-release).
IdString ident() const
The identifier.
bool identical(const Solvable &rhs) const
Test whether two Solvables have the same content.
Container of Solvable providing a Capability (read only).
static Ptr get(const pool::ByIdent &ident_r)
Get the Selctable.
int IdType
Generic Id type.
std::string form(const char *format,...) __attribute__((format(printf
Printf style construction of std::string.
unsigned split(const C_Str &line_r, TOutputIterator result_r, const C_Str &sepchars_r=" \t", const Trim trim_r=NO_TRIM)
Split line_r into words.
Easy-to use interface to the ZYPP dependency resolver.
@ VendorSupportACC
Additional Customer Contract necessary.
@ VendorSupportLevel3
Problem resolution, which means technical support designed to resolve complex problems by engaging en...
@ VendorSupportUnknown
The support for this package is unknown.
@ VendorSupportLevel1
Problem determination, which means technical support designed to provide compatibility information,...
@ VendorSupportSuperseded
The package was discontinued and has been superseded by a new package with a different name.
@ VendorSupportUnsupported
The package is known to be unsupported by the vendor.
@ VendorSupportLevel2
Problem isolation, which means technical support designed to duplicate customer problems,...
std::list< ChangelogEntry > Changelog
List of ChangelogEntry.
std::pair< VendorSupportOption, std::optional< std::set< std::string_view > > > GetVendorSupportOptionReturn
getVendorSupportOption return value
GetVendorSupportOptionReturn getVendorSupportOption(sat::Solvable solv_r)
Get VendorSupportOption and the PKGNAME if VendorSupportSuperseded.
Pathname cachedLocation(const OnMediaLocation &loc_r, const RepoInfo &repo_r)
bool schemeIsLocalDir(const Url &url_r)
OnMediaLocation lookupLocation() const
Solvable::IdType id() const
CheckSum lookupCheckSumAttribute(const SolvAttr &attr) const
std::string lookupStrAttribute(const SolvAttr &attr) const
RepoInfo repoInfo() const
Solvable satSolvable() const
unsigned long long lookupNumAttribute(const SolvAttr &attr) const
Repository repository() const
detail::IdType lookupIdAttribute(const SolvAttr &attr) const
#define IMPL_PTR_TYPE(NAME)
c++17: std::string_view tools