egetent should consult the correct root

egetent takes an optional parameter for the root under which
to look for /etc/{passwd,group}. I was incorrectly ignoring
this argument when figuring out the path of the db file to
look at, which meant that I always consulted the target root,
even when the caller wanted to check the chroot.

CQ-DEPEND=CL:185724
BUG=chromium:250164
TEST=run build_image many times in a row. Instead of a new entry getting added every time, there should be only one.

TEST=leon-paladin: http://chromegw/p/tryserver.chromiumos/builders/leon-paladin/builds/16
TEST=stumpy-release: http://chromegw/p/tryserver.chromiumos/builders/stumpy-release/builds/365
TEST=chromium-sdk: http://chromegw/p/tryserver.chromiumos/builders/chromiumos-sdk/builds/1076

Change-Id: I5f874c72109b05fcde4fb8550e306ad761292b55
Reviewed-on: https://chromium-review.googlesource.com/185725
Reviewed-by: Chris Masone <cmasone@chromium.org>
Commit-Queue: Chris Masone <cmasone@chromium.org>
Tested-by: Chris Masone <cmasone@chromium.org>
1 file changed
tree: 3130e6054bea8521761fd61f0d1295f8177b8d86
  1. eclass/
  2. metadata/
  3. profiles/