Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 599606 - enewuser EAPI 6 changes not listed in devmanual
Summary: enewuser EAPI 6 changes not listed in devmanual
Status: RESOLVED INVALID
Alias: None
Product: Documentation
Classification: Unclassified
Component: Devmanual (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Devmanual Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-12 18:39 UTC by Jonathan Vasquez (RETIRED)
Modified: 2016-11-13 16:22 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
test-1.2.5.ebuild (file_599606.txt,508 bytes, text/plain)
2016-11-13 16:22 UTC, Jonathan Vasquez (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Vasquez (RETIRED) gentoo-dev 2016-11-12 18:39:40 UTC
I noticed that the 6th parameter (--system) works in EAPI 5 but not in EAPI 6. EAPI 6 will fail with the message that it doesn't support that number of parameters. However, the devmanual doesn't state that the sixth parameter for 'enewuser' was removed.

https://devmanual.gentoo.org/ebuild-writing/eapi/index.html
Comment 1 Ulrich Müller gentoo-dev 2016-11-12 20:19:59 UTC
(In reply to Jonathan Vasquez from comment #0)
> I noticed that the 6th parameter (--system) works in EAPI 5 but not in EAPI
> 6. EAPI 6 will fail with the message that it doesn't support that number of
> parameters. However, the devmanual doesn't state that the sixth parameter
> for 'enewuser' was removed.
> 
> https://devmanual.gentoo.org/ebuild-writing/eapi/index.html

I cannot find any mention of enewuser in that section. However, in https://devmanual.gentoo.org/ebuild-writing/users-and-groups/index.html#adding-users the function is described with five parameters:

   enewuser <user> [uid] [shell] [homedir] [groups]

Also I don't see why it would behave differently in EAPI 5 and 6. The function is defined in user.eclass which contains no EAPI conditionals.
Comment 2 Jonathan Vasquez (RETIRED) gentoo-dev 2016-11-13 04:36:51 UTC
Hey Ulrich,

Yea you are right about it having 5 parameters (at least now). I spoke to Chainsaw yesterday in gentoo-dev and he said that the gentoo devs scanned the tree to see if anyone was using the sixth parameter (--system) before making their changes. However my ebuild at the time was in an overlay so it wasn't taken into consideration. However, in EAPI 5, that sixth parameter did work. I'm not sure how it changes behavior, but it definitely worked in EAPI 5 but not in 6. Maybe EAPI 6 made 'enewuser' more strict?
Comment 3 Michael Palimaka (kensington) gentoo-dev 2016-11-13 04:39:47 UTC
Are you sure it's not just coincidence that the change occurred around the time EAPI 6 was introduced?

The only relatively recent change to user.eclass was for bug #592176 - https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=02698677b5ebb43cdb82e580e47eb4d98725caae.
Comment 4 Jonathan Vasquez (RETIRED) gentoo-dev 2016-11-13 04:42:41 UTC
Yea I can definitely see how that shift would affect this (Basically making it more strict maybe?). I'll CC chainsaw since he might have further insight.
Comment 5 Ulrich Müller gentoo-dev 2016-11-13 08:51:55 UTC
The sixth argument was dropped in 2011 already:
https://gitweb.gentoo.org/repo/gentoo/historical.git/commit/?id=ebc74dfb3954f8d317cf3cff8b1a8d95f472a60a


(In reply to Jonathan Vasquez from comment #2)
> I'm not sure how it changes behavior, but it definitely worked in
> EAPI 5 but not in 6.

Can you provide example ebuilds in EAPI 5 and 6 so that we can reproduce the different behaviour?
Comment 6 Jonathan Vasquez (RETIRED) gentoo-dev 2016-11-13 16:22:12 UTC
I just tested the attached ebuild in a clean environment and it is failing with EAPI 5 set. I suppose what happened was when the ebuild was written a few years ago, the 'shift' change wasn't added, and since the environment that was used for testing over the years wasn't clean during subsequent version bumps, the enewuser was never ran (user already existed), so it never failed. 

Resolving bug as invalid.
Comment 7 Jonathan Vasquez (RETIRED) gentoo-dev 2016-11-13 16:22:47 UTC
Created attachment 453212 [details]
test-1.2.5.ebuild