[OE-core] [PATCH V3 3/3] bash: add pkg_postrm to remove the entry in /etc/shells

Phil Blundell pb at pbcl.net
Fri Oct 18 15:18:12 UTC 2013


On Fri, 2013-10-18 at 10:12 -0500, Mark Hatle wrote:
> On 10/18/13 9:59 AM, Phil Blundell wrote:
> > On Fri, 2013-10-18 at 19:11 +0800, Ming Liu wrote:
> >>   pkg_postinst_${PN} () {
> >> -	touch $D${sysconfdir}/shells
> >> -	grep -q "bin/bash" $D${sysconfdir}/shells || echo /bin/bash >> $D${sysconfdir}/shells
> >> -	grep -q "bin/sh" $D${sysconfdir}/shells || echo /bin/sh >> $D${sysconfdir}/shells
> >> +	if [ ! -f $D${sysconfdir}/shells ]; then
> 
> One note with the above check.  Whichever package is responsible for providing 
> the 'shells' file needs to be installed -first-.  So anything that manipulates 
> the 'shells' file will need an RDEPENDS on that package.

Isn't the whole point of the check above that it now creates /etc/shells
if it didn't exist already?

That said, though, I'm still not entirely convinced that having
semi-random packages create a file that isn't mentioned in either FILES
or CONFFILES is a very good thing.  I'm also not totally clear on what
exactly the problem is that this set of patches is trying to solve: the
original commit message says that having nonexistent files named
in /etc/shells is "unreasonable" but doesn't provide any supporting
evidence for that assertion.

p.





More information about the Openembedded-core mailing list