]> git.pld-linux.org Git - packages/rpm.git/blobdiff - rpm-epoch0.patch
- update to 5.0.3
[packages/rpm.git] / rpm-epoch0.patch
index bb1e7b7c4a950210ba895b3c17bce465969c6c92..b59617923f3c9b6002864ab5b733060649f99a66 100644 (file)
@@ -1,14 +1,24 @@
---- 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,11 @@
+--- 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,
-                       (int_32 *)copyTagsDuringParse);
+                       (uint32_t *)copyTagsDuringParse);
  
-+    if (headerGetEntry(pkg->header, RPMTAG_EPOCH, NULL, NULL, NULL) == 0) {
-+      int num = 0;
-+      headerAddEntry(pkg->header, RPMTAG_EPOCH, RPM_INT32_TYPE, &num, 1);
++    /* 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;
++
++      he->tag = RPMTAG_EPOCH;
++      he->t = RPM_UINT32_TYPE;
++      he->p.ui32p = #
++      he->c = 1;
++      xx = headerPut(pkg->header, he, 0);
++
++      /* also declare %{epoch} to be same */
++      addMacro(spec->macros, "epoch", NULL, "0", RMIL_SPEC);
 +    }
-+    
-     if (checkForRequired(pkg->header, NVR))
-       return RPMERR_BADSPEC;
++
+     if (checkForRequired(pkg->header, NVR) != RPMRC_OK)
+       return RPMRC_FAIL;
  
This page took 0.046634 seconds and 4 git commands to generate.