From: Michael Scherer Date: Thu, 13 Oct 2011 23:05:07 +0000 (+0200) Subject: Add support for pkgsrc, default NetBSD package manager. X-Git-Tag: 1.13.21~3 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=8f6eed00da59614184090e56edef6884f187b436;p=libguestfs.git Add support for pkgsrc, default NetBSD package manager. For now, only detect the tool, but support from reading installed package could be added later ( may require either a package of pkgsrc, or a smaller tool to read the db ). --- diff --git a/generator/generator_actions.ml b/generator/generator_actions.ml index 60fca9b..02eb2ef 100644 --- a/generator/generator_actions.ml +++ b/generator/generator_actions.ml @@ -1173,7 +1173,8 @@ This returns the string C if we could not determine the package format I if the operating system does not have a real packaging system (eg. Windows). -Possible strings include: C, C, C, C, C. +Possible strings include: +C, C, C, C, C, C. Future versions of libguestfs may return other strings. Please read L for more details."); diff --git a/src/guestfs-internal.h b/src/guestfs-internal.h index cee3048..eacf502 100644 --- a/src/guestfs-internal.h +++ b/src/guestfs-internal.h @@ -284,7 +284,8 @@ enum inspect_os_package_format { OS_PACKAGE_FORMAT_DEB, OS_PACKAGE_FORMAT_PACMAN, OS_PACKAGE_FORMAT_EBUILD, - OS_PACKAGE_FORMAT_PISI + OS_PACKAGE_FORMAT_PISI, + OS_PACKAGE_FORMAT_PKGSRC, }; enum inspect_os_package_management { diff --git a/src/inspect.c b/src/inspect.c index 62cbc85..1432735 100644 --- a/src/inspect.c +++ b/src/inspect.c @@ -456,6 +456,7 @@ guestfs__inspect_get_package_format (guestfs_h *g, const char *root) case OS_PACKAGE_FORMAT_PACMAN: ret = safe_strdup (g, "pacman"); break; 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_UNKNOWN: default: ret = safe_strdup (g, "unknown"); diff --git a/src/inspect_apps.c b/src/inspect_apps.c index ba27247..a77da73 100644 --- a/src/inspect_apps.c +++ b/src/inspect_apps.c @@ -90,6 +90,7 @@ guestfs__inspect_list_applications (guestfs_h *g, const char *root) case OS_PACKAGE_FORMAT_PACMAN: case OS_PACKAGE_FORMAT_EBUILD: case OS_PACKAGE_FORMAT_PISI: + case OS_PACKAGE_FORMAT_PKGSRC: case OS_PACKAGE_FORMAT_UNKNOWN: default: /* nothing - keep GCC happy */;