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 01-19-2011, 02:25 PM
"Paweł Hajdan, Jr."
 
Default RFC: check for enewuser, enewgroup outside of pkg_setup

There was a discussion on irc about a package that called enewuser and
enewgroup from pkg_preinst. That made it fail on fresh install, because
the new user was needed at the src_install time (for ownership of the
installed files). However, if the user was already present on the
system, it was just a no-op, making the issue very hard to detect for
the package's maintainer or anyone who had it previously installed.

To avoid this type of problem in the future, I'd like to add the
following check:

"If enewuser or enewgroup is called from outside of pkg_setup, fail"

Initially I was thinking about a repoman check, but in theory someone
may extract code to a function called from pkg_setup, confusing the tool.

An alternative solution would be to make enewuser and enewgroup check
which ebuild phase called them, and fail if it's not pkg_setup
(important: that must happen before the check for existing user/group).

To make transition easy, we can make the error non-fatal for some time.

What do you think?
 

Thread Tools




All times are GMT. The time now is 06:09 AM.

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