[CVS] RPM: rpm-5_4: rpm/lib/ rpmds.c rpm/rpmdb/ rpmevr.c

2012-06-06 Thread Jeff Johnson
  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:   06-Jun-2012 23:25:05
  Branch: rpm-5_4  Handle: 2012060621250301

  Modified files:   (Branch: rpm-5_4)
rpm/lib rpmds.c
rpm/rpmdb   rpmevr.c

  Log:
- rpmevr: add the desired "negative" twiddle-in-version comparison
semantic.

  Summary:
RevisionChanges Path
2.170.2.19  +3  -0  rpm/lib/rpmds.c
1.37.2.9+3  -0  rpm/rpmdb/rpmevr.c
  

  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmds.c
  
  $ cvs diff -u -r2.170.2.18 -r2.170.2.19 rpmds.c
  --- rpm/lib/rpmds.c   29 May 2012 17:42:30 -  2.170.2.18
  +++ rpm/lib/rpmds.c   6 Jun 2012 21:25:04 -   2.170.2.19
  @@ -4120,6 +4120,9 @@
sense = 0;
}
  } else
  +   if (ix == RPMEVR_T)   /* XXX twiddle-in-version "negative" compare */
  +sense = -EVRcmp(a->F[ix], b->F[ix]);
  +   else
   /*@i@*/  sense = EVRcmp(a->F[ix], b->F[ix]);
}
if (sense)
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/rpmevr.c
  
  $ cvs diff -u -r1.37.2.8 -r1.37.2.9 rpmevr.c
  --- rpm/rpmdb/rpmevr.c29 May 2012 17:42:29 -  1.37.2.8
  +++ rpm/rpmdb/rpmevr.c6 Jun 2012 21:25:03 -   1.37.2.9
  @@ -320,6 +320,9 @@
rc = 0;
}
} else
  + if (ix == RPMEVR_T) /* XXX twiddle-in-version "negative" compare */
  + rc = -compare_values(a->F[ix], b->F[ix]);
  + else
rc = compare_values(a->F[ix], b->F[ix]);
if (rc)
break;
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/lib/ rpmds.c rpm/rpmdb/ rpmevr.c

2011-07-13 Thread Per �yvind Karlsen
  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:   13-Jul-2011 16:50:07
  Branch: rpm-5_4  Handle: 2011071314500601

  Modified files:   (Branch: rpm-5_4)
rpm/lib rpmds.c
rpm/rpmdb   rpmevr.c

  Log:
fix regression introduced in previous commit

  Summary:
RevisionChanges Path
2.170.2.11  +4  -3  rpm/lib/rpmds.c
1.37.2.4+4  -3  rpm/rpmdb/rpmevr.c
  

  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmds.c
  
  $ cvs diff -u -r2.170.2.10 -r2.170.2.11 rpmds.c
  --- rpm/lib/rpmds.c   12 Jul 2011 10:44:05 -  2.170.2.10
  +++ rpm/lib/rpmds.c   13 Jul 2011 14:50:06 -  2.170.2.11
  @@ -4065,9 +4065,10 @@
   case 'D':ix = RPMEVR_D;  /*@switchbreak@*/break;
   }
   #if defined(RPM_VENDOR_MANDRIVA) /* mdvbz#55810 */
  - if(ix == RPMEVR_R && (bFlags & (~RPMSENSE_GREATER & RPMSENSE_EQUAL))
  - && *(b->F[ix]) == '\0')
  - break;
  + if(ix >= RPMEVR_R && (bFlags & (~RPMSENSE_GREATER & RPMSENSE_EQUAL))
  + && !(ix == RPMEVR_D && (bFlags & RPMSENSE_LESS))
  + && *(b->F[ix]) == '\0')
  + break;
if (a->F[ix] && b->F[ix])
   #else
if (a->F[ix] && *a->F[ix] && b->F[ix] && *b->F[ix])
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/rpmevr.c
  
  $ cvs diff -u -r1.37.2.3 -r1.37.2.4 rpmevr.c
  --- rpm/rpmdb/rpmevr.c12 Jul 2011 10:44:05 -  1.37.2.3
  +++ rpm/rpmdb/rpmevr.c13 Jul 2011 14:50:07 -  1.37.2.4
  @@ -286,9 +286,10 @@
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;
  + if(ix >= RPMEVR_R && (b->Flags & (~RPMSENSE_GREATER & RPMSENSE_EQUAL))
  + && !(ix == RPMEVR_D && (b->Flags & RPMSENSE_LESS))
  + && *(b->F[ix]) == '\0')
  + break;
   #endif
   
rc = compare_values(a->F[ix], b->F[ix]);
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org