X-Git-Url: https://git.librecmc.org/?p=oweals%2Fopkg-lede.git;a=blobdiff_plain;f=libopkg%2Fpkg_depends.h;h=5d1f07486b31ee9dd47f0f5c2d22956d3db9dc80;hp=462a4db3e2484dfeddedb93f1acb124c67e99f7d;hb=9f844972a38896fc97db293c3305c11c4229e2de;hpb=3523443344809d2f357a5008931c9f79e91a3de3 diff --git a/libopkg/pkg_depends.h b/libopkg/pkg_depends.h index 462a4db..5d1f074 100644 --- a/libopkg/pkg_depends.h +++ b/libopkg/pkg_depends.h @@ -1,7 +1,7 @@ /* pkg_depends.h - the opkg package management system Steven M. Ayer - + Copyright (C) 2002 Compaq Computer Corporation This program is free software; you can redistribute it and/or @@ -20,7 +20,6 @@ #include "pkg.h" #include "pkg_hash.h" -#include "includes.h" enum depend_type { PREDEPEND, @@ -48,7 +47,7 @@ struct depend{ abstract_pkg_t * pkg; }; typedef struct depend depend_t; - + struct compound_depend{ depend_type_t type; int possibility_count; @@ -56,24 +55,10 @@ struct compound_depend{ }; typedef struct compound_depend compound_depend_t; -#include "hash_table.h" - -int buildProvides(hash_table_t * hash, abstract_pkg_t * ab_pkg, pkg_t * pkg); -int buildConflicts(hash_table_t * hash, abstract_pkg_t * ab_pkg, pkg_t * pkg); -int buildReplaces(hash_table_t * hash, abstract_pkg_t * ab_pkg, pkg_t * pkg); -int buildDepends(hash_table_t * hash, pkg_t * pkg); - -/** - * pkg_has_common_provides returns 1 if pkg and replacee both provide - * the same abstract package and 0 otherwise. - */ -int pkg_has_common_provides(pkg_t *pkg, pkg_t *replacee); - -/** - * pkg_provides returns 1 if pkg->provides contains providee and 0 - * otherwise. - */ -int pkg_provides_abstract(pkg_t *pkg, abstract_pkg_t *providee); +void buildProvides(abstract_pkg_t * ab_pkg, pkg_t * pkg); +void buildConflicts(pkg_t * pkg); +void buildReplaces(abstract_pkg_t * ab_pkg, pkg_t * pkg); +void buildDepends(pkg_t * pkg); /** * pkg_replaces returns 1 if pkg->replaces contains one of replacee's provides and 0 @@ -95,12 +80,11 @@ int pkg_conflicts(pkg_t *pkg, pkg_t *conflicts); char *pkg_depend_str(pkg_t *pkg, int index); void buildDependedUponBy(pkg_t * pkg, abstract_pkg_t * ab_pkg); -void freeDepends(pkg_t *pkg); -void printDepends(pkg_t * pkg); int version_constraints_satisfied(depend_t * depends, pkg_t * pkg); -int pkg_hash_fetch_unsatisfied_dependencies(opkg_conf_t *conf, pkg_t * pkg, pkg_vec_t *depends, char *** unresolved); -pkg_vec_t * pkg_hash_fetch_conflicts(hash_table_t * hash, pkg_t * pkg); -int pkg_dependence_satisfiable(opkg_conf_t *conf, depend_t *depend); -int pkg_dependence_satisfied(opkg_conf_t *conf, depend_t *depend); +int pkg_hash_fetch_unsatisfied_dependencies(pkg_t * pkg, pkg_vec_t *depends, char *** unresolved); +pkg_vec_t * pkg_hash_fetch_conflicts(pkg_t * pkg); +int pkg_dependence_satisfiable(depend_t *depend); +int pkg_dependence_satisfied(depend_t *depend); +const char* constraint_to_str(enum version_constraint c); #endif