building a package that can not be upgraded

Hebenstreit, Michael michael.hebenstreit at intel.com
Thu Jul 5 21:52:14 UTC 2012


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 at lists.rpm.org [mailto:rpm-list-bounces at lists.rpm.org] 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 at intel.com> 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 at lists.rpm.org
> http://lists.rpm.org/mailman/listinfo/rpm-list



--
Ivan Teliatnikov
-----------------------
e-mail: ivan.teliatnikov at gmail.com
моб: +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 at lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-list


More information about the Rpm-list mailing list