All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHv3 0/1] Do not use command in profile
@ 2018-05-18 16:55 Peter Kjellerstedt
  2018-05-18 16:55 ` [PATCHv3 1/1] base-files: profile: Avoid using "command" to determine if programs exist Peter Kjellerstedt
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Kjellerstedt @ 2018-05-18 16:55 UTC (permalink / raw)
  To: openembedded-core

Since we apparently cannot rely on the command utility to always
exist, it is better to avoid using it in the profile script. Rather
than using command to detect if tty and resize exist (which obviously
will not work if command itself does not exist), just call them
directly while piping any output for stderr to /dev/null. This should
actually be a little bit more efficient in the case that they do
exist, and the same in the case that they do not exist.

I leave to you to decide whether you want to revert commit e41c90b852
that enabled the command utility in busybox or not.

PATCHv2: Correct a typo in the commit message

PATCHv3: Run resize twice, once to determine if it exists, and once to
actually do the resize.

//Peter

The following changes since commit 13cc30cd7de4841990b600e83e1249c81a5171dd:

  local.conf.sample.extended: Drop obsolete rpc and libnsl (2018-05-15 11:07:50 +0100)

are available in the git repository at:

  git://push.yoctoproject.org/poky-contrib pkj/profile_without_command

Peter Kjellerstedt (1):
  base-files: profile: Avoid using "command" to determine if programs
    exist

 meta/recipes-core/base-files/base-files/profile | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

-- 
2.12.0



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-05-18 16:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-18 16:55 [PATCHv3 0/1] Do not use command in profile Peter Kjellerstedt
2018-05-18 16:55 ` [PATCHv3 1/1] base-files: profile: Avoid using "command" to determine if programs exist Peter Kjellerstedt

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.