[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [scl.org] spec2scl needs a tty?



----- Original Message -----
> From: "Doran Barton" <doran bluehost com>
> To: sclorg 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():
>         parser.error(
>             'You must either specify specfile(s) or reading from stdin, not
>             both.')
> 
> 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 
https://bitbucket.org/bkabrda/spec2scl/issues?status=new&status=open

> 
> --
> Doran L. Barton <doran 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 redhat com
> https://www.redhat.com/mailman/listinfo/sclorg
> 


--
Robert Kuska
{rkuska}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]