summaryrefslogtreecommitdiff
path: root/src/repo.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/repo.h')
-rw-r--r--src/repo.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/repo.h b/src/repo.h
index 4abfb0f..58704f1 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)
{
@@ -125,6 +123,14 @@ static inline int pool_installable(const Pool *pool, Solvable *s)
return 1;
}
+/* not in solvable.h because we need the repo definition */
+static inline Solvable *solvable_free(Solvable *s, int reuseids)
+{
+ if (s && s->repo)
+ repo_free_solvable(s->repo, s - s->repo->pool->solvables, reuseids);
+ return 0;
+}
+
/* search callback values */
#define SEARCH_NEXT_KEY 1
#define SEARCH_NEXT_SOLVABLE 2