summaryrefslogtreecommitdiff
path: root/ext/repo_content.c
diff options
context:
space:
mode:
authorMichael Schroeder <mls@suse.de>2009-07-01 10:32:28 +0200
committerMichael Schroeder <mls@suse.de>2009-07-01 10:32:28 +0200
commitb739fb5bbdf2378b3e8d571df396c665af61a02d (patch)
tree09b3996ffc69643d7d6b3a17fe80ad948351237f /ext/repo_content.c
parent1ef91b64f728cd29a57023c057e92354a74097c3 (diff)
downloadlibsolv-b739fb5bbdf2378b3e8d571df396c665af61a02d.tar.gz
libsolv-b739fb5bbdf2378b3e8d571df396c665af61a02d.tar.bz2
libsolv-b739fb5bbdf2378b3e8d571df396c665af61a02d.zip
- only add selfprovides if name is set
- add ARCH_ALL
Diffstat (limited to 'ext/repo_content.c')
-rw-r--r--ext/repo_content.c10
1 files changed, 7 insertions, 3 deletions
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 */