summaryrefslogtreecommitdiff
path: root/src/package.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2015-12-10 14:30:57 +0200
committerTimo Teräs <timo.teras@iki.fi>2015-12-10 14:30:57 +0200
commit2a066169bd60419576f065fbe3532d671dabb085 (patch)
tree9cca9d34564339fcb0c3a4d1ef233a42e1e610a4 /src/package.c
parent8a41fd98a420dacb1390af553e6e3c56a3580bc1 (diff)
downloadapk-tools-2a066169bd60419576f065fbe3532d671dabb085.tar.gz
apk-tools-2a066169bd60419576f065fbe3532d671dabb085.tar.bz2
apk-tools-2a066169bd60419576f065fbe3532d671dabb085.tar.xz
apk-tools-2a066169bd60419576f065fbe3532d671dabb085.zip
commit: self-conflict error and satisfies printing
- self-conflicts when the exact same version of a name is provided twice is now properly detected and diagnozed - don't print redundant satisfies diagnostic
Diffstat (limited to 'src/package.c')
-rw-r--r--src/package.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/package.c b/src/package.c
index 32b218a..d6eff07 100644
--- a/src/package.c
+++ b/src/package.c
@@ -1171,6 +1171,7 @@ void apk_pkg_foreach_matching_dependency(
void *ctx)
{
unsigned int genid = match & APK_FOREACH_GENID_MASK;
+ unsigned int one_dep_only = genid && !(match & APK_FOREACH_DEP);
struct apk_dependency *d;
if (pkg && genid) {
@@ -1182,8 +1183,7 @@ void apk_pkg_foreach_matching_dependency(
foreach_array_item(d, deps) {
if (apk_dep_analyze(d, mpkg) & match) {
cb(pkg, d, mpkg, ctx);
- if (genid)
- break;
+ if (one_dep_only) break;
}
}
}
@@ -1195,9 +1195,10 @@ static void foreach_reverse_dependency(
void cb(struct apk_package *pkg0, struct apk_dependency *dep0, struct apk_package *pkg, void *ctx),
void *ctx)
{
- unsigned int installed = match & APK_FOREACH_INSTALLED;
- unsigned int marked = match & APK_FOREACH_MARKED;
unsigned int genid = match & APK_FOREACH_GENID_MASK;
+ unsigned int marked = match & APK_FOREACH_MARKED;
+ unsigned int installed = match & APK_FOREACH_INSTALLED;
+ unsigned int one_dep_only = genid && !(match & APK_FOREACH_DEP);
struct apk_name **pname0, *name0;
struct apk_provider *p0;
struct apk_package *pkg0;
@@ -1219,8 +1220,7 @@ static void foreach_reverse_dependency(
foreach_array_item(d0, pkg0->depends) {
if (apk_dep_analyze(d0, pkg) & match) {
cb(pkg0, d0, pkg, ctx);
- if (genid)
- break;
+ if (one_dep_only) break;
}
}
}