Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 130306

Summary: "#" in a filename in a manifest fails
Product: [Fedora] Fedora Reporter: Mark Hatle <mhatle>
Component: rpmAssignee: Paul Nasrat <nobody+pnasrat>
Status: CLOSED DUPLICATE QA Contact: Mike McLean <mikem>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: nobody+pnasrat
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-10-29 21:25:46 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
Patch to change the behavior to only recognize a "#" comment only at BOL none

Description Mark Hatle 2004-08-18 21:55:15 UTC
If the pathname of a file in an RPM manifest includes a "#", the
remainder of the line is treated as a comment.

Comment 1 Mark Hatle 2004-08-18 21:56:43 UTC
Created attachment 102860 [details]
Patch to change the behavior to only recognize a "#" comment only at BOL

Change the behavior of RPM when processing manifests from believing any
"#" is a comment start, to only a "#" at the Beginning-of-Line is a
comment.  (It allows for white space to be ignored at the BOL.)

This behavior is required to account for pathnames that have a "#" in
them.

Comment 2 James Olin Oden 2004-08-19 12:49:11 UTC
Hi Mark,

I would much prefer a patch that allows for escaped comments.
Something like adding \ before any # you want to be interpreted as
part of a filename.   I personally haven't put comments after a
filename, but I can't say others have not, and I would not want
their manifests to break.

Cheers...james

Comment 3 Mark Hatle 2004-08-19 16:38:40 UTC
It shouldn't be hard to add a loop (along with the attached path) that
after checking s[0]='#' to move over the string looking for "#" then
s[i-1]!='\' terminate the string.

(This makes the creation of the manifest a bit more difficult in my
opinion, but I think it would restore behavior?)

jbj, any opinion?  I can spend a couple of minutes to do this if you
think it's valuable.

As an FYI, we encountered this because our installer was doing a
"find" operation on a path full of packages and placing the results
into a manifest file and then passing that to RPM.  On solaris there
are a number of dynamic mount points that contain a "#" in them. 
(such as "/dev/cdrom#1")

Comment 4 John Thacker 2006-10-29 21:25:46 UTC

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