aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2022-02-06 21:15:38 +0200
committerTimo Teräs <timo.teras@iki.fi>2022-02-06 21:15:38 +0200
commit34819366d27f8a7013ef54dcd67e5168f88bb9f7 (patch)
treea9e93487f41cbed465c584d3e7e57bcc1329071f
parent0be2024ccb8c5cdcfb5214ac13b6dcab5e8d3fce (diff)
downloadapk-tools-34819366d27f8a7013ef54dcd67e5168f88bb9f7.tar.gz
apk-tools-34819366d27f8a7013ef54dcd67e5168f88bb9f7.tar.bz2
apk-tools-34819366d27f8a7013ef54dcd67e5168f88bb9f7.tar.xz
adb: add layer to pkginfo
-rw-r--r--src/apk_adb.c1
-rw-r--r--src/apk_adb.h3
-rw-r--r--src/package.c1
3 files changed, 4 insertions, 1 deletions
diff --git a/src/apk_adb.c b/src/apk_adb.c
index 37206f0..ea27a4d 100644
--- a/src/apk_adb.c
+++ b/src/apk_adb.c
@@ -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),
},
};
diff --git a/src/apk_adb.h b/src/apk_adb.h
index 68bc92d..5b8283c 100644
--- a/src/apk_adb.h
+++ b/src/apk_adb.h
@@ -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
diff --git a/src/package.c b/src/package.c
index cc86192..5aee917 100644
--- a/src/package.c
+++ b/src/package.c
@@ -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));