Community update: ecore-devel-1.0.0.2005110410-1mn.i586.rpm

Morten Nilsen morten at nilsen.com
Fri Nov 4 09:53:03 EST 2005


Christian Haugan Toldnes wrote:
> We have been working on something like that now and then. By using 
> swup's rpm interface you can check which one of two packages are newest, 
> however, I've got no time to do that right now, so I generally simply 
> remove some packages manually from time to time.

well, I've written a small awk script to compare versions..

function cmpver(lv,rv){
   lc=split(lv,left,".");
   rc=split(rv,right,".");

   cmp=lc>rc?rc:lc

   r=0
   for(s=1;s<=cmp;++s) {
     if(left[s] == right[s]) {
     } else {
       if(left[s] > right[s]) {
         return 1
       } else if(right[s] > left[s]) {
         return -1
       }
     }
   }
   if(rc < lc) {
     return 1
   } else if(lc < rc) {
     return -1
   } else {
     return 0
   }
}

if that helps

cheers,
-- 
Morten


More information about the tsl-contrib-discuss mailing list