Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Ming Liu <ming.liu@windriver.com>
To: Phil Blundell <pb@pbcl.net>, Martin Jansa <martin.jansa@gmail.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH V2 2/2] screen: add pkg_postinst to register entry to /etc/shells
Date: Thu, 17 Oct 2013 19:06:08 +0800	[thread overview]
Message-ID: <525FC4A0.30200@windriver.com> (raw)
In-Reply-To: <1382007212.484.53.camel@phil-desktop.brightsign>

On 10/17/2013 06:53 PM, Phil Blundell wrote:
> On Thu, 2013-10-17 at 18:28 +0800, Ming Liu wrote:
>> On 10/17/2013 06:11 PM, Phil Blundell wrote:
>>> On Thu, 2013-10-17 at 18:03 +0800, Ming Liu wrote:
>>>> +pkg_postinst_${PN} () {
>>>> +	touch $D${sysconfdir}/shells
>>>> +	grep -q "${bindir}/screen" $D${sysconfdir}/shells || echo ${bindir}/screen >> $D${sysconfdir}/shells
>>>> +}
>>> Is that "touch" really desirable?  It seems as though screen ought not
>>> really to be creating /etc/shells if it isn't there already,
>> No, it's supposed to be created if /etc/shells doesn't exist already,
>> otherwise, how could we echo text to it?
> I guess there are two things to say about this:
>
> 1) not everybody wants /etc/shells, and having screen (or any other
> recipe) create that file unilaterally seems like a bad thing.
> Especially since there doesn't seem to be any corresponding postrm to
> clear it up if screen is then removed again, nor is /etc/shells
> mentioned in CONFFILES.
>
> 2) even if you did want to create /etc/shells, the touch is unnecessary
> because "echo foo >> FILE" is perfectly capable of creating the FILE if
> it didn't already exist.
Yes, you are correct for both of the two points, I will send the V3, 
includes the changes:
1 add postrm script, removing the entry in /etc/shells.
2 rm the unnecessary 'touch'.
3 change the regex for screen and bash recipes.(As Martin pointed out)

Anything else?

//Ming Liu
>
> p.
>
>
>
>



  reply	other threads:[~2013-10-17 11:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-17 10:03 [PATCH V2 1/2] base-files: move shells generating process to pkg_postinst Ming Liu
2013-10-17 10:03 ` [PATCH V2 2/2] screen: add pkg_postinst to register entry to /etc/shells Ming Liu
2013-10-17 10:11   ` Phil Blundell
2013-10-17 10:28     ` Ming Liu
2013-10-17 10:53       ` Phil Blundell
2013-10-17 11:06         ` Ming Liu [this message]
2013-10-17 10:33   ` Martin Jansa
2013-10-17 10:44     ` Ming Liu

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=525FC4A0.30200@windriver.com \
    --to=ming.liu@windriver.com \
    --cc=martin.jansa@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=pb@pbcl.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox