adb: add layer to pkginfo

cute-signatures
Timo Teräs 2022-02-06 21:15:38 +02:00
parent f69ae30272
commit 21519221c2
3 changed files with 4 additions and 1 deletions

View File

@ -412,6 +412,7 @@ const struct adb_object_schema schema_pkginfo = {
ADB_FIELD(ADBI_PI_REPLACES, "replaces", schema_dependency_array),
ADB_FIELD(ADBI_PI_INSTALL_IF, "install-if", schema_dependency_array),
ADB_FIELD(ADBI_PI_RECOMMENDS, "recommends", schema_dependency_array),
ADB_FIELD(ADBI_PI_LAYER, "layer", scalar_int),
},
};

View File

@ -31,7 +31,8 @@
#define ADBI_PI_REPLACES 0x11
#define ADBI_PI_INSTALL_IF 0x12
#define ADBI_PI_RECOMMENDS 0x13
#define ADBI_PI_MAX 0x14
#define ADBI_PI_LAYER 0x14
#define ADBI_PI_MAX 0x15
/* ACL entries */
#define ADBI_ACL_MODE 0x01

View File

@ -611,6 +611,7 @@ void apk_pkg_from_adb(struct apk_database *db, struct apk_package *pkg, struct a
pkg->maintainer = apk_atomize_dup(&db->atoms, adb_ro_blob(pkginfo, ADBI_PI_MAINTAINER));
pkg->build_time = adb_ro_int(pkginfo, ADBI_PI_BUILD_TIME);
pkg->commit = commit_id(adb_ro_blob(pkginfo, ADBI_PI_REPO_COMMIT));
pkg->layer = adb_ro_int(pkginfo, ADBI_PI_LAYER);
apk_deps_from_adb(&pkg->depends, db, adb_ro_obj(pkginfo, ADBI_PI_DEPENDS, &obj));
apk_deps_from_adb(&pkg->provides, db, adb_ro_obj(pkginfo, ADBI_PI_PROVIDES, &obj));