[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

RE: question about upgrade



Joe-

I ran into the same issue a few months ago, looks like I missed the section
of Max RPM that contains how to do this, here is the answer..

Regards,
--Nick

-----Original Message-----
From: Wiener, Chris [mailto:chris.wiener@intel.com] 
Sent: Monday, October 28, 2002 4:46 PM
To: 'Buro, Nicholas F'
Cc: 'rpm-list@redhat.com'
Subject: RE: Upgrading and Scripting

You have to protect your uninstall scriptlet code so it doesn't get called
when an upgrade is in progress. Maximum RPM pages 183-184 13.3.2
Install/Erase-time Scripts.

%postun
# only run this scriptlet only if this is an uninstall and not an upgrade.
# $1 = 1 if upgrade, and $1 = 0 if uninstall.
if [ "$1" = "0" ]
then
<postun scriptlet code goes here>
fi

%preun
# only run this scriptlet if this is an uninstall and not an upgrade.
# $1 = 1 if upgrade, and $1 = 0 if uninstall.
if [ "$1" = "0" ]
then
<preun scriptlet code goes here>
fi

Chris
Chris Wiener
Sr. Software Engineer
Intel Corporation
Telecommunications and Embedded Group
1515 Route 10
Parsippany, NJ 07054
(973) 993-3000 x6443
Chris.Wiener@intel.com <mailto:Chris.Wiener@intel.com>
"Politics ignores reality. Reality ignores politics."


-----Original Message-----
From: Buro, Nicholas F [mailto:nicholas_buro@merck.com]
Sent: Monday, October 28, 2002 4:26 PM
To: rpm-list@redhat.com
Subject: Upgrading and Scripting



-----Original Message-----
From: Joe Luong [mailto:Joe.Luong@netiq.com] 
Sent: Thursday, January 02, 2003 9:24 PM
To: 'rpm-list@redhat.com'
Subject: question about upgrade


Hi all,

Is there a way to build an RPM that won't execute the preun and postun
scripts during an upgrade?
I have some files that need not to be deleted during an upgrade but should
be removed only on uninstall.

I don't want the user to type in --nopreun and --nopostun for upgrades every
time.  It'll be nice if there's a flag I can check whether the operation is
upgrade or not.

Thanks in advance,
Joe Luong

------------------------------------------------------------------------------
Notice: This e-mail message, together with any attachments, contains information of Merck & Co., Inc. (Whitehouse Station, New Jersey, USA) that may be confidential, proprietary copyrighted and/or legally privileged, and is intended solely for the use of the individual or entity named on this message.  If you are not the intended recipient, and have received this message in error, please immediately return this by e-mail and then delete it.

==============================================================================





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []