diff options
author | Timo Teräs <timo.teras@iki.fi> | 2011-01-01 16:04:42 +0200 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2011-01-01 16:04:42 +0200 |
commit | 65826761508d1b9effd62e7665d6db23b6fabe2f (patch) | |
tree | 24b2e7ef0f5d127f1bf4872dbf98922fd208e9b3 | |
parent | 59d222d58c003f4eb564edcc1d01c5b40690938c (diff) | |
download | apk-tools-65826761508d1b9effd62e7665d6db23b6fabe2f.tar.gz apk-tools-65826761508d1b9effd62e7665d6db23b6fabe2f.tar.bz2 apk-tools-65826761508d1b9effd62e7665d6db23b6fabe2f.tar.xz apk-tools-65826761508d1b9effd62e7665d6db23b6fabe2f.zip |
various: use APK_DEPMASK_REQUIRE where applicable
.. instead of the longer flag combo.
-rw-r--r-- | src/package.c | 2 | ||||
-rw-r--r-- | src/upgrade.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/package.c b/src/package.c index d79fc4a..dfd9cc9 100644 --- a/src/package.c +++ b/src/package.c @@ -193,7 +193,7 @@ int apk_dep_from_blob(struct apk_dependency *dep, struct apk_database *db, { struct apk_name *name; apk_blob_t bname, bop, bver = APK_BLOB_NULL; - int mask = APK_VERSION_LESS | APK_VERSION_EQUAL | APK_VERSION_GREATER; + int mask = APK_DEPMASK_REQUIRE; /* [!]name[<,<=,=,>=,>]ver */ if (blob.ptr[0] == '!') { diff --git a/src/upgrade.c b/src/upgrade.c index 8763cb2..795e62f 100644 --- a/src/upgrade.c +++ b/src/upgrade.c @@ -43,7 +43,7 @@ int apk_do_self_upgrade(struct apk_database *db, struct apk_state *state) if (dep0->name != dep.name) continue; dep0->version = apk_blob_atomize(APK_BLOB_NULL); - dep0->result_mask = APK_VERSION_EQUAL | APK_VERSION_LESS | APK_VERSION_GREATER; + dep0->result_mask = APK_DEPMASK_REQUIRE; break; } } @@ -94,7 +94,7 @@ static int upgrade_main(void *ctx, struct apk_database *db, int argc, char **arg struct apk_dependency *dep = &db->world->item[i]; if (dep->version != null_atom && (apk_flags & APK_PREFER_AVAILABLE)) { - dep->result_mask = APK_VERSION_EQUAL | APK_VERSION_LESS | APK_VERSION_GREATER; + dep->result_mask = APK_DEPMASK_REQUIRE; dep->version = null_atom; } if (dep->name->pkgs->num != 0) |