Page 1 of 1

atop package update error

Posted: Fri Mar 22, 2013 2:55 pm
by Imaging
We got a yum error today on our ASL box when we updated:

__

Running Transaction
Updating : atop 1/3
rpm-tmp.28270: line 4: syntax error near unexpected token `fi'
rpm-tmp.28270: line 4: `fi'
Error in PREUN scriptlet in rpm package a
rpm-tmp.28270: line 4: syntax error near unexpected token `fi'
rpm-tmp.28270: line 4: `fi'
Error in PREUN scriptlet in rpm package a

Updated:
atop.x86_64 0:2.0.2-3.el5.art

__

Anything we need to do due to the errors?

Thanks.

Re: atop package update error

Posted: Fri Mar 22, 2013 3:21 pm
by mikeshinn
Note: atop is not part of ASL, so this thread has been moved to the Atomic YUM repo forums.

Re: atop package update error

Posted: Fri Mar 22, 2013 3:33 pm
by breun
The issue seems to be a bug in the preuninstall script of the previous release (2.0.2-2), which has this invalid statement:

Code: Select all

preuninstall scriptlet (using /bin/sh):
if [ $1 -eq 0 ] ; then
    # Package removal, not upgrade

fi
You actually end up with two installed versions of atop if you upgraded from 2.0.2-2:

Code: Select all

# rpm -q atop
atop-2.0.2-2.el5.art.x86_64
atop-2.0.2-3.el5.art.x86_64
Trying to uninstall atop-2.0.2-2 will fail with the same error message:

Code: Select all

# rpm -e atop-2.0.2-2.el5.art
/var/tmp/rpm-tmp.35404: line 4: syntax error near unexpected token `fi'
/var/tmp/rpm-tmp.35404: line 4: `fi'
error: %preun(atop-2.0.2-2.el5.art.x86_64) scriptlet failed, exit status 2
In this case you can get rid of the old version and work around the error by just skipping the scripts:

Code: Select all

# rpm -e --noscripts atop-2.0.2-2.el5.art

Re: atop package update error

Posted: Fri Mar 22, 2013 4:05 pm
by Imaging
breun:

Thanks!

Re: atop package update error

Posted: Mon Jun 24, 2013 10:38 am
by ghazlewood
Thanks,

breun+1