Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug.
Summary: hsc2hs not found error due to update-alternatives not found (missing Requires:
chkconfig)
https://bugzilla.redhat.com/show_bug.cgi?id=753661
Summary: hsc2hs not found error due to update-alternatives not
found (missing Requires: chkconfig)
Product: Fedora EPEL
Version: el6
Platform: Unspecified
OS/Version: Unspecified
Status: NEW
Severity: unspecified
Priority: unspecified
Component: ghc
AssignedTo: petersen(a)redhat.com
ReportedBy: giamteckchoon(a)gmail.com
QAContact: extras-qa(a)fedoraproject.org
CC: petersen(a)redhat.com, fedora-haskell-list(a)redhat.com
Classification: Fedora
Story Points: ---
Type: ---
Description of problem:
When try to build other packages that require ghc in mock, a couple of them
can't be compile due to hsc2hs not found error. ghc-6.12.3-5.el6 and
ghc-6.12.3-6.el6 (I think) in %post and %preun sections in spec file as below:
%post
# Alas, GHC, Hugs, and nhc all come with different set of tools in
# addition to a runFOO:
#
# * GHC: hsc2hs
# * Hugs: hsc2hs, cpphs
# * nhc: cpphs
#
# Therefore it is currently not possible to use --slave below to form
# link groups under a single name 'runhaskell'. Either these tools
# should be disentangled from the Haskell implementations, or all
# implementations should have the same set of tools. *sigh*
update-alternatives --install %{_bindir}/runhaskell runhaskell \
%{_bindir}/runghc 500
update-alternatives --install %{_bindir}/hsc2hs hsc2hs \
%{_bindir}/hsc2hs-ghc 500
%preun
if [ "$1" = 0 ]; then
update-alternatives --remove runhaskell %{_bindir}/runghc
update-alternatives --remove hsc2hs %{_bindir}/hsc2hs-ghc
fi
So it needs update-alternatives to do the linking if I am right in fact the
spec file will need to add Requires: chkconfig or else when installing ghc will
have the errors as below:
Non-fatal POSTIN scriptlet failure in rpm package ghc-6.12.3-6.el6.i686
/var/tmp/rpm-tmp.E4LKqM: line 13: update-alternatives: command not found
/var/tmp/rpm-tmp.E4LKqM: line 15: update-alternatives: command not found
warning: %post(ghc-6.12.3-6.el6.i686) scriptlet failed, exit status 127
Version-Release number of selected component (if applicable):
ghc-6.12.3-5.el6
ghc-6.12.3-6.el6
In fact past versions/release can have the same problem if the %post and %preun
sections are the same and without chkconfig in Requires list.
How reproducible:
When build in mock environment where chkconfig package isn't install by default
will have this issue since update-alternatives is provided by chkconfig rpm
package.
Like when you try to compile/build any of the packages that need hsc2hs in ghc
package where ghc only has /usr/bin/hsc2hs-ghc and during %post section use
update-alternatives to do the linking of /usr/bin/hsc2hs-ghc to hsc2hs-ghc.
i.e Try to build any of the following without chkconfig rpm package install:
xmonad-0.9.1-6.1.el6
ghc-X11-1.5.0.0-5.el6
hscolour-1.16-1.el6
The list goes on... ...
Thanks.
Kindest regards,
Giam Teck Choon
--
Configure bugmail:
https://bugzilla.redhat.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.