]> git.pld-linux.org Git - packages/rpm.git/blobdiff - rpm-epoch0.patch
- pass CLASSPATH to %ant so wouldn't need to export it
[packages/rpm.git] / rpm-epoch0.patch
index adcce508ee164329ee76011cb1c51452aec4436b..b59617923f3c9b6002864ab5b733060649f99a66 100644 (file)
@@ -1,40 +1,24 @@
---- 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-5.0.2/build/parsePreamble.c    2007-12-31 18:21:47.000000000 +0200
++++ rpm-5.0.2-epoch0/build/parsePreamble.c     2008-02-17 20:17:38.000000000 +0200
+@@ -1082,6 +1082,21 @@
+       headerCopyTags(spec->packages->header, pkg->header,
+                       (uint32_t *)copyTagsDuringParse);
  
-+static int noEpoch;
++    /* Add Epoch: 0 to package header if it was not set by spec */
++    he->tag = RPMTAG_NAME;
++    if (headerGet(spec->packages->header, he, 0) == 0) {
++      uint32_t num = 0;
 +
- /**
-  */
- /*@-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: <pkg> or -n <pkg> */
-@@ -932,6 +937,11 @@
-     if (!spec->anyarch && checkForValidArchitectures(spec))
-       return RPMERR_BADSPEC;
-+    if (noEpoch) {
-+      int num = 0;
-+      headerAddEntry(pkg->header, RPMTAG_EPOCH, RPM_INT32_TYPE, &num, 1);
++      he->tag = RPMTAG_EPOCH;
++      he->t = RPM_UINT32_TYPE;
++      he->p.ui32p = &num;
++      he->c = 1;
++      xx = headerPut(pkg->header, he, 0);
++
++      /* also declare %{epoch} to be same */
++      addMacro(spec->macros, "epoch", NULL, "0", RMIL_SPEC);
 +    }
 +
-     if (pkg == spec->packages)
-       fillOutMainPackage(pkg->header);
+     if (checkForRequired(pkg->header, NVR) != RPMRC_OK)
+       return RPMRC_FAIL;
  
This page took 0.048019 seconds and 4 git commands to generate.