diff options
author | Timo Teräs <timo.teras@iki.fi> | 2012-02-24 15:50:39 +0200 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2012-02-24 16:31:40 +0200 |
commit | 99145e2c0dc0b5b3b5a2a72fb1bff140d1f583f3 (patch) | |
tree | 37eb5b28d99600d3b310e502218dbc8167adf986 /src/fetch.c | |
parent | 97d44b5a002b61c7b95303bb8616f1caa6556bca (diff) | |
download | apk-tools-99145e2c0dc0b5b3b5a2a72fb1bff140d1f583f3.tar.gz apk-tools-99145e2c0dc0b5b3b5a2a72fb1bff140d1f583f3.tar.bz2 apk-tools-99145e2c0dc0b5b3b5a2a72fb1bff140d1f583f3.tar.xz apk-tools-99145e2c0dc0b5b3b5a2a72fb1bff140d1f583f3.zip |
all: introduce apk_provides and use it in apk_name
in preparation for provides support. implements also some
dependency satisfaction helper routines.
ref #574.
Diffstat (limited to 'src/fetch.c')
-rw-r--r-- | src/fetch.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/fetch.c b/src/fetch.c index a9f2031..325249d 100644 --- a/src/fetch.c +++ b/src/fetch.c @@ -202,12 +202,12 @@ static int fetch_main(void *ctx, struct apk_database *db, int argc, char **argv) } else { struct apk_package *pkg = NULL; - for (j = 0; j < dep.name->pkgs->num; j++) + for (j = 0; j < dep.name->providers->num; j++) if (pkg == NULL || - apk_pkg_version_compare(dep.name->pkgs->item[j], + apk_pkg_version_compare(dep.name->providers->item[j].pkg, pkg) == APK_VERSION_GREATER) - pkg = dep.name->pkgs->item[j]; + pkg = dep.name->providers->item[j].pkg; if (pkg == NULL) { apk_message("Unable to get '%s'", dep.name->name); |