sbom-package-info: use build environment to get source dir

It is not always the case that packages compile from sources unpacked in
the package build dir. In particular, cros-workon ebuilds sometimes use
source that is already present in the source tree as an optimization.
The S ebuild variable should be the source of truth for compiled sources
(it is the default working directory for src_prepare, src_configure,
src_compile, and src_install).

BUG=b/393420941
TEST=presubmit
RELEASE_NOTE=None

Change-Id: I7aff54c37bdf781772a75e64078f1ff148e1b8aa
Reviewed-on: https://cos-review.googlesource.com/c/third_party/platform/crosutils/+/91736
Reviewed-by: He Gao <hegao@google.com>
Tested-by: Cusky Presubmit Bot <presubmit@cos-infra-prod.iam.gserviceaccount.com>
1 file changed