opkg: correct the name of the state changed callback and run it when appropriate
[oweals/opkg-lede.git] / pkg.h
diff --git a/pkg.h b/pkg.h
index 1bb4a4c2112a6680913317c04fd8e26dd1ddfae5..ffb969b613fc91f9b03691424870ae62ab2e6933 100644 (file)
--- a/pkg.h
+++ b/pkg.h
@@ -176,6 +176,10 @@ struct pkg
      int arch_priority;
 /* Adding this flag, to "force" opkg to choose a "provided_by_hand" package, if there are multiple choice */
      int provided_by_hand;
+
+     /* this flag specifies whether the package was installed to satisfy another
+      * package's dependancies */
+     int auto_installed;
 };
 
 pkg_t *pkg_new(void);
@@ -216,9 +220,9 @@ int pkg_run_script(struct opkg_conf *conf, pkg_t *pkg,
 char *pkg_state_want_to_str(pkg_state_want_t sw);
 pkg_state_want_t pkg_state_want_from_str(char *str);
 char *pkg_state_flag_to_str(pkg_state_flag_t sf);
-pkg_state_flag_t pkg_state_flag_from_str(char *str);
+pkg_state_flag_t pkg_state_flag_from_str(const char *str);
 char *pkg_state_status_to_str(pkg_state_status_t ss);
-pkg_state_status_t pkg_state_status_from_str(char *str);
+pkg_state_status_t pkg_state_status_from_str(const char *str);
 
 int pkg_version_satisfied(pkg_t *it, pkg_t *ref, const char *op);