[Fedora-packaging] %preun problems

Gary Gatling gsgatlin at ncsu.edu
Fri Jul 26 20:23:12 UTC 2013


Hello. I have a package I created called bumblebee. I am trying to get it
into fedora. I made some changes and now on fedora I get errors
un-installing. Here is what my %preun looks like:

%preun
# Package removal, not upgrade
%if 0%{?rhel} == 6
if [ $1 -eq 0 ] ; then
/sbin/service bumblebeed stop >/dev/null 2>&1 || :
/sbin/chkconfig --level 2345 bumblebeed off >/dev/null 2>&1 || :
/sbin/chkconfig --del bumblebeed >/dev/null 2>&1 || :
fi
%endif
%if 0%{?fedora:1} || 0%{?rhel} >= 7
%systemd_preun bumblebeed.service
%endif

And here is the error message:

Running transaction
  Updating   : bumblebee-3.2.1-3.fc19.x86_64                                1/2
/var/tmp/rpm-tmp.abgRF7: line 3: syntax error near unexpected token `fi'
/var/tmp/rpm-tmp.abgRF7: line 3: `fi'
error: %preun(bumblebee-3.2.1-2.fc19.x86_64) scriptlet failed, exit status 2
Error in PREUN scriptlet in rpm package bumblebee-3.2.1-2.fc19.x86_64
  Verifying  : bumblebee-3.2.1-3.fc19.x86_64                                1/2
  Verifying  : bumblebee-3.2.1-2.fc19.x86_64                                2/2


Can anyone see what I am doing wrong? This is causing me so much
stress right now.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.fedoraproject.org/pipermail/packaging/attachments/20130726/4cb1b451/attachment.html>


More information about the packaging mailing list