On 15 Feb 2002, Edward C. Bailey wrote:

> >>>>> "Dumas" == Dumas Patrice <[EMAIL PROTECTED]> writes:
> 
> Dumas> Hi, I would like to uninstall some .src.rpm I have installed on my
> Dumas> system. I may go into the BUILD, SPEC, SOURCE..... directory and
> Dumas> delete the directories/files by hand, but is there a more automated
> Dumas> way of doing that ?
> 
> Not that I'm aware of, unfortunately...

How about this scriptlet:

#!/bin/sh
#
#       Clean up after building
#
MYNAME=`basename $0`
[ "x$1" != "x" ] && {
        echo "Usage: $MYNAME pkgname.src.rpm " 1>&2
        exit 1
        } || {
        NAME=$1 
        export NAME
        }
cd /usr/src/redhat
for i in `rpm -qlp $NAME`; do
        rm -f `find -name $i -print `
done
PKG=` rpm -qp --qf '%{name}-%{version}' $NAME `
rm -rf /usr/src/redhat/BUILD/$PKG
rm -f `locate $NAME`

-- Russ Herrold



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to