Bug 84311

Summary: Excludepath on rpm 4.2, rawhide
Product: [Retired] Red Hat Raw Hide Reporter: Ivan Gyurdiev <ivg231>
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED RAWHIDE QA Contact: Mike McLean <mikem>
Severity: medium Docs Contact:
Priority: medium    
Version: 1.0   
Target Milestone: ---   
Target Release: ---   
Hardware: athlon   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-12-27 19:48:52 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:
Attachments:
Description Flags
Fix/workaround for --excludepath none

Description Ivan Gyurdiev 2003-02-14 09:57:30 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030206

Description of problem:
Similar problems have been marked as CLOSED and DUPLICATE
for earlier versions of rpm, but excludepath still doesn't work on 4.2. Here's a
demo with SysVinit on a devfs enabled system.

[root@cobra archives]# rpm -Uvh --excludepath /dev Sys*
warning: SysVinit_2.84-13_i386.rpm: V3 DSA signature: NOKEY, key ID 897da07a
Preparing...                ########################################### [100%]
   1:SysVinit               ########################################### [100%]
error: unpacking of archive failed on file /dev/initctl: cpio: rename failed -
Operation not permitted
[root@cobra archives]# rpm -q rpm
rpm-4.2-0.66
[root@cobra archives]# 

Note: your bugzilla database marks the version of rpm incorrectly as 1.0. That's
the only version available to select.


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.rpm -Uvh --excludepath 
2.
3.
    

Additional info:

Comment 1 Konstantin Bukharov 2003-07-19 15:11:12 UTC
Created attachment 93018 [details]
Fix/workaround for --excludepath

Actually this bug exists in RedHat Linux 9 also (not only in rawhide).

Problem is in fact, that --excludepath option is processed in rpmfi.c around
line 788 (function relocateFileList called from rpmfiNew). But FA_SKIPNSTATE
flags added in relocateFileList due to '--excludepath' option are discarded in
transaction.c around line 1528 in function rpmtsRun. Note that at this place,
old fi->actions saved at line 1512 contains only FA_SKIPNSTATE due to
--excludedocs/--excludeconf.
As quick workaround to restore --excludepath functionality it is needed to copy
FA_SKIPNSTATE flags from fi-actions to actions before freeing fi-actions at
line 1528.

Comment 2 Jeff Johnson 2003-12-27 19:48:52 UTC
This is fixed in (at least) rpm-4.2.2. Your analysis was mostly
correct, but the real problem was elsewhere.