Handle self-destruct packages
commit163a51d41de49cf0575f206a92143fbb593c6a21
authorJon Turney <jon.turney@dronecode.org.uk>
Tue, 28 Jun 2022 19:36:43 +0000 (28 20:36 +0100)
committerJon Turney <jon.turney@dronecode.org.uk>
Tue, 28 Jun 2022 20:03:11 +0000 (28 21:03 +0100)
treea07618f0c640d9532f33a6481b43725aa9fe9501
parent69ccd7669712339f4855457d68d5b885152fbfb2
Handle self-destruct packages

These are sometimes useful in situations where a package is obsoleted,
but doesn't have a simple replacement.

The parser can't currently handle "libsolv-self-destruct-pkg()" (the
magic provide name which triggers this behaviour in libsolv) appearing
as a provide, because (i) brackets aren't a valid character in a package
name, and (ii) empty braces isn't permitted for a versioncriteria
following a package name.

For backwards-compatibility (to allow old versions of setup to parse a
setup.ini containing this instruction) and terseness, accept
'_self-destruct' as equivalent to that magic package name.

Requires libsolv >= 0.7.8
IniDBBuilderPackage.cc