All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Burton, Ross" <ross.burton@intel.com>
To: Andre McCurdy <armccurdy@gmail.com>
Cc: Mike Looijmans <mike.looijmans@topic.nl>,
	Peter Kjellerstedt <peter.kjellerstedt@axis.com>,
	"openembedded-core@lists.openembedded.org"
	<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH] base-files: profile: Get rid of "resize"
Date: Mon, 18 Sep 2017 19:43:26 +0100	[thread overview]
Message-ID: <CAJTo0LZrPSoVNAX6onFFsGgkD1LEm=2DLdBOecnhNEQBRDnS6A@mail.gmail.com> (raw)
In-Reply-To: <CAJ86T=UqdDrT2ApxMiM=g__pTftCc5g0-gzs20vd-jV06+6x7w@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3270 bytes --]

On 18 September 2017 at 19:41, Andre McCurdy <armccurdy@gmail.com> wrote:

> On Mon, Sep 18, 2017 at 8:17 AM, Burton, Ross <ross.burton@intel.com>
> wrote:
> > On 18 September 2017 at 16:07, Peter Kjellerstedt
> > <peter.kjellerstedt@axis.com> wrote:
> >>
> >> > -----Original Message-----
> >> > From: openembedded-core-bounces@lists.openembedded.org
> >> > [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf
> Of
> >> > Mike Looijmans
> >> > Sent: den 18 september 2017 16:07
> >> > To: openembedded-core@lists.openembedded.org
> >> > Cc: Mike Looijmans <mike.looijmans@topic.nl>; Peter Kjellerstedt
> >> > <peter.kjellerstedt@axis.com>
> >> > Subject: [OE-core] [PATCH] base-files: profile: Get rid of "resize"
> >> >
> >> > The "resize" command actually outputs shell commands to be executed,
> for
> >> > example:
> >> >
> >> > $ resize
> >> > COLUMNS=102;
> >> > LINES=27;
> >> > export COLUMNS LINES;
> >> >
> >> > The output of "resize" is being discarded to /dev/null so the call has
> >> > no
> >> > effect whatsoever, and does not change the environment (it cannot
> change
> >> > the
> >> > environment of its parent). Remove the call and hence solve the
> messages
> >> > about shells missing "command" or "tty" or "resize".
> >> >
> >> > Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
> >> > ---
> >> >  meta/recipes-core/base-files/base-files/profile | 9 ---------
> >> >  1 file changed, 9 deletions(-)
> >> >
> >> > diff --git a/meta/recipes-core/base-files/base-files/profile
> >> > b/meta/recipes-core/base-files/base-files/profile
> >> > index a062028..cfd0d69 100644
> >> > --- a/meta/recipes-core/base-files/base-files/profile
> >> > +++ b/meta/recipes-core/base-files/base-files/profile
> >> > @@ -20,15 +20,6 @@ if [ -d /etc/profile.d ]; then
> >> >       unset i
> >> >  fi
> >> >
> >> > -if command -v resize >/dev/null && command -v tty >/dev/null; then
> >> > -     # Make sure we are on a serial console (i.e. the device used
> >> > starts with
> >> > -     # /dev/tty[A-z]), otherwise we confuse e.g. the eclipse launcher
> >> > which
> >> > -     # tries do use ssh
> >> > -     case $(tty) in
> >> > -             /dev/tty[A-z]*) resize >/dev/null;;
> >> > -     esac
> >> > -fi
> >> > -
> >> >  export PATH PS1 OPIEDIR QPEDIR QTDIR EDITOR TERM
> >> >
> >> >  umask 022
> >> > --
> >> > 1.9.1
> >>
> >> Hold on. Looking at busybox' source code for resize, it seems that
> >> it actually does something besides outputting the shell code to
> >> set the variables (which is actually enabled by a separate feature
> >> called ENABLE_FEATURE_RESIZE_PRINT). It also calls
> >> ioctl(STDERR_FILENO, TIOCSWINSZ, &w) where w contains the
> >> calculated sizes.
> >
> > My knowledge of ANSI escapes is incredibly sketchy, but isn't that the
> code
> > to *get* the size of the screen?  Put the cursor at 999,999, then ask
> where
> > it is?
>
> The behaviour may have got broken with the various /etc/profile
> rewrites but it certainly did do something useful originally - it
> greatly improves usability for shells run on serial consoles. Please
> don't just remove it.
>

The question is does it do something useful *now*?

Ross

[-- Attachment #2: Type: text/html, Size: 4969 bytes --]

  reply	other threads:[~2017-09-18 18:43 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-18  8:39 [PATCH 1/2] base-files: profile: Do not assume that the 'command' command exists Mike Looijmans
2017-09-18  8:39 ` [PATCH 2/2] base-files: profile: Make the "resize" command have the intended effect Mike Looijmans
2017-09-18  8:49 ` [PATCH 1/2] base-files: profile: Do not assume that the 'command' command exists Peter Kjellerstedt
2017-09-18 11:31   ` Mike Looijmans
2017-09-18 13:08     ` Burton, Ross
2017-09-18 13:24       ` Mike Looijmans
2017-09-18 13:56         ` Mike Looijmans
2017-10-13  9:53           ` ChenQi
2017-10-13 10:07             ` ChenQi
2018-05-18 10:28               ` Martin Jansa
2018-05-18 16:51                 ` Peter Kjellerstedt
2018-05-18 17:32                   ` Martin Jansa
2017-09-18 14:07       ` [PATCH] base-files: profile: Get rid of "resize" Mike Looijmans
2017-09-18 15:07         ` Peter Kjellerstedt
2017-09-18 15:17           ` Burton, Ross
2017-09-18 18:41             ` Andre McCurdy
2017-09-18 18:43               ` Burton, Ross [this message]
2017-09-18 19:01                 ` Andre McCurdy
2017-09-18 19:19                   ` Burton, Ross
2017-09-18 19:30                     ` Andre McCurdy
2017-09-18 20:18                       ` Burton, Ross
2017-09-18 21:11                         ` Andre McCurdy
2017-09-18 23:07                           ` Trevor Woerner
2017-09-19  5:35                             ` Mike Looijmans
2017-09-19 12:34                           ` Burton, Ross
2017-09-19  5:31                     ` Mike Looijmans
2017-09-19  5:26                 ` Mike Looijmans
2017-09-19 12:33                   ` Burton, Ross
2017-09-18 14:30 ` ✗ patchtest: failure for "base-files: profile: Do not as..." and 1 more (rev2) Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJTo0LZrPSoVNAX6onFFsGgkD1LEm=2DLdBOecnhNEQBRDnS6A@mail.gmail.com' \
    --to=ross.burton@intel.com \
    --cc=armccurdy@gmail.com \
    --cc=mike.looijmans@topic.nl \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=peter.kjellerstedt@axis.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.