FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo Development

 
 
LinkBack Thread Tools
 
Old 11-23-2011, 11:31 PM
Mike Frysinger
 
Default restricting phases where enew{user,group} is allowed

currently we blacklist certain phases (which is largely based on EAPI=0 and
blocking src_*) for enew{user,group}. moving forward, ferringb suggested we
invert this into a whitelist of allowed phases.

afaict, the blacklisting + dev documentation has done a good job of
restricting calls to three places: pkg_{setup,preinst,postinst}. so inverting
the logic should largely be safe. on the off chance it isn't, i think letting
the ebuild `die` and getting it fixed up via bug reports is acceptable (i
grepped through the tree a bit and looked sane).

moving beyond that, i'd like to also ban pkg_postinst usage. the trouble with
using this phase is that `die` isn't fatal because the package has already
been merged to $ROOT, so there's no going back. and while logically i can see
that people might prefer pkg_postinst vs pkg_preinst (no point in creating a
user/group if the pkg isn't actually yet merged), for all real world usage,
there's no need to delay it, and it makes the ebuilds a bit more robust as
errors get caught before things get merged to $ROOT. i believe the
documentation has always recommended pkg_setup and pkg_preinst anyways.

moving even beyond that, i'd like to update the documentation to push people
to prefer pkg_preinst. if your package doesn't require the user/group to be
available at compile/install time, then there's no need to use pkg_setup.
this improves the use case of attempting to install a package from source,
things failing for whatever reason, and then the pkg is never actually
installed, but the user/group is left behind.

any feedback before i implement ?
-mike
 
Old 11-24-2011, 12:24 PM
Gilles Dartiguelongue
 
Default restricting phases where enew{user,group} is allowed

Sounds like a sane change.

--
Gilles Dartiguelongue <eva@gentoo.org>
Gentoo
 
Old 11-24-2011, 12:24 PM
Gilles Dartiguelongue
 
Default restricting phases where enew{user,group} is allowed

Sounds like a sane change.

--
Gilles Dartiguelongue <eva@gentoo.org>
Gentoo
 
Old 11-26-2011, 05:42 AM
Mike Frysinger
 
Default restricting phases where enew{user,group} is allowed

On Wednesday 23 November 2011 19:31:11 Mike Frysinger wrote:
> currently we blacklist certain phases (which is largely based on EAPI=0 and
> blocking src_*) for enew{user,group}. moving forward, ferringb suggested
> we invert this into a whitelist of allowed phases.
>
> afaict, the blacklisting + dev documentation has done a good job of
> restricting calls to three places: pkg_{setup,preinst,postinst}. so
> inverting the logic should largely be safe. on the off chance it isn't, i
> think letting the ebuild `die` and getting it fixed up via bug reports is
> acceptable (i grepped through the tree a bit and looked sane).

committed:
http://sources.gentoo.org/eclass/user.eclass?r1=1.10&r2=1.11
-mike
 

Thread Tools




All times are GMT. The time now is 10:21 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org