From cc6c70f34d35b2418b5491a0f4306e279a8e8d08 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Mon, 25 Jun 2012 16:16:34 -0400 Subject: [PATCH] If installing with installp, error out if there is already an instance of the rpm package installed. --HG-- branch : 1.7 --- sudo.pp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/sudo.pp b/sudo.pp index c6150eac0..ff45f4841 100644 --- a/sudo.pp +++ b/sudo.pp @@ -293,6 +293,19 @@ still allow people to get their work done." $mandir/cat*/* 0644 optional $mandir/man*/* 0644 optional +%pre [aix] + if rpm -q %{name} >/dev/null 2>&1; then + echo "Another version of sudo is currently installed via rpm." 2>&1 + echo "Please either uninstall the rpm version of sudo by running \"rpm -e sudo\"" 2>&1 + echo "or upgrade the existing version of sudo using the .rpm packagae instead" 2>&1 + echo "instead of the .bff package." 2>&1 + echo "" 2>&1 + echo "Note that you may need to pass rpm the --oldpackage flag when upgrading" 2>&1 + echo "the AIX Toolbox version of sudo to the latest sudo rpm from sudo.ws." 2>&1 + echo "" 2>&1 + exit 1 + fi + %post [!rpm,deb] # Don't overwrite an existing sudoers file %if [solaris] -- 2.40.0