From: Michael Schroeder Date: Thu, 22 Nov 2018 11:04:45 +0000 (+0100) Subject: Allow arch == NULL packages if arch testing is disabled X-Git-Tag: 0.7.2~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=16681c8a373946c9ac0af02a8f515d3f3e7d69a5;p=thirdparty%2Flibsolv.git Allow arch == NULL packages if arch testing is disabled --- diff --git a/src/repo.h b/src/repo.h index 4abfb0f8..e4bab443 100644 --- a/src/repo.h +++ b/src/repo.h @@ -101,20 +101,18 @@ static inline int pool_disabled_solvable(const Pool *pool, Solvable *s) static inline int pool_badarch_solvable(const Pool *pool, Solvable *s) { - if (!s->arch) - return 1; - if (pool->id2arch && pool_arch2score(pool, s->arch) == 0) + if (pool->id2arch && (!s->arch || pool_arch2score(pool, s->arch) == 0)) return 1; return 0; } static inline int pool_installable(const Pool *pool, Solvable *s) { - if (!s->arch || s->arch == ARCH_SRC || s->arch == ARCH_NOSRC) + if (s->arch == ARCH_SRC || s->arch == ARCH_NOSRC) return 0; if (s->repo && s->repo->disabled) return 0; - if (pool->id2arch && pool_arch2score(pool, s->arch) == 0) + if (pool->id2arch && (!s->arch || pool_arch2score(pool, s->arch) == 0)) return 0; if (pool->considered) {