Bug 3395

Summary: update_alternatives RPM macro botches install scripts
Product: Sisyphus Reporter: Mikhail Zabaluev <mhz>
Component: libalternatives-develAssignee: inger <inger>
Status: CLOSED WONTFIX QA Contact: qa-sisyphus
Severity: minor    
Priority: P2    
Version: unstable   
Hardware: all   
OS: Linux   

Description Mikhail Zabaluev 2003-12-22 03:35:37 MSK
In /etc/rpm/macros.d/alternatives, there is a macro:

%update_alternatives() [ -x /usr/sbin/alternatives-update ] &&
/usr/sbin/alternatives-update %* ||: %nil

Using this macro in package scripts (in my case, %triggerun)
results in an 'unexpected EOF' script error during package installation.

A manual expansion of the macro, without the trailing %nil, is workable.
Comment 1 inger@altlinux.org 2004-06-24 13:18:48 MSD
я специально делал это как функцию, были какие-то на это причины.  
у меня конструкция, указанная ниже, работает. 
 
%triggerpostun -- %name, %name < 1:1.4-alt6.p5 
%update_alternatives