Bug 539620

Summary: postscriptdriver tags are lower-case and slightly tamed
Product: [Fedora] Fedora Reporter: Tim Waugh <twaugh>
Component: PackageKitAssignee: Richard Hughes <richard>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: richard, smparrish
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: 2009-11-23 16:03:11 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:
Bug Depends On:    
Bug Blocks: 456906    
Attachments:
Description Flags
0001-yum-backend-Use-lower-case-and-escape-in-postscriptd.patch none

Description Tim Waugh 2009-11-20 17:59:42 UTC
Created attachment 372563 [details]
0001-yum-backend-Use-lower-case-and-escape-in-postscriptd.patch

Description of problem:
Due to the fact that postscriptdriver tags include strings from actual devices, I think these strings need to be tamed slightly in order to avoid any potential problems.  In particular, the current implementation of the provides-finder for PPD files maps spaces " " and parentheses "()" to underscores "_".

In addition, the strings are converted to lower-case (they are always ASCII because IEEE 1284 says so) for representation as an RPM provides tag.

Here is a patch to make the PackageKit yum backend enforce that.

However, a question: how much 'taming' is necessary?  Is this required?  Is it sufficient?  I'm not sure how well yum/rpm deals with characters such as spaces in 'provides' tags, and whether it matters about extra parentheses.

Version-Release number of selected component (if applicable):
PackageKit-0.5.4-0.3.20091029git.fc12.x86_64

Comment 1 Richard Hughes 2009-11-21 14:21:49 UTC
(In reply to comment #0)
> However, a question: how much 'taming' is necessary?  Is this required?  Is it
> sufficient?  I'm not sure how well yum/rpm deals with characters such as spaces
> in 'provides' tags, and whether it matters about extra parentheses.

rpm just cares about a null terminated string -- the brackets are just for us mere mortals. You could have a provide string of "&^%*%*&^{(\t)}" and rpm would love that just the same as the other provides.

I think as long as the thing requesting the install using PackageKit does the "() " -> "_" munging, and the auto-provide script does the same then I don't think we need any change in the backend at all.

Comment 2 Tim Waugh 2009-11-23 16:03:11 UTC
OK, will drop the "() " munging altogether and get the clients to perform lower-casing.

Thanks!