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

  Server: rpm5.org                         Name:   Per Øyvind Karlsen
  Root:   /v/rpm/cvs                       Email:  pkarl...@rpm5.org
  Module: rpm                              Date:   17-Jan-2011 12:28:06
  Branch: rpm-5_3                          Handle: 2011011711280600

  Modified files:           (Branch: rpm-5_3)
    rpm/rpmdb               rpmevr.c

  Log:
    fix handling of missing distepoch in rpmEVRcompare

  Summary:
    Revision    Changes     Path
    1.36.2.2    +7  -6      rpm/rpmdb/rpmevr.c
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/rpmevr.c
  ============================================================================
  $ cvs diff -u -r1.36.2.1 -r1.36.2.2 rpmevr.c
  --- rpm/rpmdb/rpmevr.c        31 Oct 2010 16:17:21 -0000      1.36.2.1
  +++ rpm/rpmdb/rpmevr.c        17 Jan 2011 11:28:06 -0000      1.36.2.2
  @@ -276,12 +276,7 @@
   assert(b->F[RPMEVR_D] != NULL);
   
       for (s = rpmEVRorder(); *s != '\0'; s++) {
  -     int ix;
  -#if defined(RPM_VENDOR_MANDRIVA) /* mdvbz#55810 */
  -     if(*s == 'R' && (b->Flags & (~RPMSENSE_GREATER & RPMSENSE_EQUAL))
  -                             && *(b->F[RPMEVR_R]) == '\0')
  -                         break;
  -#endif
  +     int ix = 0;
   
        switch ((int)*s) {
        default:        continue;       /*@notreached@*/ /*@switchbreak@*/break;
  @@ -290,6 +285,12 @@
        case 'R':       ix = RPMEVR_R;  /*@switchbreak@*/break;
        case 'D':       ix = RPMEVR_D;  /*@switchbreak@*/break;
        }
  +#if defined(RPM_VENDOR_MANDRIVA) /* mdvbz#55810 */
  +     if(ix >= RPMEVR_R && (b->Flags & (~RPMSENSE_GREATER & RPMSENSE_EQUAL))
  +                             && *(b->F[ix]) == '\0')
  +                         break;
  +#endif
  +
        rc = compare_values(a->F[ix], b->F[ix]);
        if (rc)
            break;
  @@ .
______________________________________________________________________
RPM Package Manager                                    http://rpm5.org
CVS Sources Repository                                rpm-cvs@rpm5.org

Reply via email to