mod_image_for_recovery.sh: Respect USE from the env

Currently, mod_image_for_recovery.sh ignores USE flags from the
environment when running emerge_custom_kernel. This can result in USE
flag conflicts that Portage will disallow. As a concrete example,
cbuildbot prefaces all commands with 'USE=-cros-debug' for release
builds. This results in packages built with ./build_packages to be built
with -cros-debug. However, when emerge_custom_kernel builds
chromeos-base/chromeos-initramfs, that package and its dependencies will
build with 'cros-debug' set (since mod_image_for_recovery does not
respect the -cros-debug from the environment). If there are any packages
built by ./build_packages that are also needed by
chromeos-base/chromeos-initramfs, Portage will complain, since there
will be a USE flag mismatch.

Let's address this issue by having mod_image_for_recovery.sh respect USE
flags set in the environment.

BUG=b:144849631
TEST=tryjob

Change-Id: I50c50067fdc361f9dd7cadbd6801c4e4c4819331
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosutils/+/1931298
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Robert Kolchmeyer <rkolchmeyer@google.com>
Commit-Queue: Robert Kolchmeyer <rkolchmeyer@google.com>
1 file changed