The make_chroot script was upgraded to add its customizations to a file
in /etc/sudoers.d/ instead of modifying /etc/sudoers. Then the sudo
ebuild was updated to not modify /etc/sudoers anymore. This meant for
older chroots, the customizations that make_chroot added were lost in
the process.
Add an upgrade hook that creates the split /etc/sudoers.d/ file for older
chroots that did not go through the newer make_chroot.
BUG=chromium-os:11991
TEST=set chroot to 16, deleted file, ran build_packages: chroot updated to 17 and created correct /etc/sudoers.d/90_cros file
TEST=set chroot to 17, create /etc/sudoers.d/90_cros, ran build_packages: chroot updated to 17 and left existing file alone
Change-Id: I279ac3e15380e02b50a752a62cecbd94171fd724
Reviewed-on: https://gerrit.chromium.org/gerrit/11774
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>