[bitbake-devel] [PATCH] bitbake : Paginate 'bitbake -e' using less.

Diana Thayer garbados at gmail.com
Mon Jun 26 20:48:18 UTC 2017


Thank you for the feedback!

I've added lines to check $OE_PAGER and $PAGER, such that `PAGER=cat
bitbake -e` effectively disables pagination.

Regarding the option '--paginate', would it capture output from whatever
command has run? I'm not sure how to capture stdout at such a scope.


On Tue, Jun 20, 2017 at 6:39 AM, Peter Kjellerstedt <
peter.kjellerstedt at axis.com> wrote:

> Basically, this change needs to be aware of the destination for the
> output. If it is a tty, then it is fine to output to a viewer such as less,
> but otherwise it should go to stdout as before. This should of course not
> be hardcoded, but use environment variables, e.g., $OE_PAGER || $PAGER ||
> less (inspired by git_pager() in the git source). You should also not
> expect that everyone wants the options you have used for less. Looking
> again at how git handles this, they use “LESS=FRX <command>” if the $LESS
> environment variable is not set, and does not modify it if it is set. You
> also want to add options such as --paginate and --no-pager (yet again
> inspired by git) to bitbake.
>
>
>
> All in all, look at and be inspired by how git handles pagers, they have
> this pretty well covered.
>
>
>
> //Peter
>
>
>
> *From:* bitbake-devel-bounces at lists.openembedded.org [mailto:
> bitbake-devel-bounces at lists.openembedded.org] *On Behalf Of *Burton, Ross
> *Sent:* den 20 juni 2017 12:06
> *To:* Diana Thayer <garbados at gmail.com>
> *Cc:* bitbake-devel <bitbake-devel at lists.openembedded.org>
> *Subject:* Re: [bitbake-devel] [PATCH] bitbake : Paginate 'bitbake -e'
> using less.
>
>
>
>
>
> On 20 June 2017 at 05:54, Diana Thayer <garbados at gmail.com> wrote:
>
> +        pager = subprocess.Popen(['less', '-F', '-R', '-S', '-X', '-K'],
> +                                 stdin=subprocess.PIPE,
> +                                 stdout=sys.stdout,
> +                                 universal_newlines=True)
>
>
> What if I'm piping bitbake -e though grep or into a file already?
>
>
>
> Ross
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/bitbake-devel/attachments/20170626/ec93c587/attachment-0002.html>


More information about the bitbake-devel mailing list