Associate the Alpine Linux distribution with it.
---
generator/actions.ml | 4 ++--
src/guestfs-internal.h | 2 ++
src/inspect-apps.c | 1 +
src/inspect-fs.c | 10 ++++++++--
src/inspect.c | 2 ++
5 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/generator/actions.ml b/generator/actions.ml
index 26cc0da..d0d6a21 100644
--- a/generator/actions.ml
+++ b/generator/actions.ml
@@ -1782,7 +1782,7 @@ package format I<or> if the operating system does not have
a real packaging system (eg. Windows).
Possible strings include:
-C<rpm>, C<deb>, C<ebuild>, C<pisi>, C<pacman>,
C<pkgsrc>.
+C<rpm>, C<deb>, C<ebuild>, C<pisi>, C<pacman>,
C<pkgsrc>, C<apk>.
Future versions of libguestfs may return other strings.
Please read L<guestfs(3)/INSPECTION> for more details." };
@@ -1804,7 +1804,7 @@ a real packaging system (eg. Windows).
Possible strings include: C<yum>, C<dnf>, C<up2date>,
C<apt> (for all Debian derivatives),
-C<portage>, C<pisi>, C<pacman>, C<urpmi>, C<zypper>.
+C<portage>, C<pisi>, C<pacman>, C<urpmi>, C<zypper>,
C<apk>.
Future versions of libguestfs may return other strings.
Please read L<guestfs(3)/INSPECTION> for more details." };
diff --git a/src/guestfs-internal.h b/src/guestfs-internal.h
index 0cd7f74..0c8857c 100644
--- a/src/guestfs-internal.h
+++ b/src/guestfs-internal.h
@@ -563,6 +563,7 @@ enum inspect_os_package_format {
OS_PACKAGE_FORMAT_EBUILD,
OS_PACKAGE_FORMAT_PISI,
OS_PACKAGE_FORMAT_PKGSRC,
+ OS_PACKAGE_FORMAT_APK,
};
enum inspect_os_package_management {
@@ -576,6 +577,7 @@ enum inspect_os_package_management {
OS_PACKAGE_MANAGEMENT_URPMI,
OS_PACKAGE_MANAGEMENT_ZYPPER,
OS_PACKAGE_MANAGEMENT_DNF,
+ OS_PACKAGE_MANAGEMENT_APK,
};
struct inspect_fs {
diff --git a/src/inspect-apps.c b/src/inspect-apps.c
index 72c91ff..26091ab 100644
--- a/src/inspect-apps.c
+++ b/src/inspect-apps.c
@@ -162,6 +162,7 @@ guestfs_impl_inspect_list_applications2 (guestfs_h *g, const char
*root)
return NULL;
break;
+ case OS_PACKAGE_FORMAT_APK:
case OS_PACKAGE_FORMAT_EBUILD:
case OS_PACKAGE_FORMAT_PISI:
case OS_PACKAGE_FORMAT_PKGSRC:
diff --git a/src/inspect-fs.c b/src/inspect-fs.c
index 94c5bb9..aa198ad 100644
--- a/src/inspect-fs.c
+++ b/src/inspect-fs.c
@@ -484,6 +484,10 @@ guestfs_int_check_package_format (guestfs_h *g, struct inspect_fs
*fs)
fs->package_format = OS_PACKAGE_FORMAT_PISI;
break;
+ case OS_DISTRO_ALPINE_LINUX:
+ fs->package_format = OS_PACKAGE_FORMAT_APK;
+ break;
+
case OS_DISTRO_SLACKWARE:
case OS_DISTRO_TTYLINUX:
case OS_DISTRO_COREOS:
@@ -494,7 +498,6 @@ guestfs_int_check_package_format (guestfs_h *g, struct inspect_fs
*fs)
case OS_DISTRO_FREEBSD:
case OS_DISTRO_NETBSD:
case OS_DISTRO_OPENBSD:
- case OS_DISTRO_ALPINE_LINUX:
case OS_DISTRO_UNKNOWN:
fs->package_format = OS_PACKAGE_FORMAT_UNKNOWN;
break;
@@ -556,6 +559,10 @@ guestfs_int_check_package_management (guestfs_h *g, struct inspect_fs
*fs)
fs->package_management = OS_PACKAGE_MANAGEMENT_ZYPPER;
break;
+ case OS_DISTRO_ALPINE_LINUX:
+ fs->package_management = OS_PACKAGE_MANAGEMENT_APK;
+ break;
+
case OS_DISTRO_SLACKWARE:
case OS_DISTRO_TTYLINUX:
case OS_DISTRO_COREOS:
@@ -566,7 +573,6 @@ guestfs_int_check_package_management (guestfs_h *g, struct inspect_fs
*fs)
case OS_DISTRO_FREEBSD:
case OS_DISTRO_NETBSD:
case OS_DISTRO_OPENBSD:
- case OS_DISTRO_ALPINE_LINUX:
case OS_DISTRO_UNKNOWN:
fs->package_management = OS_PACKAGE_MANAGEMENT_UNKNOWN;
break;
diff --git a/src/inspect.c b/src/inspect.c
index 79f674c..9332fc4 100644
--- a/src/inspect.c
+++ b/src/inspect.c
@@ -530,6 +530,7 @@ guestfs_impl_inspect_get_package_format (guestfs_h *g, const char
*root)
case OS_PACKAGE_FORMAT_EBUILD: ret = safe_strdup (g, "ebuild"); break;
case OS_PACKAGE_FORMAT_PISI: ret = safe_strdup (g, "pisi"); break;
case OS_PACKAGE_FORMAT_PKGSRC: ret = safe_strdup (g, "pkgsrc"); break;
+ case OS_PACKAGE_FORMAT_APK: ret = safe_strdup (g, "apk"); break;
case OS_PACKAGE_FORMAT_UNKNOWN:
ret = safe_strdup (g, "unknown");
break;
@@ -550,6 +551,7 @@ guestfs_impl_inspect_get_package_management (guestfs_h *g, const char
*root)
return NULL;
switch (fs->package_management) {
+ case OS_PACKAGE_MANAGEMENT_APK: ret = safe_strdup (g, "apk"); break;
case OS_PACKAGE_MANAGEMENT_APT: ret = safe_strdup (g, "apt"); break;
case OS_PACKAGE_MANAGEMENT_DNF: ret = safe_strdup (g, "dnf"); break;
case OS_PACKAGE_MANAGEMENT_PACMAN: ret = safe_strdup (g, "pacman"); break;
--
2.1.0