Mailinglist Archive: zypp-commit (266 mails)

< Previous Next >
[zypp-commit] r11733 - in /trunk/sat-solver: package/libsatsolver.changes tools/repo_repomdxml.c
  • From: dmacvicar@xxxxxxxxxxxxxxxx
  • Date: Thu, 20 Nov 2008 09:32:45 -0000
  • Message-id: <20081120093246.08A93DF6A4@xxxxxxxxxxxxxxxx>
Author: dmacvicar
Date: Thu Nov 20 10:32:45 2008
New Revision: 11733

URL: http://svn.opensuse.org/viewcvs/zypp?rev=11733&view=rev
Log:
handle new rpmmd extensions

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

Modified: trunk/sat-solver/package/libsatsolver.changes
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/package/libsatsolver.changes?rev=11733&r1=11732&r2=11733&view=diff
==============================================================================
--- trunk/sat-solver/package/libsatsolver.changes (original)
+++ trunk/sat-solver/package/libsatsolver.changes Thu Nov 20 10:32:45 2008
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Thu Nov 20 10:32:01 CET 2008 - dmacvicar@xxxxxxx
+
+- support content, distro and updates tag properly
+- remove the unused products tag
+
+-------------------------------------------------------------------
Mon Nov 17 14:30:08 CET 2008 - ma@xxxxxxx

- Parse RELEASE tag from contentfile (bnc #444978)

Modified: trunk/sat-solver/tools/repo_repomdxml.c
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/tools/repo_repomdxml.c?rev=11733&r1=11732&r2=11733&view=diff
==============================================================================
--- trunk/sat-solver/tools/repo_repomdxml.c (original)
+++ trunk/sat-solver/tools/repo_repomdxml.c Thu Nov 20 10:32:45 2008
@@ -91,8 +91,6 @@
/* extension tags */
STATE_SUSEINFO,
STATE_EXPIRE,
- STATE_PRODUCTS,
- STATE_PRODUCT,
STATE_KEYWORDS,
STATE_KEYWORD,
/* normal repomd.xml */
@@ -101,6 +99,7 @@
STATE_TAGS,
STATE_CONTENT,
STATE_DISTRO,
+ STATE_UPDATES,
STATE_DATA,
STATE_LOCATION,
STATE_CHECKSUM,
@@ -120,11 +119,12 @@
static struct stateswitch stateswitches[] = {
/* suseinfo tags */
{ STATE_START, "repomd", STATE_REPOMD, 0 },
- { STATE_START, "suseinfo", STATE_SUSEINFO, 0 },
+ { STATE_START, "suseinfo", STATE_SUSEINFO, 0 },
+ /* we support the tags element in suseinfo in case
+ createrepo version does not support it yet */
+ { STATE_SUSEINFO, "tags", STATE_TAGS, 0 },
{ STATE_SUSEINFO, "expire", STATE_EXPIRE, 1 },
- { STATE_SUSEINFO, "products", STATE_PRODUCTS, 0 },
{ STATE_SUSEINFO, "keywords", STATE_KEYWORDS, 0 },
- { STATE_PRODUCTS, "id", STATE_PRODUCT, 1 },
/* keywords is the suse extension equivalent of
tags/content when this one was not yet available.
therefore we parse both */
@@ -136,6 +136,8 @@

{ STATE_TAGS, "content", STATE_CONTENT, 1 },
{ STATE_TAGS, "distro", STATE_DISTRO, 1 },
+ /* this tag is only valid in suseinfo.xml for now */
+ { STATE_TAGS, "updates", STATE_UPDATES, 1 },

{ STATE_DATA, "location", STATE_LOCATION, 0 },
{ STATE_DATA, "checksum", STATE_CHECKSUM, 1 },
@@ -249,8 +251,6 @@
}
case STATE_SUSEINFO: break;
case STATE_EXPIRE: break;
- case STATE_PRODUCTS: break;
- case STATE_PRODUCT: break;
case STATE_KEYWORDS: break;
case STATE_KEYWORD: break;
case STATE_CONTENT: break;
@@ -267,6 +267,18 @@
repodata_set_poolstr(pd->data, pd->rphandle,
REPOSITORY_PRODUCT_CPEID, cpeid);
break;
}
+ case STATE_UPDATES:
+ {
+ /* this is extra metadata about the product this repository
+ was designed for */
+ const char *cpeid = find_attr("cpeid", atts);
+ pd->ruhandle = repodata_new_handle(pd->data);
+ /* set the cpeid for the product
+ the label is set in the content of the tag */
+ if (cpeid)
+ repodata_set_poolstr(pd->data, pd->ruhandle,
REPOSITORY_UPDATE_CPEID, cpeid);
+ break;
+ }
case STATE_DATA: break;
case STATE_LOCATION: break;
case STATE_CHECKSUM: break;
@@ -328,10 +340,6 @@
repodata_set_num(pd->data, SOLVID_META, REPOSITORY_EXPIRE, expire);
break;
}
- case STATE_PRODUCT:
- if (pd->content)
- repodata_add_poolstr_array(pd->data, SOLVID_META, REPOSITORY_PRODUCTS,
pd->content);
- break;
/* repomd.xml content and suseinfo.xml keywords are equivalent */
case STATE_CONTENT:
case STATE_KEYWORD:
@@ -349,8 +357,14 @@
repodata_set_str(pd->data, pd->rphandle, REPOSITORY_PRODUCT_LABEL,
pd->content);
repodata_add_flexarray(pd->data, SOLVID_META, REPOSITORY_PRODUCTS,
pd->rphandle);
break;
+ case STATE_UPDATES:
+ /* distro tag is used in suseinfo.xml to say the repo updates a product
+ however it s not yet a tag standarized for repomd.xml */
+ if (pd->content)
+ repodata_set_str(pd->data, pd->ruhandle, REPOSITORY_UPDATE_LABEL,
pd->content);
+ repodata_add_flexarray(pd->data, SOLVID_META, REPOSITORY_UPDATES,
pd->ruhandle);
+ break;
case STATE_SUSEINFO: break;
- case STATE_PRODUCTS: break;
case STATE_KEYWORDS: break;
case NUMSTATES: break;
default:

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

< Previous Next >
This Thread
  • No further messages