[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [rpm] Forced Upgrade when version is the same?
- From: R P Herrold <herrold owlriver com>
- To: rpm-list redhat com
- Subject: Re: [rpm] Forced Upgrade when version is the same?
- Date: Mon, 10 Dec 2001 00:42:09 -0500 (EST)
On Mon, 10 Dec 2001, Larry Houston wrote:
> RPM List:
>
> Looking for a way of automating Forced Upgrades where the RPM Versions
> match those already installed, like a Refresh which only applies to those
> already installed! With VA Linux 6.2.4 now a dead-end distribution, I
How about something like:
#!/bin/sh
# untested -- a quick hack by Russ Herrold
#
# You are nuts to do this if you have not image
# back-up'ed your system
#
# NFS mounts are fine
POINTER="/path/to/6.2/RedHat/RPM/"
for i in ` rpm -qa --qf '%{name}' `; do
VERSIONED=` rpm -q $i '`
ARCH=` rpm -q $i --qf '%{arch}' `
#
# We match with this gymnastics all but the patch level
# and VA Linux suffixing
#
GOTIT=` ls ${POINTER}*${ARCH}.rpm | \
grep -c ^${VERSIONED}- `
[ "$GITOT" =-gt "0" ] && {
##
## WARNING - Danger Will Robinson: --nodeps and --force
## can fry your system: If you don't understand
## the import, don't do it -- All your base have
## been warned
##
rpm -Uvh --nodeps --force \
${VERSIONED}*.${ARCH}.rpm
}
done
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[]