From Alexander G. M. Smith <agmsmith@xxxxxx>:
Alexander G. M. Smith has uploaded this change for review. (
Change subject: package kit: Skip over future package attributes.
package kit: Skip over future package attributes.
Ignore unknown fields (also called attributes) which are from a package
file with a different minor version number. Previously it would halt
with an error when encountering such a field, even though it can safely
be skipped over (if it was unsafe, we would have incremented the major
The use case is a future package attribute for pre-uninstall scripts.
If they're not run, that just leaves some debris after uninstalling
(like symbolic link desktop icons).
* Use a new error code (B_PACKAGE_FUTURE_DATA) to signal that a package
attribute that is unknown has been read, and can be skipped. Sort of
half way between B_OK and B_BAD_DATA, you decide. Needed since a
private error code may leak out of the package kit library.
* Cancel the error code when reading unknown package attributes and the
package is a different minor version.
* Print unknown package attribute index numbers, since they may be
from future package file formats and can be safely skipped otherwise.
Mention the relevant enum so you can find it in the source code.
It's a pity that the previous abstraction layer isn't present, since
it tells us what data type the attribute is (string, number, etc), so
we could have printed its value too.
First step of two for enhancement #13427
See https://review.haiku-os.org/c/haiku/+/1504 to generate packages
with a different minor version number (second step of the enhancement).
6 files changed, 24 insertions(+), 2 deletions(-)
git pull ssh://git.haiku-os.org:22/haiku refs/changes/14/1714/1
To view, visit https://review.haiku-os.org/c/haiku/+/1714
To unsubscribe, or for help writing mail filters, visit
Gerrit-Owner: Alexander G. M. Smith <agmsmith@xxxxxx>