building a package that can not be upgraded

Ivan ivan.teliatnikov at gmail.com
Thu Jul 5 21:47:39 UTC 2012


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


More information about the Rpm-list mailing list