diff options
Diffstat (limited to 'packaging/rpm-4.8.0-tilde.patch')
-rw-r--r-- | packaging/rpm-4.8.0-tilde.patch | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/packaging/rpm-4.8.0-tilde.patch b/packaging/rpm-4.8.0-tilde.patch new file mode 100644 index 0000000..1132c37 --- /dev/null +++ b/packaging/rpm-4.8.0-tilde.patch @@ -0,0 +1,61 @@ +Index: rpm-4.8.0-beta1/lib/rpmvercmp.c +=================================================================== +--- rpm-4.8.0-beta1.orig/lib/rpmvercmp.c ++++ rpm-4.8.0-beta1/lib/rpmvercmp.c +@@ -33,12 +33,16 @@ int rpmvercmp(const char * a, const char + + /* loop through each version segment of str1 and str2 and compare them */ + while (*one && *two) { +- while (*one && !risalnum(*one)) one++; +- while (*two && !risalnum(*two)) two++; ++ while (*one && !risalnum(*one) && *one != '~') one++; ++ while (*two && !risalnum(*two) && *two != '~') two++; + + /* If we ran to the end of either, we are finished with the loop */ + if (!(*one && *two)) break; + ++ /* If exactly one side has a tilde, it is decided. */ ++ if ((*one == '~') ^ (*two == '~')) ++ break; ++ + str1 = one; + str2 = two; + +@@ -103,6 +107,11 @@ int rpmvercmp(const char * a, const char + /* this catches the case where all numeric and alpha segments have */ + /* compared identically but the segment sepparating characters were */ + /* different */ ++ if (*two == '~') ++ return 1; ++ else if (*one == '~') ++ return -1; ++ + if ((!*one) && (!*two)) return 0; + + /* whichever version still has characters left over wins */ +Index: rpm-4.8.0-beta1/build/parsePreamble.c +=================================================================== +--- rpm-4.8.0-beta1.orig/build/parsePreamble.c ++++ rpm-4.8.0-beta1/build/parsePreamble.c +@@ -523,7 +523,7 @@ static int handlePreambleTag(rpmSpec spe + case RPMTAG_VERSION: + case RPMTAG_RELEASE: + SINGLE_TOKEN_ONLY; +- if (rpmCharCheck(spec, field, strlen(field), "._+%{}") != RPMRC_OK) return RPMRC_FAIL; ++ if (rpmCharCheck(spec, field, strlen(field), "~._+%{}") != RPMRC_OK) return RPMRC_FAIL; + headerPutString(pkg->header, tag, field); + break; + case RPMTAG_URL: +Index: rpm-4.8.0-beta1/build/parseReqs.c +=================================================================== +--- rpm-4.8.0-beta1.orig/build/parseReqs.c ++++ rpm-4.8.0-beta1/build/parseReqs.c +@@ -168,7 +168,7 @@ rpmRC parseRCPOT(rpmSpec spec, Package p + } + EVR = xmalloc((ve-v) + 1); + rstrlcpy(EVR, v, (ve-v) + 1); +- if (rpmCharCheck(spec, EVR, ve-v, ".-_+:%{}")) goto exit; ++ if (rpmCharCheck(spec, EVR, ve-v, "~.-_+:%{}")) goto exit; + re = ve; /* ==> next token after EVR string starts here */ + } else + EVR = NULL; |