[zypp-commit] r10874 - /trunk/sat-solver/tools/repo_content.c
Author: kkaempf Date: Fri Aug 15 16:28:52 2008 New Revision: 10874 URL: http://svn.opensuse.org/viewcvs/zypp?rev=10874&view=rev Log: ensure existance of product solvable (bnc#417594) Modified: trunk/sat-solver/tools/repo_content.c Modified: trunk/sat-solver/tools/repo_content.c URL: http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/tools/repo_content.c?rev=10874&r1=10873&r2=10874&view=diff ============================================================================== --- trunk/sat-solver/tools/repo_content.c (original) +++ trunk/sat-solver/tools/repo_content.c Fri Aug 15 16:28:52 2008 @@ -238,7 +238,7 @@ for (;;) { char *fields[2]; - + /* read line into big-enough buffer */ if (linep - line + 16 > aline) { @@ -279,12 +279,6 @@ contentstyle = 10; } - if (code11 && istag ("REFERENCES")) - { - repo_set_id(repo, s - pool->solvables, PRODUCT_REFERENCES, str2id(pool, value, 1)); - continue; - } - if ((code10 && istag ("PRODUCT")) || (code11 && istag ("NAME"))) { @@ -306,7 +300,7 @@ continue; } - /* Sometimes PRODUCT is not the first entry, but we need a solvable + /* Sometimes PRODUCT/NAME is not the first entry, but we need a solvable from here on. */ if (!s) { @@ -314,11 +308,11 @@ repodata_extend(data, s - pool->solvables); handle = repodata_get_handle(data, s - pool->solvables - repo->start); } - if (istag ("VERSION")) - { - /* without a release? but that's like zypp implements it */ - s->evr = makeevr(pool, value); - } + + if (code11 && istag ("REFERENCES")) + repo_set_id(repo, s - pool->solvables, PRODUCT_REFERENCES, str2id(pool, value, 1)); + else if (istag ("VERSION")) + s->evr = makeevr(pool, value); else if (code11 && istag ("DISTRIBUTION")) repo_set_str(repo, s - pool->solvables, SOLVABLE_DISTRIBUTION, value); else if (code11 && istag ("FLAVOR")) @@ -342,9 +336,7 @@ else if (istag ("RELNOTESURL")) repodata_add_poolstr_array(data, handle, PRODUCT_RELNOTESURL, value); else if (istag ("VENDOR")) - { - s->vendor = str2id(pool, value, 1); - } + s->vendor = str2id(pool, value, 1); /* * Every tag below is Code10 only -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org
participants (1)
-
kkaempf@svn.opensuse.org