Print

Print


I've generated and tested a short script (see below) that makes the list 
of rpms to erase from any given LCG host (either service node or work node).
The file "list.rpm" has been cut and pasted from the below 2_4_0 folder 
and I have added to it 3-4 rpms to satisfy all dependencies.
The file "list.rpm" is attached just in case.
The file "cucu.bau" will hold the list of rpms to erase.
It can be checked with "rpm -e --test `cat cucu.bau`" 
Do NOT miss the --test switch...

I intent to use it to remove version 2_4_0 rpms before installing 2_6_0.
I hope it could be useful to others confronted with the same problem.


#!/bin/bash

rpm -qa | sort -f >rpm.lst

rm -f cucu.bau

sort -f list.rpm >cucu
mv -f cucu list.rpm

((poz=0))
for i in `cat list.rpm`; do
        ((k=0))
        for j in `cat rpm.lst`; do
                ((k=k+1))
                if test $k -le $poz; then
                        continue
                fi
                if echo $i | grep $j >/dev/null; then
                        echo $j >>cucu.bau
                        ((poz=k))
                        continue 2
                fi
        done
done



Louis Poncet wrote:

> you can checkout our list from CVS then cpp them to have the exact 
> list but dependencies will nto be manage.
>
> You can download the meta rpm and look for the dep inside of it 
> without install it (man apt-get).
> http://grid-deployment.web.cern.ch/grid-deployment/gis/apt//LCG-2_4_0/sl3/en/i386/RPMS.lcg_sl3/ 
>    <<< Here is the folder for 2-4-0 and you can replace 2_4_0 by 2_5_0 
> or 2_6_0.
>
>
> Lp
>
>
> --
>
> Laird Louis Poncet
>
> Where: Bat28-R-003 CERN
>
> CH-1211 Geneve 23
>
> Mail : [log in to unmask] <mailto:[log in to unmask]>
>
> Phone: +41(0)227.674.231
>
> LAL / IN2P3 / CNRS / CERN
>
> Problem >> RTFM then google it !
>
>
>
> Le 31 août 05 à 12:17, Dan Schrager a écrit :
>
>> Yeah, the second best thing would be to get the list of rpms 
>> associated with each node type for a given LCG release and the 
>> removal of rpms could be done by hand too.
>>
>> So, is there such a list available - at least for 2_4_0 that I want 
>> removed ?
>> Or at least for nodes RB, BDII, MON, PX, WN_torque, CE_torque, UI, 
>> classic_SE ?
>>
>>
>> Louis Poncet wrote:
>>
>>
>>> rpm -qR lcg-RB | grep -v '(' | cut -d ' ' -f 1
>>>
>>> And you have the list of rpm for the RB for example.
>>> We think about including that in YAIM but we have a problem (the 
>>> dependencies) if you run this command you'll see the dep of each 
>>> package.
>>> And dometimes those dep are use by other soft.
>>>
>>> Not so simple problematic without the problem that we had with 
>>> LCFGng to maintain static list of rpms (including the system RPMS).
>>>
>>> Lp 
>>> --
>>>
>>> Laird Louis Poncet
>>>
>>> Where: Bat28-R-003 CERN
>>>
>>> CH-1211 Geneve 23
>>>
>>> Mail : [log in to unmask] <mailto:[log in to unmask]>
>>>
>>> Phone: +41(0)227.674.231
>>>
>>> LAL / IN2P3 / CNRS / CERN
>>>
>>> Problem >> RTFM then google it !
>>>
>>>
>>>
>>> Le 31 août 05 à 11:36, Dan Schrager a écrit :
>>>
>>>
>>>> Hi everybody,
>>>>
>>>> Wouldn't be nice to get an un-install script (yaim like) able to 
>>>> remove all the LCG rpms of the current version on a host 
>>>> (previously configured with a combination of node types - by yaim) ?
>>>>
>>>> Regards,
>>>> Dan
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>