CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
Bumped version to 5.30.0.
[pkgutils-cross.git] / pkgadd.h
index 46e0f1bef99dcc62e2465cc529b05d86107352aa..c69aab9513f4c512c69d5523023f932d88922139 100644 (file)
--- a/pkgadd.h
+++ b/pkgadd.h
 #define PKGADD_CONF             "/etc/pkgadd.conf"
 #define PKGADD_CONF_MAXLINE     1024
 
+enum rule_event_t {
+       UPGRADE,
+       INSTALL
+};
+
 struct rule_t {
-       enum { UPGRADE } event;
+       rule_event_t event;
        string pattern;
        bool action;
 };
@@ -44,6 +49,9 @@ public:
 private:
        vector<rule_t> read_config() const;
        set<string> make_keep_list(const set<string>& files, const vector<rule_t>& rules) const;
+       set<string> apply_install_rules(const string& name, pkginfo_t& info, const vector<rule_t>& rules);
+       void find_rules(const vector<rule_t>& rules, rule_event_t event, vector<rule_t>& found) const;
+       bool rule_applies_to_file(const rule_t& rule, const string& file) const;
 };
 
 #endif /* PKGADD_H */