[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Libguestfs] [PATCH 8/9] Add support for pkgsrc, default NetBSD package manager.



From: Michael Scherer <misc zarb org>

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 ).
---
 src/guestfs-internal.h |    3 ++-
 src/inspect.c          |    1 +
 src/inspect_apps.c     |    1 +
 3 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/src/guestfs-internal.h b/src/guestfs-internal.h
index 3b4d2a4..52e3963 100644
--- a/src/guestfs-internal.h
+++ b/src/guestfs-internal.h
@@ -285,7 +285,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 fde434e..7b6dc8e 100644
--- a/src/inspect.c
+++ b/src/inspect.c
@@ -457,6 +457,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 44db344..c6ddd05 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 */;
-- 
1.7.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]