RPM Community Forums

Mailing List Message of <rpm-devel>

Re: [CVS] RPM: rpm/lib/ rpmds.c

From: Jeff Johnson <n3npq@mac.com>
Date: Tue 25 Jan 2011 - 15:58:22 CET
Message-id: <E13FAB45-4752-4991-9902-E23481F98555@mac.com>
This change MUST be tested and integrated somehow.

As long as there are no test cases and explicit test harnesses across
more than de facto Mandriva Cooker, well, the change cannot be Just Turned On.

There's all sorts of creeping crud that crawls out when RPM version comparison
changes, and relying on luser input from rawhide model rolling distributions
just adds an intolerable support issue that never ever converges to closure.

We've been at this change for 1.25 _YEARS_ now, with an implementation that
is >2 years old, with no end in sight.

Without test cases, well, its anybody's guess WTF?!?

Mote that there's tilde-in-version, as well as Newer! Better! Bestest!
semantics for odd missing value corner cases with huge legacy consequences
pending too.

Test cases and writing/executing an explicit test plan MUST be accomplished.

Or I'll just rip out everything and start over again again again. That "works" too.

73 de Jeff

On Jan 25, 2011, at 9:47 AM, Per Řyvind Karlsen wrote:

>  RPM Package Manager, CVS Repository
>  http://rpm5.org/cvs/
>  ____________________________________________________________________________
> 
>  Server: rpm5.org                         Name:   Per Řyvind Karlsen
>  Root:   /v/rpm/cvs                       Email:  pkarlsen@rpm5.org
>  Module: rpm                              Date:   25-Jan-2011 15:47:17
>  Branch: HEAD                             Handle: 2011012514471400
> 
>  Modified files:
>    rpm/lib                 rpmds.c
> 
>  Log:
>    handle missing release & distepoch in rpmdsCompare() as well
> 
>  Summary:
>    Revision    Changes     Path
>    2.172       +7  -0      rpm/lib/rpmds.c
>  ____________________________________________________________________________
> 
>  patch -p0 <<'@@ .'
>  Index: rpm/lib/rpmds.c
>  ============================================================================
>  $ cvs diff -u -r2.171 -r2.172 rpmds.c
>  --- rpm/lib/rpmds.c	3 Jan 2011 21:20:23 -0000	2.171
>  +++ rpm/lib/rpmds.c	25 Jan 2011 14:47:14 -0000	2.172
>  @@ -3848,7 +3848,14 @@
>           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 && (bFlags & (~RPMSENSE_GREATER & RPMSENSE_EQUAL))
>  +				&& *(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])
>  +#endif
>   /*@i@*/	    sense = EVRcmp(a->F[ix], b->F[ix]);
>   	if (sense)
>   	    break;
>  @@ .
> ______________________________________________________________________
> RPM Package Manager                                    http://rpm5.org
> CVS Sources Repository                                rpm-cvs@rpm5.org
Received on Tue Jan 25 15:58:46 2011
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.