Skip checks for user/group existence in user.eclass

These checks cause enewuser/enewgroup calls to fail if the user/group
already exists in the board sysroot but not in the sdk root. Sometimes
users/groups need to be created in the sdk root when they already exist
in the board sysroot. For example, in order to chown a file to user
'shill' in the ebuild for strongswan, 'shill' group needs to be created
in the sdk root at the same time that it already exists in the board
sysroot. This situation arises because the shill ebuild creates the
shill user/group during pkg_preinst() (so they are created in the board
sysroot only) but the strongswan ebuild needs to create the shill
group during pkg_setup() (which creates the group in the sdk root as
well).

_write_entry_to_db() checks whether entries in the group or passwd file
exists before adding the entries, so these checks are not necessary in
the first place.

BUG=chromium:834445
TEST=before: cannot reference shill group in ebuild for strongswan, even
after calling enewgroup, after: can reference shill group

Change-Id: I2f1f9400ab8d9be615bdb56279ebddf4926b2557
Reviewed-on: https://chromium-review.googlesource.com/1017860
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Micah Morton <mortonm@chromium.org>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
1 file changed
tree: b16866dd6f4934671a3bebf82cd19311150b8170
  1. eclass/
  2. metadata/
  3. profiles/
  4. PRESUBMIT.cfg