1 /* pkg_depends.h - the opkg package management system
5 Copyright (C) 2002 Compaq Computer Corporation
7 This program is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public License as
9 published by the Free Software Foundation; either version 2, or (at
10 your option) any later version.
12 This program is distributed in the hope that it will be useful, but
13 WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 General Public License for more details.
32 typedef enum depend_type depend_type_t
;
34 enum version_constraint
{
42 typedef enum version_constraint version_constraint_t
;
45 version_constraint_t constraint
;
49 typedef struct depend depend_t
;
51 struct compound_depend
{
53 int possibility_count
;
54 struct depend
** possibilities
;
56 typedef struct compound_depend compound_depend_t
;
58 void buildProvides(abstract_pkg_t
* ab_pkg
, pkg_t
* pkg
);
59 void buildConflicts(pkg_t
* pkg
);
60 void buildReplaces(abstract_pkg_t
* ab_pkg
, pkg_t
* pkg
);
61 void buildDepends(pkg_t
* pkg
);
64 * pkg_replaces returns 1 if pkg->replaces contains one of replacee's provides and 0
67 int pkg_replaces(pkg_t
*pkg
, pkg_t
*replacee
);
70 * pkg_conflicts_abstract returns 1 if pkg->conflicts contains conflictee provides and 0
73 int pkg_conflicts_abstract(pkg_t
*pkg
, abstract_pkg_t
*conflicts
);
76 * pkg_conflicts returns 1 if pkg->conflicts contains one of conflictee's provides and 0
79 int pkg_conflicts(pkg_t
*pkg
, pkg_t
*conflicts
);
81 char *pkg_depend_str(pkg_t
*pkg
, int index
);
82 void buildDependedUponBy(pkg_t
* pkg
, abstract_pkg_t
* ab_pkg
);
83 int version_constraints_satisfied(depend_t
* depends
, pkg_t
* pkg
);
84 int pkg_hash_fetch_unsatisfied_dependencies(pkg_t
* pkg
, pkg_vec_t
*depends
, char *** unresolved
);
85 pkg_vec_t
* pkg_hash_fetch_conflicts(pkg_t
* pkg
);
86 int pkg_dependence_satisfiable(depend_t
*depend
);
87 int pkg_dependence_satisfied(depend_t
*depend
);
88 const char* constraint_to_str(enum version_constraint c
);