Bug 746074

Summary: %post script error: line 1: [: missing `]'
Product: [Fedora] Fedora Reporter: John Reiser <jreiser>
Component: seahorseAssignee: Tomáš Bžatek <tbzatek>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 16CC: mclasen, robatino, tbzatek, tsmetana
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-10-25 00:04:58 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description John Reiser 2011-10-13 20:04:20 UTC
Description of problem: "yum update" gives a shell syntax error in the %post script.


Version-Release number of selected component (if applicable):
seahorse-3.2.0-1.fc16.x86_64


How reproducible: haven't tried


Steps to Reproduce:
1. yum update   # from Fedora 16 beta x86_64 DVD to fedora.repo and fedora-updates-testing.repo of Oct.13 (Thurs.)
2.
3.
  
Actual results:
---> Package seahorse.x86_64 0:3.1.91-1.fc16 will be updated
---> Package seahorse.x86_64 0:3.2.0-1.fc16 will be an update
 seahorse                     x86_64 3.2.0-1.fc16                fedora          1.5 M
(171/196): seahorse-3.2.0-1.fc16.x86_64.rpm                     | 1.5 MB     00:03
  Updating   : seahorse-3.2.0-1.fc16.x86_64                                    361/803
  Cleanup    : seahorse-3.1.91-1.fc16.x86_64                                   449/803
/var/tmp/rpm-tmp.1Bxfnx: line 1: [: missing `]'


Expected results: no complaint


Additional info:

Comment 1 Andre Robatino 2011-10-14 17:38:11 UTC
Looking at the output of "rpm -q --scripts seahorse" I see no obvious problems, and "yum reinstall seahorse" shows no errors, so this seems fixed in the current version.

Comment 2 Tomáš Bžatek 2011-10-17 13:49:48 UTC
There have been changes to the spec file in 3.1.90-1, moving from GConf to GSettings. But 3.1.91 shouldn't be affected by post-remove script troubles. The %post and %postun sections look sane, no nested scriptet, just simple "if [ $1 -eq 0 ]; then"

Is there a chance to look at /var/tmp/rpm-tmp.1Bxfnx (or whatever the directory will be) and try to find the script executed?

Comment 3 John Reiser 2011-10-17 14:54:39 UTC
I don't see the script now.  "find /var -name rpm-tmp\*" shows only two files:
   /var/tmp/rpm-tmp.RuAwAN
   /var/tmp/rpm-tmp.L8IRa4

whose contents are:

-----/var/tmp/rpm-tmp.RuAwAN
set -x
getent group chrony > /dev/null || /usr/sbin/groupadd -r chrony
getent passwd chrony > /dev/null || /usr/sbin/useradd -r -g chrony \
       -d /var/lib/chrony -s /sbin/nologin chrony
-----

-----/var/tmp/rpm-tmp.L8IRa4
set -x
/bin/systemctl daemon-reload &> /dev/null
/sbin/install-info /usr/share/info/chrony.info.gz /usr/share/info/dir &> /dev/null
-----

Comment 4 Matthias Clasen 2011-10-25 00:04:58 UTC
The seahorse %post script has definitively no missing ]s