Bug 147791 - emacs should PreReq on /usr/sbin/alternatives
Summary: emacs should PreReq on /usr/sbin/alternatives
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: emacs
Version: 3
Hardware: All
OS: Linux
medium
low
Target Milestone: ---
Assignee: Jens Petersen
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-02-11 11:52 UTC by Axel Thimm
Modified: 2007-11-30 22:11 UTC (History)
3 users (show)

Fixed In Version: 21.3-22
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-09-05 07:46:14 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Axel Thimm 2005-02-11 11:52:42 UTC
There is no dependency on /usr/sbin/alternatives (part of chkconfig),
which is required in package scripts.

I suggest to add a file dependency (not a package dependency) like

PreReq: /usr/sbin/alternatives

(see also bugs #136137 and #136137 for related discussions on
alternatives in emacs)

Thanks.

Comment 1 Jens Petersen 2005-02-11 18:01:55 UTC
Which subpackage is causing you problems?  I see:

% rpm -q --requires emacs-common|grep alternative
/usr/sbin/alternatives

Comment 2 Axel Thimm 2005-02-11 21:01:08 UTC
Yes, you are right. I checked the specfile, and the real issue is that
Requires(pre, post) does not behave as it should. Instead PreReq does
the job.

Here is a log of a today's installation on FC3 of emacs and some other
rpms. As you see the ordering of emacs-common vs chkconfig is not correct.

emacs-common               
##################################################
/var/tmp/rpm-tmp.41070: line 4: alternatives: command not found
error: %post(emacs-common-21.3-17.i386) scriptlet failed, exit status 127
pkgconfig                  
##################################################
glib2-devel                
##################################################
libstdc++-devel            
##################################################
gcc-c++                    
##################################################
libttf2                    
##################################################
freetype                   
##################################################
chkconfig                  
##################################################
xorg-x11-libs              
##################################################


Comment 3 Jens Petersen 2005-02-13 15:49:33 UTC
Out of curiousity, what are you using to upgrade with?

emacs-21.3-22 should have the fix.

Comment 4 Axel Thimm 2005-02-13 16:06:32 UTC
Thanks.

Wrt to the depsolver used for the output above: I'm not 100% sure, but I think
the above log was from apt-get. If not it was yum or smart.

Do you think that matters? AFAIU all pass on the transaction itself to rpmlib
these days, and rpmlib computes the ordering.

Comment 5 Ville Skyttä 2005-02-14 22:07:43 UTC
I don't think apt-get plays a role in that.

The "Requires(pre,post)" syntax is known to be buggy in rpm. 
Splitting that to two, ie. "Requires(pre)" and "Requires(post)" or
using PreReq which is almost the same thing should work.

http://www.redhat.com/archives/fedora-devel-list/2004-April/msg00674.html
(See the two Bugzilla pointers at end of that message)


Note You need to log in before you can comment on or make changes to this bug.