]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
Allow arch == NULL packages if arch testing is disabled
authorMichael Schroeder <mls@suse.de>
Thu, 22 Nov 2018 11:04:45 +0000 (12:04 +0100)
committerMichael Schroeder <mls@suse.de>
Thu, 22 Nov 2018 11:51:44 +0000 (12:51 +0100)
src/repo.h

index 4abfb0f8b626e7cc4fba24ffe0dce008e956c8d2..e4bab44345fa7bb2d17f68319caaed58895ea699 100644 (file)
@@ -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)
     {