RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  ____________________________________________________________________________

  Server: rpm5.org                         Name:   Jeff Johnson
  Root:   /v/rpm/cvs                       Email:  j...@rpm5.org
  Module: rpm                              Date:   04-Apr-2009 02:26:09
  Branch: rpm-5_1                          Handle: 2009040400260800

  Modified files:           (Branch: rpm-5_1)
    rpm/build               parsePreamble.c

  Log:
    - jbj: oops, - PLD: rpm-epoch0: Always add Epoch: 0 to packages.

  Summary:
    Revision    Changes     Path
    2.171.2.6   +18 -0      rpm/build/parsePreamble.c
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/build/parsePreamble.c
  ============================================================================
  $ cvs diff -u -r2.171.2.5 -r2.171.2.6 parsePreamble.c
  --- rpm/build/parsePreamble.c 11 Jan 2009 18:50:31 -0000      2.171.2.5
  +++ rpm/build/parsePreamble.c 4 Apr 2009 00:26:08 -0000       2.171.2.6
  @@ -1182,6 +1182,24 @@
        headerCopyTags(spec->packages->header, pkg->header,
                        (uint32_t *)copyTagsDuringParse);
   
  +#ifdef RPM_VENDOR_PLD /* rpm-epoch0 */
  +    /* 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 = &num;
  +     he->c = 1;
  +     xx = headerPut(pkg->header, he, 0);
  +
  +     /* also declare %{epoch} to be same */
  +     addMacro(spec->macros, "epoch", NULL, "0", RMIL_SPEC);
  +    }
  +
  +#endif /* RPM_VENDOR_PLD rpm-epoch0 */
  +
       if (checkForRequired(pkg->header, NVR) != RPMRC_OK)
        return RPMRC_FAIL;
   
  @@ .
______________________________________________________________________
RPM Package Manager                                    http://rpm5.org
CVS Sources Repository                                rpm-cvs@rpm5.org

Reply via email to