pkg: alternatives support
[oweals/opkg-lede.git] / libopkg / pkg.h
index cf405b15e8148d281f6e75438f1ee800a671d978..600fc9eaa25ca362d67c0ac108686b624de9f953 100644 (file)
@@ -100,6 +100,7 @@ enum pkg_fields {
        PKG_DEPENDS,
        PKG_CONFLICTS,
        PKG_CONFFILES,
+       PKG_ALTERNATIVES,
 };
 
 struct abstract_pkg {
@@ -118,6 +119,24 @@ struct abstract_pkg {
 
 #include "pkg_depends.h"
 
+enum pkg_alternative_field {
+       PAF_PRIO,
+       PAF_PATH,
+       PAF_ALTPATH,
+       __PAF_MAX,
+};
+
+struct pkg_alternative {
+       int prio;
+       char *path;
+       char *altpath;
+};
+
+struct pkg_alternatives {
+       int nalts;
+       struct pkg_alternative **alts;
+};
+
 /* XXX: CLEANUP: I'd like to clean up pkg_t in several ways:
 
    The 3 version fields should go into a single version struct. (This