Thanks - does that also work in "%pre"? because I want to have the new package "rpm -F ..." fail, before it messes anything up Michael -----Original Message----- From: rpm-list-bounces@xxxxxxxxxxxxx [mailto:rpm-list-bounces@xxxxxxxxxxxxx] On Behalf Of Ivan Sent: Thursday, July 05, 2012 2:48 PM To: General discussion about the RPM package manager Subject: Re: building a package that can not be upgraded Michael, RPM may contain a conditional statement in %post section that can differentiate between install and upgrade|update commands. %post if [ "$1" = "1" ]; then # installing new package ( not upgrading ) install file .... elif [ "$1" = "2" ]; then # will be executed with rpm -Uvh or yum upgrade is used. ... else Kind regards, Ivan. On Fri, Jul 6, 2012 at 3:17 AM, Hebenstreit, Michael <michael.hebenstreit@xxxxxxxxx> wrote: > Is there an easy way to create a package that throws an error when > trying to upgrade? Aka rpm -i should work, rpm -F/-U should not > > > Thanks > Michael > > _______________________________________________ > Rpm-list mailing list > Rpm-list@xxxxxxxxxxxxx > http://lists.rpm.org/mailman/listinfo/rpm-list -- Ivan Teliatnikov ----------------------- e-mail: ivan.teliatnikov@xxxxxxxxx моб: +7 90609 30 268 ( in Russia ) mob: +61 402 173 179 (in Australia ) * ICQ: 413687763 Skype: ivan.teliatnikov VoipCheap: storozhsergeich_voipcheap _______________________________________________ Rpm-list mailing list Rpm-list@xxxxxxxxxxxxx http://lists.rpm.org/mailman/listinfo/rpm-list _______________________________________________ Rpm-list mailing list Rpm-list@xxxxxxxxxxxxx http://lists.rpm.org/mailman/listinfo/rpm-list