atop package update error

General Discussion of atomic repo and development projects.

Ask for help here with anything else not covered by other forums.
Imaging
Forum Regular
Forum Regular
Posts: 346
Joined: Sat Sep 25, 2010 2:46 pm

atop package update error

Unread post 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.
User avatar
mikeshinn
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 4149
Joined: Thu Feb 07, 2008 7:49 pm
Location: Chantilly, VA

Re: atop package update error

Unread post by mikeshinn »

Note: atop is not part of ASL, so this thread has been moved to the Atomic YUM repo forums.
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Re: atop package update error

Unread post 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
Last edited by breun on Fri Mar 22, 2013 5:05 pm, edited 1 time in total.
Lemonbit Internet Dedicated Server Management
Imaging
Forum Regular
Forum Regular
Posts: 346
Joined: Sat Sep 25, 2010 2:46 pm

Re: atop package update error

Unread post by Imaging »

breun:

Thanks!
ghazlewood
Forum User
Forum User
Posts: 40
Joined: Thu Feb 26, 2009 6:50 pm

Re: atop package update error

Unread post by ghazlewood »

Thanks,

breun+1
Post Reply