[WBEL-users] Upgrade WBEL 3.0rc1 to WBEL 3.0

Milan Kerslager milan.kerslager@pslib.cz
Wed, 7 Jan 2004 08:12:12 +0100


On Tue, Jan 06, 2004 at 01:09:55PM -0500, David Gonzalez Romero wrote:
> Well i have the cdrom WBEL 3.0 finall, but in my computer i have WBEL 
> 3.0rc1... i need to know if possible the upgrade to WBEL 3.0 use my cdrom 
> with YUM or any other tools?

yum is almost unusable as packages has mostly the same version in RC1
and final.

One solution is to compare RPM packages from RC1 and final and use 
"rpm -Uvh --force package" to replace changed packages.

The second solution is to comapre build dates of installed packages and
build dates of final packages and replace with --force as above. You may
use this script:

#!/bin/bash

for i in $(rpm -qa --qf "%{BUILDTIME}:%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}.rpm\n"); do
  BUILDED=$(echo $i | awk -F: '{print $1}')
  NAME=$(echo $i | awk -F: '{print $2}')
  FULLNAME="/path/to/final/RedHat/RPMS/$NAME"
  if [ -e $FULLNAME ]; then
    # replace only when build dates are different
    if [ $(rpm -qp --qf "%{BUILDTIME}" $FULLNAME) -ne $BUILDED ]; then
      echo $NAME
    fi
  fi
done

This script does not solve packages with changed names (this could solve
yum for you).

-- 
                        Milan Kerslager
                        E-mail: milan.kerslager@pslib.cz
                        WWW:    http://www.pslib.cz/~kerslage/