ref: refs/heads/master
commit ad059b0e3713e21fd192ed47a7a0baa1f548c5f2
Author: Michael Schroeder
Date: Wed Jul 15 14:04:42 2009 +0200
- be more backward compatible
---
ext/repo_susetags.c | 47 +++++++++++++++++++++++++----------------------
1 files changed, 25 insertions(+), 22 deletions(-)
diff --git a/ext/repo_susetags.c b/ext/repo_susetags.c
index e73afed..db4a590 100644
--- a/ext/repo_susetags.c
+++ b/ext/repo_susetags.c
@@ -637,19 +637,7 @@ repo_add_susetags(Repo *repo, FILE *fp, Id defvendor, const char *language, int
s = 0;
freshens = 0;
- if (!joinhash)
- {
- /* normal operation. create a new solvable. */
- s = pool_id2solvable(pool, repo_add_solvable(repo));
- if (pd.kind)
- s->name = str2id(pool, join2(pd.kind, ":", sp[0]), 1);
- else
- s->name = str2id(pool, sp[0], 1);
- s->evr = makeevr(pool, join2(sp[1], "-", sp[2]));
- s->arch = str2id(pool, sp[3], 1);
- s->vendor = defvendor;
- }
- else
+ if (joinhash)
{
/* data join operation. find solvable matching name/arch/evr and
* add data to it */
@@ -661,19 +649,34 @@ repo_add_susetags(Repo *repo, FILE *fp, Id defvendor, const char *language, int
name = str2id(pool, sp[0], 0);
evr = makeevr(pool, join2(sp[1], "-", sp[2]));
arch = str2id(pool, sp[3], 0);
- if (!name || !arch)
- continue; /* ids didn't exist */
- if (repo->start + last_found_pack + 1 < repo->end)
+ if (name && arch)
{
- s = pool->solvables + repo->start + last_found_pack + 1;
- if (s->repo != repo || s->name != name || s->evr != evr || s->arch != arch)
- s = 0;
+ if (repo->start + last_found_pack + 1 < repo->end)
+ {
+ s = pool->solvables + repo->start + last_found_pack + 1;
+ if (s->repo != repo || s->name != name || s->evr != evr || s->arch != arch)
+ s = 0;
+ }
+ if (!s)
+ s = joinhash_lookup(repo, joinhash, joinhashm, name, evr, arch);
}
- if (!s)
- s = joinhash_lookup(repo, joinhash, joinhashm, name, evr, arch);
- if (!s)
+ if (!s && (flags & REPO_EXTEND_SOLVABLES) != 0)
continue;
+ /* fallthrough to package creation */
}
+ if (!s)
+ {
+ /* normal operation. create a new solvable. */
+ s = pool_id2solvable(pool, repo_add_solvable(repo));
+ if (pd.kind)
+ s->name = str2id(pool, join2(pd.kind, ":", sp[0]), 1);
+ else
+ s->name = str2id(pool, sp[0], 1);
+ s->evr = makeevr(pool, join2(sp[1], "-", sp[2]));
+ s->arch = str2id(pool, sp[3], 1);
+ s->vendor = defvendor;
+ }
+ else
last_found_pack = (s - pool->solvables) - repo->start;
if (data)
handle = s - pool->solvables;
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org
For additional commands, e-mail: zypp-commit+help@opensuse.org