From b739fb5bbdf2378b3e8d571df396c665af61a02d Mon Sep 17 00:00:00 2001 From: Michael Schroeder Date: Wed, 1 Jul 2009 10:32:28 +0200 Subject: - only add selfprovides if name is set - add ARCH_ALL --- ext/repo_content.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'ext/repo_content.c') diff --git a/ext/repo_content.c b/ext/repo_content.c index 6f7a877..5d88ca4 100644 --- a/ext/repo_content.c +++ b/ext/repo_content.c @@ -376,7 +376,9 @@ repo_add_content(Repo *repo, FILE *fp, int flags) /* finish old solvable */ if (!s->arch) s->arch = ARCH_NOARCH; - if (s->arch != ARCH_SRC && s->arch != ARCH_NOSRC) + if (!s->evr) + s->evr = ID_EMPTY; + if (s->name && s->arch != ARCH_SRC && s->arch != ARCH_NOSRC) s->provides = repo_addid_dep(repo, s->provides, rel2id(pool, s->name, s->evr, REL_EQ, 1), 0); if (code10) s->supplements = repo_fix_supplements(repo, s->provides, s->supplements, 0); @@ -514,7 +516,9 @@ repo_add_content(Repo *repo, FILE *fp, int flags) if (!s->arch) s->arch = ARCH_NOARCH; - if (s->arch != ARCH_SRC && s->arch != ARCH_NOSRC) + if (!s->evr) + s->evr = ID_EMPTY; + if (s->name && s->arch != ARCH_SRC && s->arch != ARCH_NOSRC) s->provides = repo_addid_dep(repo, s->provides, rel2id(pool, s->name, s->evr, REL_EQ, 1), 0); if (code10) s->supplements = repo_fix_supplements(repo, s->provides, s->supplements, 0); @@ -530,7 +534,7 @@ repo_add_content(Repo *repo, FILE *fp, int flags) p->arch = otherarchs[i]; /* self provides */ - if (p->arch != ARCH_SRC && p->arch != ARCH_NOSRC) + if (s->name && p->arch != ARCH_SRC && p->arch != ARCH_NOSRC) p->provides = repo_addid_dep(repo, p->provides, rel2id(pool, p->name, p->evr, REL_EQ, 1), 0); /* now merge the attributes */ -- cgit v1.2.3