Bug 979247
Summary: | Bug: Allows space in book version | ||
---|---|---|---|
Product: | [Community] PressGang CCMS | Reporter: | Misha H. Ali <mhusnain> |
Component: | CSProcessor | Assignee: | Lee Newson <lnewson> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | |
Severity: | urgent | Docs Contact: | |
Priority: | urgent | ||
Version: | 1.0 | CC: | lnewson, mcaspers, rlandman |
Target Milestone: | --- | Keywords: | Reopened |
Target Release: | 1.2 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | 0.33.2 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2013-10-17 23:49:50 UTC | Type: | Bug |
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: | 1011904 |
Description
Misha H. Ali
2013-06-28 04:43:45 UTC
Fixed in 0.33.2 The regex used for validation has been updated to remove the ability to have spaces. 0.33.2 has been released. Tested, works as expected. (In reply to Misha H. Ali from comment #0) > Description of problem: > > The version field in the CSP map allows a value with a space, which is not > allowed by publican. That's not /quite/ true; it's not allowed by Publican if a valid "version:" parameter is not set in the Publican.cfg file. Publican looks first to the "version:" parameter in the publican.cfg file for a value with which it can generate a valid RPM name. If it doesn't find the parameter set there, it looks at the <productnumber> in the Book_Info.xml file. If it doesn't find a valid value there either, it errors out. So PressGang should allow spaces in the "version:" parameter, since I assume that anything in PressGang's publican.cfg parameter gets used, and this can contain a valid version; ie, the topic map could specify: version = 6.6 Beta publican.cfg = [xml_lang: "en-US" type: Book version: 6-Beta git_branch: docs-rhel-6] PressGang might even implement logic so that if the (PressGang) version parameter is not valid for RPM naming, then the (publican.cfg) version parameter must, or the topic map fails validation. I definitely agree with Rudi that this isn't the case and the "Version" metadata should allow spaces (sorry I should have looked into this more originally). As such I'll be reverting this change for 1.2. Adding a little bit more detail to the way the publican.cfg "version" is currently configurable. This can be configured as Rudi mentioned above via the "publican.cfg" metadata. If it's not used by that then it will attempt to get the value from the "Book Version" and lastly fallback to the "Version" metadata. So I believe what needs to be done here is to re-enable spaces in the Version field and then alter the mechanism that sets the publican.cfg "version" value to escape the "Book Version" or "Version" metadata fields accordingly (this is the way we currently do it for "product" and "docname". Sorry folks, looks like I jumped the gun on reporting this as a bug. I've updated this so that the Version can now have spaces and will be escaped accordingly if it fallen back to when setting the "version" in publican.cfg. Confirmed that the content spec Version field can take a space, and that the publican.cfg file (or files if more than one publican.cfg file is specified) will get a version field with the space replaced with a dash. Confirmed that any version information specified in the publican.cfg file won't be overwritten by the Version metadata in the spec. Also confirmed that if one publican.cfg file does have a version, and a second does not, the one that does not will have a fixed version added and the one that does will not be touched. |