From 55db42d25bc997163786bedd114888170844fa074c9f5466bef358622b647424 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Schr=C3=B6der?= Date: Thu, 1 Mar 2018 15:44:37 +0000 Subject: [PATCH] - remove no longer needed and now harmful extcond patch OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=449 --- extcond.diff | 65 ---------------------------------------------------- rpm.changes | 7 ++++++ rpm.spec | 3 +-- 3 files changed, 8 insertions(+), 67 deletions(-) delete mode 100644 extcond.diff diff --git a/extcond.diff b/extcond.diff deleted file mode 100644 index 32d8e81..0000000 --- a/extcond.diff +++ /dev/null @@ -1,65 +0,0 @@ -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. - ---- ./lib/headerfmt.c.orig 2010-12-03 12:11:57.000000000 +0000 -+++ ./lib/headerfmt.c 2011-05-10 17:06:49.000000000 +0000 -@@ -568,8 +568,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; -@@ -657,6 +661,7 @@ static char * singleSprintf(headerSprint - int i, j, found; - rpm_count_t count, numElements; - sprintfToken spft; -+ sprintfTag stag; - int condNumFormats; - size_t need; - -@@ -687,6 +692,18 @@ static char * singleSprintf(headerSprint - 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; -@@ -710,10 +727,13 @@ static char * singleSprintf(headerSprint - for (i = 0; i < token->u.array.numTokens; i++, spft++) - { - rpmtd td = NULL; -- if (spft->type != PTOK_TAG || -- 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->justOne) -+ continue; - -- if (!(td = getData(hsa, spft->u.tag.tag))) { -+ if (!(td = getData(hsa, stag->tag))) { - continue; - } - diff --git a/rpm.changes b/rpm.changes index eec9286..8458b2f 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Mar 1 16:42:07 CET 2018 - mls@suse.de + +- remove no longer needed and now harmful extcond patch + [bnc#1083539] + dropped patch: extcond.diff + ------------------------------------------------------------------- Thu Feb 22 15:14:49 UTC 2018 - fvogt@suse.com diff --git a/rpm.spec b/rpm.spec index ea0a37d..80b67ad 100644 --- a/rpm.spec +++ b/rpm.spec @@ -75,7 +75,6 @@ Patch12: localetag.diff Patch14: nameversioncompare.diff Patch15: dbfsync.diff Patch16: dbrointerruptable.diff -Patch17: extcond.diff Patch18: refreshtestarch.diff Patch20: waitlock.diff Patch21: suspendlock.diff @@ -218,7 +217,7 @@ rm -f rpmdb/db.h %patch3 -p1 %patch -P 4 %patch5 -p1 -%patch -P 11 -P 12 -P 13 -P 14 -P 15 -P 16 -P 17 -P 18 +%patch -P 11 -P 12 -P 13 -P 14 -P 15 -P 16 -P 18 %patch -P 20 -P 21 -P 24 -P 25 -P 26 -P 27 -P 28 -P 29 %patch -P 30 -P 31 -P 32 -P 33 -P 34 -P 35 -P 36 -P 38 %patch -P 43 -P 45 -P 46 -P 47 -P 49