summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Andres <ma@suse.de>2008-10-02 16:49:48 +0000
committerMichael Andres <ma@suse.de>2008-10-02 16:49:48 +0000
commit5e339bb12bba48648aaed408222a8f0951a0cae6 (patch)
tree45a5cb1f3501820d5c0337393f153355882b7589
parentbb7870c29ccfe8d5a853c025f07f67b4b926b063 (diff)
downloadlibsolv-5e339bb12bba48648aaed408222a8f0951a0cae6.tar.gz
libsolv-5e339bb12bba48648aaed408222a8f0951a0cae6.tar.bz2
libsolv-5e339bb12bba48648aaed408222a8f0951a0cae6.zip
- Product arttributes: removed FLAVOR and REFERENCES, added PRODUCTLINE.
-rw-r--r--VERSION.cmake6
-rw-r--r--package/libsatsolver.changes7
-rw-r--r--src/knownid.h3
-rw-r--r--tools/repo_content.c6
-rw-r--r--tools/repo_products.c30
-rw-r--r--tools/repo_rpmmd.c66
6 files changed, 51 insertions, 67 deletions
diff --git a/VERSION.cmake b/VERSION.cmake
index cb95f45..c649fc7 100644
--- a/VERSION.cmake
+++ b/VERSION.cmake
@@ -45,7 +45,7 @@
#
SET(LIBSATSOLVER_MAJOR "0")
-SET(LIBSATSOLVER_MINOR "10")
-SET(LIBSATSOLVER_PATCH "17")
+SET(LIBSATSOLVER_MINOR "11")
+SET(LIBSATSOLVER_PATCH "0")
-# last released 0.10.16
+# last released 0.11.0
diff --git a/package/libsatsolver.changes b/package/libsatsolver.changes
index 41147ce..0d55f20 100644
--- a/package/libsatsolver.changes
+++ b/package/libsatsolver.changes
@@ -1,4 +1,11 @@
-------------------------------------------------------------------
+Thu Oct 2 18:46:55 CEST 2008 - ma@suse.de
+
+- Product arttributes: removed FLAVOR and REFERENCES, added PRODUCTLINE.
+- revision 11233
+- 0.11.0
+
+-------------------------------------------------------------------
Tue Sep 30 13:03:10 CEST 2008 - ma@suse.de
- repo_content.c: fix broken dependency parsing.
diff --git a/src/knownid.h b/src/knownid.h
index e3a847a..6faf9e5 100644
--- a/src/knownid.h
+++ b/src/knownid.h
@@ -154,8 +154,7 @@ KNOWNID(PRODUCT_TYPE, "product:type"),
KNOWNID(PRODUCT_URL, "product:url"),
KNOWNID(PRODUCT_URL_TYPE, "product:url:type"),
KNOWNID(PRODUCT_FLAGS, "product:flags"),
-KNOWNID(PRODUCT_FLAVOR, "product:flavor"),
-KNOWNID(PRODUCT_REFERENCES, "product:references"),
+KNOWNID(PRODUCT_PRODUCTLINE, "product:productline"),
KNOWNID(PRODUCT_UPDATEREPOKEY, "product:updaterepokey"),
KNOWNID(PRODUCT_REGISTER_TARGET, "product:regtarget"),
KNOWNID(PRODUCT_REGISTER_RELEASE, "product:regrelease"),
diff --git a/tools/repo_content.c b/tools/repo_content.c
index 1921d52..e11fb86 100644
--- a/tools/repo_content.c
+++ b/tools/repo_content.c
@@ -316,14 +316,10 @@ repo_add_content(Repo *repo, FILE *fp)
handle = repodata_get_handle(data, s - pool->solvables - repo->start);
}
- if (code11 && istag ("REFERENCES"))
- repo_set_id(repo, s - pool->solvables, PRODUCT_REFERENCES, str2id(pool, value, 1));
- else if (istag ("VERSION"))
+ 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"))
- repo_set_str(repo, s - pool->solvables, PRODUCT_FLAVOR, value);
else if (istag ("DATADIR"))
repo_set_str(repo, s - pool->solvables, SUSETAGS_DATADIR, value);
else if (istag ("UPDATEURLS"))
diff --git a/tools/repo_products.c b/tools/repo_products.c
index 5dad3c0..c60b727 100644
--- a/tools/repo_products.c
+++ b/tools/repo_products.c
@@ -54,8 +54,8 @@ enum state {
STATE_LANG, // 14
STATE_REGISTER, // 15
STATE_TARGET, // 16
- STATE_FLAVOR, // 17
STATE_REGRELEASE, // 18
+ STATE_PRODUCTLINE, // 19
NUMSTATES // 0
};
@@ -74,6 +74,7 @@ static struct stateswitch stateswitches[] = {
{ STATE_PRODUCT, "version", STATE_VERSION, 1 },
{ STATE_PRODUCT, "release", STATE_RELEASE, 1 },
{ STATE_PRODUCT, "arch", STATE_ARCH, 1 },
+ { STATE_PRODUCT, "productline", STATE_PRODUCTLINE, 1 },
{ STATE_PRODUCT, "summary", STATE_SUMMARY, 1 },
{ STATE_PRODUCT, "description", STATE_DESCRIPTION, 1 },
{ STATE_PRODUCT, "register", STATE_REGISTER, 0 },
@@ -81,10 +82,9 @@ static struct stateswitch stateswitches[] = {
{ STATE_PRODUCT, "runtimeconfig", STATE_RUNTIMECONFIG, 0 },
{ STATE_PRODUCT, "linguas", STATE_LINGUAS, 0 },
{ STATE_PRODUCT, "updaterepokey", STATE_UPDATEREPOKEY, 1 },
- { STATE_PRODUCT, "cpename", STATE_CPEID, 1 },
+ { STATE_PRODUCT, "cpename", STATE_CPEID, 1 },
{ STATE_URLS, "url", STATE_URL, 1 },
{ STATE_LINGUAS, "lang", STATE_LANG, 0 },
- { STATE_REGISTER, "flavor", STATE_FLAVOR, 1 },
{ STATE_REGISTER, "target", STATE_TARGET, 1 },
{ STATE_REGISTER, "release", STATE_REGRELEASE, 1 },
{ NUMSTATES }
@@ -308,6 +308,9 @@ endElement(void *userData, const char *name)
case STATE_ARCH:
s->arch = str2id(pd->pool, pd->content, 1);
break;
+ case STATE_PRODUCTLINE:
+ repodata_set_str(pd->data, pd->handle, PRODUCT_PRODUCTLINE, pd->content);
+ break;
case STATE_UPDATEREPOKEY:
repodata_set_str(pd->data, pd->handle, langtag(pd, PRODUCT_UPDATEREPOKEY, pd->tmplang), pd->content);
break;
@@ -336,15 +339,6 @@ endElement(void *userData, const char *name)
printf("%s\n", pd->content);
}
break;
- case STATE_FLAVOR:
- repodata_set_str(pd->data, pd->handle, PRODUCT_FLAVOR, pd->content);
- if (pd->currentproduct == pd->baseproduct
- && pd->attribute
- && !strcmp(pd->attribute, "register.flavor"))
- {
- printf("%s\n", pd->content);
- }
- break;
case STATE_REGRELEASE:
repodata_set_str(pd->data, pd->handle, PRODUCT_REGISTER_RELEASE, pd->content);
if (pd->currentproduct == pd->baseproduct
@@ -430,7 +424,7 @@ repo_add_product(struct parsedata *pd, Repodata *data, FILE *fp, int code11)
XML_SetUserData(parser, pd);
XML_SetElementHandler(parser, startElement, endElement);
XML_SetCharacterDataHandler(parser, characterData);
-
+
for (;;)
{
l = fread(buf, 1, sizeof(buf), fp);
@@ -462,7 +456,7 @@ repo_add_product(struct parsedata *pd, Repodata *data, FILE *fp, int code11)
*(buf + l) = 0;
}
++lnum;
-
+
if (lnum == 1)
{
/* 1st line, <name> [(<arch>)] */
@@ -474,7 +468,7 @@ repo_add_product(struct parsedata *pd, Repodata *data, FILE *fp, int code11)
}
else
ptr1 = buf + l - 1;
-
+
/* track back until non-blank, non-digit */
while (ptr1 > buf
&& (*ptr1 == ' ' || isdigit(*ptr1) || *ptr1 == '.'))
@@ -500,7 +494,7 @@ repo_add_product(struct parsedata *pd, Repodata *data, FILE *fp, int code11)
}
}
}
- else if (strncmp(buf, "VERSION", 7) == 0)
+ else if (strncmp(buf, "VERSION", 7) == 0)
{
ptr = strchr(buf+7, '=');
if (ptr)
@@ -642,11 +636,11 @@ repo_add_products(Repo *repo, Repodata *repodata, const char *proddir, const cha
}
}
}
-
+
sat_free((void *)pd.tmplang);
free(pd.content);
join_freemem();
-
+
}
/* EOF */
diff --git a/tools/repo_rpmmd.c b/tools/repo_rpmmd.c
index 3af2115..c77527f 100644
--- a/tools/repo_rpmmd.c
+++ b/tools/repo_rpmmd.c
@@ -49,7 +49,7 @@ enum state {
STATE_DOWNLOADSIZE,
STATE_INSTALLTIME,
STATE_INSTALLONLY,
-
+
/* Novell/SUSE extended attributes */
STATE_EULA,
STATE_KEYWORD,
@@ -81,8 +81,6 @@ enum state {
STATE_UPDATEURL,
STATE_OPTIONALURL,
STATE_FLAG,
- STATE_FLAVOR,
- STATE_REFERENCES,
/* rpm-md dependencies inside the
format tag */
@@ -135,7 +133,7 @@ static struct stateswitch stateswitches[] = {
{ STATE_START, "pattern", STATE_SOLVABLE, 0 },
{ STATE_START, "patch", STATE_SOLVABLE, 0 },
{ STATE_START, "package", STATE_SOLVABLE, 0 },
-
+
{ STATE_SOLVABLE, "name", STATE_NAME, 1 },
{ STATE_SOLVABLE, "arch", STATE_ARCH, 1 },
{ STATE_SOLVABLE, "version", STATE_VERSION, 0 },
@@ -143,7 +141,7 @@ static struct stateswitch stateswitches[] = {
// package attributes rpm-md
{ STATE_SOLVABLE, "location", STATE_LOCATION, 0 },
{ STATE_SOLVABLE, "checksum", STATE_CHECKSUM, 1 },
-
+
/* resobject attributes */
{ STATE_SOLVABLE, "summary", STATE_SUMMARY, 1 },
@@ -179,14 +177,12 @@ static struct stateswitch stateswitches[] = {
{ STATE_SOLVABLE, "update-url", STATE_UPDATEURL, 1 },
{ STATE_SOLVABLE, "optional-url", STATE_OPTIONALURL, 1 },
{ STATE_SOLVABLE, "flag", STATE_FLAG, 1 },
- { STATE_SOLVABLE, "flavor", STATE_FLAVOR, 1 },
- { STATE_SOLVABLE, "references", STATE_REFERENCES, 1 },
{ STATE_SOLVABLE, "rpm:vendor", STATE_VENDOR, 1 },
{ STATE_SOLVABLE, "rpm:group", STATE_RPM_GROUP, 1 },
{ STATE_SOLVABLE, "rpm:license", STATE_RPM_LICENSE, 1 },
- /* rpm-md dependencies */
+ /* rpm-md dependencies */
{ STATE_SOLVABLE, "rpm:provides", STATE_PROVIDES, 0 },
{ STATE_SOLVABLE, "rpm:requires", STATE_REQUIRES, 0 },
{ STATE_SOLVABLE, "rpm:obsoletes", STATE_OBSOLETES, 0 },
@@ -199,7 +195,7 @@ static struct stateswitch stateswitches[] = {
{ STATE_SOLVABLE, "rpm:sourcerpm", STATE_SOURCERPM, 1 },
{ STATE_SOLVABLE, "rpm:header-range", STATE_HEADERRANGE, 0 },
{ STATE_SOLVABLE, "file", STATE_FILE, 1 },
-
+
/* extended Novell/SUSE diskusage attributes (susedata.xml) */
{ STATE_DISKUSAGE, "dirs", STATE_DIRS, 0 },
{ STATE_DIRS, "dir", STATE_DIR, 0 },
@@ -213,7 +209,7 @@ static struct stateswitch stateswitches[] = {
{ STATE_SUGGESTS, "rpm:entry", STATE_SUGGESTSENTRY, 0 },
{ STATE_ENHANCES, "rpm:entry", STATE_ENHANCESENTRY, 0 },
{ STATE_FRESHENS, "rpm:entry", STATE_FRESHENSENTRY, 0 },
-
+
{ NUMSTATES}
};
@@ -343,7 +339,7 @@ commit_diskusage (struct parsedata *pd, unsigned handle)
/*
* makeevr_atts
* parse 'epoch', 'ver' and 'rel', return evr Id
- *
+ *
*/
static Id
@@ -418,7 +414,7 @@ makeevr_atts(Pool *pool, struct parsedata *pd, const char **atts)
* I: txt, name of attribute
* I: atts, list of key/value attributes
* O: pointer to value of matching key, or NULL
- *
+ *
*/
static inline const char *
@@ -450,7 +446,7 @@ static char *flagtab[] = {
/*
* adddep
* parse attributes to reldep Id
- *
+ *
*/
static unsigned int
@@ -485,8 +481,8 @@ adddep(Pool *pool, struct parsedata *pd, unsigned int olddeps, const char **atts
pd->content = sat_realloc(pd->content, l + 256);
pd->acontent = l + 256;
}
- sprintf(pd->content, "%s:%s", k, n);
- name = str2id(pool, pd->content, 1);
+ sprintf(pd->content, "%s:%s", k, n);
+ name = str2id(pool, pd->content, 1);
}
else
name = str2id(pool, (char *)n, 1);
@@ -522,27 +518,27 @@ set_desciption_author(Repodata *data, Id handle, char *str)
if (!str || !*str)
return;
for (aut = str; (aut = strchr(aut, '\n')) != 0; aut++)
- if (!strncmp(aut, "\nAuthors:\n--------\n", 19))
+ if (!strncmp(aut, "\nAuthors:\n--------\n", 19))
break;
if (aut)
{
/* oh my, found SUSE special author section */
- int l = aut - str;
- str[l] = 0;
+ int l = aut - str;
+ str[l] = 0;
while (l > 0 && str[l - 1] == '\n')
- str[--l] = 0;
+ str[--l] = 0;
if (l)
repodata_set_str(data, handle, SOLVABLE_DESCRIPTION, str);
p = aut + 19;
aut = str; /* copy over */
while (*p == ' ' || *p == '\n')
p++;
- while (*p)
+ while (*p)
{
if (*p == '\n')
{
*aut++ = *p++;
- while (*p == ' ')
+ while (*p == ' ')
p++;
continue;
}
@@ -550,7 +546,7 @@ set_desciption_author(Repodata *data, Id handle, char *str)
}
while (aut != str && aut[-1] == '\n')
aut--;
- *aut = 0;
+ *aut = 0;
if (*str)
repodata_set_str(data, handle, SOLVABLE_AUTHORS, str);
}
@@ -561,7 +557,7 @@ set_desciption_author(Repodata *data, Id handle, char *str)
/*
* set_sourcerpm
- *
+ *
*/
static void
@@ -615,7 +611,7 @@ set_sourcerpm(Repodata *data, Solvable *s, Id handle, char *sourcerpm)
/*
* startElement
* XML callback
- *
+ *
*/
static void XMLCALL
@@ -672,7 +668,7 @@ startElement(void *userData, const char *name, const char **atts)
pd->kind = "product";
else if (name[2] == 't' && name[3] == 'c')
pd->kind = "patch";
-
+
/* to support extension metadata files like others.xml which
have the following structure:
@@ -841,7 +837,7 @@ startElement(void *userData, const char *name, const char **atts)
/* Really, do nothing, wat for <dir> tag */
break;
}
- case STATE_DIR:
+ case STATE_DIR:
{
long filesz = 0, filenum = 0;
unsigned dirid;
@@ -850,7 +846,7 @@ startElement(void *userData, const char *name, const char **atts)
dirid = repodata_str2dir(pd->data, str, 1);
}
else
- {
+ {
fprintf( stderr, "<dir .../> tag without 'name' attribute, atts = %p, *atts = %p\n", atts, *atts);
break;
}
@@ -878,7 +874,7 @@ startElement(void *userData, const char *name, const char **atts)
/*
* endElement
* XML callback
- *
+ *
*/
static void XMLCALL
@@ -1039,14 +1035,6 @@ endElement(void *userData, const char *name)
if (pd->content[0])
repodata_set_poolstr(pd->data, handle, PRODUCT_FLAGS, pd->content);
break;
- case STATE_FLAVOR:
- if (pd->content[0])
- repodata_set_str(pd->data, handle, PRODUCT_FLAVOR, pd->content);
- break;
- case STATE_REFERENCES:
- if (pd->content[0])
- repodata_set_str(pd->data, handle, PRODUCT_REFERENCES, pd->content);
- break;
case STATE_EULA:
if (pd->content[0])
repodata_set_str(pd->data, handle, langtag(pd, SOLVABLE_EULA, pd->language), pd->content);
@@ -1058,7 +1046,7 @@ endElement(void *userData, const char *name)
case STATE_DISKUSAGE:
if (pd->ndirs)
commit_diskusage (pd, pd->handle);
- break;
+ break;
default:
break;
}
@@ -1071,7 +1059,7 @@ endElement(void *userData, const char *name)
/*
* characterData
* XML callback
- *
+ *
*/
static void XMLCALL
@@ -1105,7 +1093,7 @@ characterData(void *userData, const XML_Char *s, int len)
/*
* repo_add_rpmmd
* parse rpm-md metadata (primary, others)
- *
+ *
*/
void