Bug 49665

Summary: rpm executes triggers with --test --nodeps
Product: [Retired] Red Hat Linux Reporter: Gerald Britton <gbritton>
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED DUPLICATE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-07-23 18:21:49 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Gerald Britton 2001-07-22 23:07:39 UTC
Description of Problem:
When running "rpm --test --nodeps -Uvh XFree86-4.1.0-0.8.6.i386.rpm"
from rawhide, rpm tries to execute this trigger:

% rpm -q --triggers XFree86   
triggerpostun script (through /bin/sh) -- XFree86
for dir in lbxproxy proxymngr rstart xserver ; do
   if [ -d /usr/X11R6/lib/X11/$dir ] ; then
      cp -af /usr/X11R6/lib/X11/$dir/* /etc/X11/$dir 2>/dev/null
      rm -rf /usr/X11R6/lib/X11/$dir
   fi

   # no need to keep this symlink around any longer - pgb 06/28/00
   # these are needed for 3.x servers - notting 07/24/00
   [ ! -L /usr/X11R6/lib/X11/$dir ] && \
      ln -snf ../../../../etc/X11/$dir /usr/X11R6/lib/X11/$dir
   :
done

How Reproducible:
Always.

Steps to Reproduce:
1. rpm --test --nodeps -Uvh XFree86-4.1.0-0.8.6.i386.rpm

Actual Results:
% rpm --test --nodeps -Uvh XFree86-4.1.0-0.8.6.i386.rpm 
Preparing...                ########################################### [100%]
rm: cannot unlink `/usr/X11R6/lib/X11/lbxproxy': Permission denied
rm: cannot unlink `/usr/X11R6/lib/X11/proxymngr': Permission denied
rm: cannot unlink `/usr/X11R6/lib/X11/rstart': Permission denied
rm: cannot unlink `/usr/X11R6/lib/X11/xserver': Permission denied
% 

Expected Results:
% rpm --test --nodeps -Uvh XFree86-4.1.0-0.8.6.i386.rpm 
%

Additional Information:

Comment 1 Jeff Johnson 2001-07-23 18:21:42 UTC
Yup, goofy legacy behavior.

Workaround by adding --notriggers to the command line.

Comment 2 Jeff Johnson 2001-07-24 03:14:13 UTC

*** This bug has been marked as a duplicate of 25756 ***