X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=rpm-epoch0.patch;h=cdf2b5f3151a75d5d4f6b5d3a0dd2862c66cdd3c;hb=53b2c59109f8628e5b67b7d6f144a7624aa9a1a9;hp=adcce508ee164329ee76011cb1c51452aec4436b;hpb=90be4eb94767b5a52d2de4e38c01b7f8a48cc56f;p=packages%2Frpm.git diff --git a/rpm-epoch0.patch b/rpm-epoch0.patch index adcce50..cdf2b5f 100644 --- a/rpm-epoch0.patch +++ b/rpm-epoch0.patch @@ -1,40 +1,15 @@ ---- rpm-4.3/build/parsePreamble.c.orig 2004-02-26 22:31:15.020274848 +0100 -+++ rpm-4.3/build/parsePreamble.c 2004-02-26 22:33:33.616205064 +0100 -@@ -455,6 +455,8 @@ - extern int noLang; - /*@=redecl@*/ +--- rpm-4.3.orig/build/parsePreamble.c 2003-11-16 13:47:23.000000000 +0100 ++++ rpm-4.3/build/parsePreamble.c 2004-02-29 15:40:58.466804704 +0100 +@@ -942,6 +943,12 @@ + headerCopyTags(spec->packages->header, pkg->header, + (int_32 *)copyTagsDuringParse); -+static int noEpoch; -+ - /** - */ - /*@-boundswrite@*/ -@@ -626,6 +628,7 @@ - spec->lineNum, spec->line); - return RPMERR_BADSPEC; - } -+ noEpoch = 0; - xx = headerAddEntry(pkg->header, tag, RPM_INT32_TYPE, &num, 1); - break; - case RPMTAG_AUTOREQPROV: -@@ -865,6 +868,8 @@ - strcpy(NVR, "(main package)"); - - pkg = newPackage(spec); -+ -+ noEpoch = 1; - - if (! initialPackage) { - /* There is one option to %package: or -n */ -@@ -932,6 +937,11 @@ - if (!spec->anyarch && checkForValidArchitectures(spec)) - return RPMERR_BADSPEC; - -+ if (noEpoch) { ++ if (headerGetEntry(pkg->header, RPMTAG_EPOCH, NULL, NULL, NULL) == 0) { + int num = 0; + headerAddEntry(pkg->header, RPMTAG_EPOCH, RPM_INT32_TYPE, &num, 1); ++ addMacro(spec->macros, "epoch", NULL, "0", RMIL_SPEC); + } -+ - if (pkg == spec->packages) - fillOutMainPackage(pkg->header); ++ + if (checkForRequired(pkg->header, NVR)) + return RPMERR_BADSPEC;