Associate the Void Linux distribution with it.
---
generator/actions.ml | 5 +++--
inspector/virt-inspector.rng | 2 ++
src/guestfs-internal.h | 2 ++
src/inspect-apps.c | 1 +
src/inspect-fs.c | 10 ++++++++--
src/inspect.c | 2 ++
6 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/generator/actions.ml b/generator/actions.ml
index 25d3c0d..a40dbdc 100644
--- a/generator/actions.ml
+++ b/generator/actions.ml
@@ -1826,7 +1826,8 @@ 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<apk>.
+C<rpm>, C<deb>, C<ebuild>, C<pisi>, C<pacman>,
C<pkgsrc>, C<apk>,
+C<xbps>.
Future versions of libguestfs may return other strings.
Please read L<guestfs(3)/INSPECTION> for more details." };
@@ -1848,7 +1849,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<apk>.
+C<portage>, C<pisi>, C<pacman>, C<urpmi>, C<zypper>,
C<apk>, C<xbps>.
Future versions of libguestfs may return other strings.
Please read L<guestfs(3)/INSPECTION> for more details." };
diff --git a/inspector/virt-inspector.rng b/inspector/virt-inspector.rng
index c4c423c..dff46c5 100644
--- a/inspector/virt-inspector.rng
+++ b/inspector/virt-inspector.rng
@@ -126,6 +126,7 @@
<value>pisi</value>
<value>pkgsrc</value>
<value>rpm</value>
+ <value>xbps</value>
<!-- "unknown" is intentionally left out -->
</choice>
</element>
@@ -143,6 +144,7 @@
<value>portage</value>
<value>up2date</value>
<value>urpmi</value>
+ <value>xbps</value>
<value>yum</value>
<value>zypper</value>
<!-- "unknown" is intentionally left out -->
diff --git a/src/guestfs-internal.h b/src/guestfs-internal.h
index 8a36ab7..03f1034 100644
--- a/src/guestfs-internal.h
+++ b/src/guestfs-internal.h
@@ -581,6 +581,7 @@ enum inspect_os_package_format {
OS_PACKAGE_FORMAT_PISI,
OS_PACKAGE_FORMAT_PKGSRC,
OS_PACKAGE_FORMAT_APK,
+ OS_PACKAGE_FORMAT_XBPS,
};
enum inspect_os_package_management {
@@ -595,6 +596,7 @@ enum inspect_os_package_management {
OS_PACKAGE_MANAGEMENT_ZYPPER,
OS_PACKAGE_MANAGEMENT_DNF,
OS_PACKAGE_MANAGEMENT_APK,
+ OS_PACKAGE_MANAGEMENT_XBPS,
};
struct inspect_fs {
diff --git a/src/inspect-apps.c b/src/inspect-apps.c
index e53d87c..b8767c3 100644
--- a/src/inspect-apps.c
+++ b/src/inspect-apps.c
@@ -149,6 +149,7 @@ guestfs_impl_inspect_list_applications2 (guestfs_h *g, const char
*root)
case OS_PACKAGE_FORMAT_EBUILD:
case OS_PACKAGE_FORMAT_PISI:
case OS_PACKAGE_FORMAT_PKGSRC:
+ case OS_PACKAGE_FORMAT_XBPS:
case OS_PACKAGE_FORMAT_UNKNOWN:
; /* nothing */
}
diff --git a/src/inspect-fs.c b/src/inspect-fs.c
index c718773..adda4ab 100644
--- a/src/inspect-fs.c
+++ b/src/inspect-fs.c
@@ -487,6 +487,10 @@ guestfs_int_check_package_format (guestfs_h *g, struct inspect_fs
*fs)
fs->package_format = OS_PACKAGE_FORMAT_APK;
break;
+ case OS_DISTRO_VOID_LINUX:
+ fs->package_format = OS_PACKAGE_FORMAT_XBPS;
+ break;
+
case OS_DISTRO_SLACKWARE:
case OS_DISTRO_TTYLINUX:
case OS_DISTRO_COREOS:
@@ -499,7 +503,6 @@ guestfs_int_check_package_format (guestfs_h *g, struct inspect_fs
*fs)
case OS_DISTRO_OPENBSD:
case OS_DISTRO_FRUGALWARE:
case OS_DISTRO_PLD_LINUX:
- case OS_DISTRO_VOID_LINUX:
case OS_DISTRO_UNKNOWN:
fs->package_format = OS_PACKAGE_FORMAT_UNKNOWN;
break;
@@ -572,6 +575,10 @@ guestfs_int_check_package_management (guestfs_h *g, struct inspect_fs
*fs)
fs->package_management = OS_PACKAGE_MANAGEMENT_APK;
break;
+ case OS_DISTRO_VOID_LINUX:
+ fs->package_management = OS_PACKAGE_MANAGEMENT_XBPS;
+ break;
+
case OS_DISTRO_SLACKWARE:
case OS_DISTRO_TTYLINUX:
case OS_DISTRO_COREOS:
@@ -584,7 +591,6 @@ guestfs_int_check_package_management (guestfs_h *g, struct inspect_fs
*fs)
case OS_DISTRO_OPENBSD:
case OS_DISTRO_FRUGALWARE:
case OS_DISTRO_PLD_LINUX:
- case OS_DISTRO_VOID_LINUX:
case OS_DISTRO_UNKNOWN:
fs->package_management = OS_PACKAGE_MANAGEMENT_UNKNOWN;
break;
diff --git a/src/inspect.c b/src/inspect.c
index 29b4f85..9a60aa0 100644
--- a/src/inspect.c
+++ b/src/inspect.c
@@ -539,6 +539,7 @@ guestfs_impl_inspect_get_package_format (guestfs_h *g, const char
*root)
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_XBPS: ret = safe_strdup (g, "xbps"); break;
case OS_PACKAGE_FORMAT_UNKNOWN:
ret = safe_strdup (g, "unknown");
break;
@@ -567,6 +568,7 @@ guestfs_impl_inspect_get_package_management (guestfs_h *g, const char
*root)
case OS_PACKAGE_MANAGEMENT_PORTAGE: ret = safe_strdup (g, "portage"); break;
case OS_PACKAGE_MANAGEMENT_UP2DATE: ret = safe_strdup (g, "up2date"); break;
case OS_PACKAGE_MANAGEMENT_URPMI: ret = safe_strdup (g, "urpmi"); break;
+ case OS_PACKAGE_MANAGEMENT_XBPS: ret = safe_strdup (g, "xbps"); break;
case OS_PACKAGE_MANAGEMENT_YUM: ret = safe_strdup (g, "yum"); break;
case OS_PACKAGE_MANAGEMENT_ZYPPER: ret = safe_strdup (g, "zypper"); break;
case OS_PACKAGE_MANAGEMENT_UNKNOWN:
--
2.5.5