From aed057419cb98babd0c3856a76222c72c7919a81 Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Wed, 19 Nov 2008 12:12:37 +0100 Subject: rpm/rpm-native: Add recipe for 4.4.2.3 (from Poky) Squashed set of changes from Poky: svn r5069 - rpm/rpm-native: Add recipe for 4.4.2.3 svn r5085 - rpm: Patch out some Makefile strangeness causing build failures svn r5093 - rpm: Enable python extensions and improve cross compiling patches svn r5103 - rpm: Tweak patches to remove popt problem svn r5113 - rpm: Add recommends support from suse rpm patches svn r5132 - rpm-native: Set varprefix to get the rpm database in a sane location svn r5152 - rpm: Handle PYTHONVER differently in EXTRA_OECONF to stop gettext/uclibc failures during parsing svn r5154 - rpm: Add missing patches svn r5423 - rpm: Add python module packaging OE changes: rpm-native: add Python 2.6 support rpm: use distutils-base to get Python version rpm: use sed instead of ed - it is present in our metadata rpm: set ARM_INSTRUCTION_SET as it fails to build for thumb | /tmp/ccYO91se.s: Assembler messages: | /tmp/ccYO91se.s:71: Error: selected processor does not support `swpb r2,r3,[r4]' | /tmp/ccYO91se.s:72: Error: unshifted register required -- `eor r2,r2,#1' --- recipes/rpm/files/extcond.patch | 78 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 recipes/rpm/files/extcond.patch (limited to 'recipes/rpm/files/extcond.patch') diff --git a/recipes/rpm/files/extcond.patch b/recipes/rpm/files/extcond.patch new file mode 100644 index 0000000000..6963b8606c --- /dev/null +++ b/recipes/rpm/files/extcond.patch @@ -0,0 +1,78 @@ +This patch supports an extension in the condition evaluation. +If the condition is a format and returns an nonempty string, it is +assumed to be true. +This mechanism is used by the weakdeps patch to filter the +"RPMSENSE_STRONG" flag. + +--- ./rpmdb/header.c.orig 2005-06-06 23:33:54.000000000 +0000 ++++ ./rpmdb/header.c 2006-03-17 18:08:02.000000000 +0000 +@@ -2980,8 +2980,12 @@ static int parseExpression(headerSprintf + + *endPtr = chptr; + ++ token->u.cond.tag.type = NULL; ++ token->u.cond.tag.format = ""; + token->type = PTOK_COND; + ++ if ((token->u.cond.tag.type = strchr(str, ':')) != 0) ++ *token->u.cond.tag.type++ = 0; + (void) findTag(hsa, token, str); + + return 0; +@@ -3239,6 +3243,7 @@ static char * singleSprintf(headerSprint + int_32 type; + int_32 count; + sprintfToken spft; ++ sprintfTag stag; + int condNumFormats; + size_t need; + +@@ -3270,6 +3275,18 @@ static char * singleSprintf(headerSprint + if (token->u.cond.tag.ext || headerIsEntry(hsa->h, token->u.cond.tag.tag)) { + spft = token->u.cond.ifFormat; + condNumFormats = token->u.cond.numIfTokens; ++ if (token->u.cond.tag.fmt) { ++ /* check if format creates output */ ++ size_t vallen = hsa->vallen; ++ formatValue(hsa, &token->u.cond.tag, element); ++ if (hsa->vallen == vallen) { ++ spft = token->u.cond.elseFormat; ++ condNumFormats = token->u.cond.numElseTokens; ++ } else { ++ hsa->vallen = vallen; ++ hsa->val[hsa->vallen] = 0; ++ } ++ } + } else { + spft = token->u.cond.elseFormat; + condNumFormats = token->u.cond.numElseTokens; +@@ -3291,19 +3308,22 @@ static char * singleSprintf(headerSprint + spft = token->u.array.format; + for (i = 0; i < token->u.array.numTokens; i++, spft++) + { +- if (spft->type != PTOK_TAG || +- spft->u.tag.arrayCount || +- spft->u.tag.justOne) continue; ++ if (spft->type != PTOK_TAG && spft->type != PTOK_COND) ++ continue; ++ ++ stag = (spft->type == PTOK_COND ? &spft->u.cond.tag : &spft->u.tag); ++ if (stag->arrayCount || stag->justOne) ++ continue; + +- if (spft->u.tag.ext) { ++ if (stag->ext) { + /*@-boundswrite@*/ +- if (getExtension(hsa, spft->u.tag.ext, &type, NULL, &count, +- hsa->ec + spft->u.tag.extNum)) ++ if (getExtension(hsa, stag->ext, &type, NULL, &count, ++ hsa->ec + stag->extNum)) + continue; + /*@=boundswrite@*/ + } else { + /*@-boundswrite@*/ +- if (!headerGetEntry(hsa->h, spft->u.tag.tag, &type, NULL, &count)) ++ if (!headerGetEntry(hsa->h, stag->tag, &type, NULL, &count)) + continue; + /*@=boundswrite@*/ + } -- cgit 1.2.3-korg