Bug 846209 - bash "read" does not work inside publish script
Summary: bash "read" does not work inside publish script
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: PressGang CCMS
Classification: Community
Component: CSProcessor
Version: 1.x
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Lee Newson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-08-07 07:12 UTC by Joshua Wulf
Modified: 2014-10-19 23:01 UTC (History)
3 users (show)

Fixed In Version: 0.26.5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-06-07 01:29:59 UTC
Embargoed:


Attachments (Terms of Use)

Description Joshua Wulf 2012-08-07 07:12:38 UTC
Using this:
https://svn.devel.redhat.com/repos/ecs/Red_Hat_Enterprise_MRG/2.2/publish.sh

as a publish script, it consistently fails at the "read" line, simply stopping - not taking further input or continuing to execute.

Executing the script in a standalone environment, outside the publish script it works as expected.

Seems to be something to do with the way csprocessor calls the script.

I need to have a "Press Y to continue, N to cancel" type thing in my script.

It was cspclient 0.26.1 on my other machine, so I'll generate the JVM version and add later to this bug.

Comment 1 Lee Newson 2012-08-07 07:20:39 UTC
No need to generate the details unless you want. I can easily confirm this as STDIN is handled by Java and not piped to the scripts. Whether or not that should be allowed is something I want to think on and discuss with the team first.

Comment 2 Joshua Wulf 2012-08-08 04:13:22 UTC
Here's my use case:

In my publish script I assemble the book, run some pre-processing on the xml, build it, then display it in a web browser for a final visual inspection before doing the rhpkg.

At that point I want to prompt: "Everything OK with this build? Shall I publish? [Y/N]"

Comment 3 Lee Newson 2012-08-08 06:43:00 UTC
I haven't talked this over with the team yet but I couldn't come up with any immediate reason not to add this besides trying block custom scripts somewhat. However in saying that I still think this should be added.

Comment 4 Lee Newson 2012-08-29 07:03:37 UTC
Added in 0.26.5.

The CSP will now pipe STDIN through to the underlying scripts for the publish command only.

Comment 5 Lee Newson 2013-06-07 01:29:59 UTC
Closing and setting as current release as no QA was performed by the original reporter. If there is still an issue with this bug still than please re-open it.


Note You need to log in before you can comment on or make changes to this bug.