[scl.org] spec2scl needs a tty?
rkuska at redhat.com
Mon Mar 7 09:53:34 UTC 2016
----- Original Message -----
> From: "Doran Barton" <doran at bluehost.com>
> To: sclorg at redhat.com
> Sent: Friday, March 4, 2016 10:53:55 PM
> Subject: [scl.org] spec2scl needs a tty?
> We are working on automating RPM builds (including SCL builds) using
> Bamboo. Our automated scripts work great when we run them at the command
> line, but when we run them via Bamboo, they fail because there is a
> line that calls 'spec2scl' and spec2scl has code in it like this:
> if len(args.specfiles) > 0 and not sys.stdin.isatty():
> 'You must either specify specfile(s) or reading from stdin, not
> Does anyone know the reasoning behind this?
When I added to spec2scl functionality to process specfiles sent to it via stdin
I found sys.stdin.isatty to be the best function to detect if I have any anything
to read from. To keep spec2scl simple I decided that it would the best
(as described in error message) to either have specfiles provided as argument or
via stdin, not both.
The problem for you, if I understand you correctly is that you are invoking
in your scripts spec2scl using arguments but Bamboo sends into something via stdin,
or do you want to use both (argument+stdin) methods at once?
Please feel free to open an issue at
> Doran L. Barton <doran at bluehost.com> - Senior Developer at Bluehost
> "We want to do and get good things because we want to enjoy the memories."
> -- Seen on a body sponge wrapper in Japan
> SCLorg mailing list
> SCLorg at redhat.com
More information about the SCLorg