remove an installed rpm during rpm -i

Michael Barto mbarto at logiqwest.com
Mon Nov 24 23:34:22 UTC 2008


If you can write a shell script to do this validation and/or the 
removal, then you can either embed it in the spec file or call a script 
remotely from inside the spec file. I posted a page the shows how to 
embed some shell commands and where they really are in the structure of 
the rpm. Say putting it in the %install section is my suggestion. Hope 
it helps as I did with adding the cron entries which was a simple copy 
(cp). I have seen some spec examples that actually call shell programs. 
My personal opinion is you should copy the external shell script to the 
working directory (the tar-gz file with the spec file as in the example) 
and run it from there, and then let the rpm program delete it.

http://www.logiqwest.com/TechnicalPapers/rpmScriptInstall.html

This is an example I have from a spec file:

%install
sh ./installer.sh


Barry R Cisna wrote:
> Hello List,
>
> I've looked high and low and all the .spec file examples do not show how
> to do this IF it is at all possible. How could I do an .spec file entry ,
> possibly
> %pre   --- something
> to parse the rpm database and if a particular rpm is found to be installed
> it will be uninstalled during the rpm install process? This is so my
> rpmbuild/ rpm -ivh does not conflict with a few already exsiting /bin
> files.
> I am rolling a few binaries  into my rpm that would conflict with already
> installed .rpm. I'm just trying to make this as streamlined as possible.
>
> Thanks,
> Barry
> _______________________________________________
> Rpm-list mailing list
> Rpm-list at lists.rpm.org
> http://lists.rpm.org/mailman/listinfo/rpm-list
>
>   

-- 
------------------------------------------------------------------------
*Michael Barto*
Software Architect

	LogiQwest Circle
LogiQwest Inc.
16458 Bolsa Chica Street, # 15
Huntington Beach, CA  92649
http://www.logiqwest.com/

	    	mbarto at logiqwest.com <mailto:mbarto at logiqwest.com>
Tel:  714 377 3705
Fax: 714 840 3937
Cell: 714 883 1949

*'tis a gift to be simple*
------------------------------------------------------------------------
This e-mail may contain LogiQwest proprietary information and should be 
treated as confidential.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rpm.org/pipermail/rpm-list/attachments/20081124/b69d2dba/attachment.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: circle.gif
Type: image/gif
Size: 651 bytes
Desc: not available
Url : http://lists.rpm.org/pipermail/rpm-list/attachments/20081124/b69d2dba/attachment.gif 


More information about the Rpm-list mailing list