Mailinglist Archive: zypp-commit (223 mails)

< Previous Next >
[zypp-commit] r10526 - in /trunk/sat-solver: package/libsatsolver.changes tools/repo_content.c
  • From: mlandres@xxxxxxxxxxxxxxxx
  • Date: Wed, 09 Jul 2008 14:35:30 -0000
  • Message-id: <20080709143530.DCC272F127@xxxxxxxxxxxxxxxx>
Author: mlandres
Date: Wed Jul 9 16:35:30 2008
New Revision: 10526

URL: http://svn.opensuse.org/viewcvs/zypp?rev=10526&view=rev
Log:
- Fix repo_content dependency parsing. Parser may lose up to
two trailing dependencies.

Modified:
trunk/sat-solver/package/libsatsolver.changes
trunk/sat-solver/tools/repo_content.c

Modified: trunk/sat-solver/package/libsatsolver.changes
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/package/libsatsolver.changes?rev=10526&r1=10525&r2=10526&view=diff
==============================================================================
--- trunk/sat-solver/package/libsatsolver.changes (original)
+++ trunk/sat-solver/package/libsatsolver.changes Wed Jul 9 16:35:30 2008
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Wed Jul 9 16:25:36 CEST 2008 - ma@xxxxxxx
+
+- Fix repo_content dependency parsing. Parser may lose up to
+ two trailing dependencies.
+
+-------------------------------------------------------------------
Tue Jul 1 14:54:38 CEST 2008 - kkaempf@xxxxxxx

- rename language bindings to {perl,python,ruby}-satsolver

Modified: trunk/sat-solver/tools/repo_content.c
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/tools/repo_content.c?rev=10526&r1=10525&r2=10526&view=diff
==============================================================================
--- trunk/sat-solver/tools/repo_content.c (original)
+++ trunk/sat-solver/tools/repo_content.c Wed Jul 9 16:35:30 2008
@@ -110,8 +110,11 @@
while (1)
{
/* Name [relop evr] [rest] --> 1, 2, 3 or 4 fields. */
- words += split(line, sp + words, 4 - words);
- line = 0;
+ if ( line )
+ {
+ words += split(line, sp + words, 4 - words);
+ line = 0;
+ }
/* Hack, as the content file adds 'package:' for package
dependencies sometimes. */
if (!strncmp (sp[0], "package:", 8))
@@ -131,7 +134,8 @@
id = rel2id(pool, id, evrid, flags + 1, 1);
/* Consume three words, there's nothing to move to front. */
if (words == 4)
- line = sp[3], words = 0;
+ line = sp[3];
+ words = 0;
}
else
{
@@ -144,7 +148,7 @@
line = sp[2], words = 2;
}
olddeps = repo_addid_dep(pd->repo, olddeps, id, marker);
- if (!line)
+ if (! ( line || words > 0 ) )
break;
}
return olddeps;

--
To unsubscribe, e-mail: zypp-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages