Summary: | enewuser EAPI 6 changes not listed in devmanual | ||
---|---|---|---|
Product: | Documentation | Reporter: | Jonathan Vasquez (RETIRED) <fearedbliss> |
Component: | Devmanual | Assignee: | Gentoo Devmanual Team <devmanual> |
Status: | RESOLVED INVALID | ||
Severity: | normal | CC: | chainsaw |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | test-1.2.5.ebuild |
Description
Jonathan Vasquez (RETIRED)
![]() (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. 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? 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. 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. 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? 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. Created attachment 453212 [details]
test-1.2.5.ebuild
|