api: controller: Don't resolve the factory_shim_location
In legacy builders, we pass the symlink to BuildFactoryZip without
resolving it.
The rubik builder resolve the symlink before pass it to
chromite.service.image.create_factory_image_zip and the basename of
factory_shim_dir becomes Rxxx-xxxxx.x.x-xx-factory_shim instead of
factory_shim.
image_tool and easy bundle creation depend on the directory name to be
factory_shim. Thus, breaks with factory_image.zip which built by rubik
builder.
To solve this, we don't resolve the factory_shim_location.
BUG=b:239914967
TEST=./run_tests
Change-Id: I55434c463743e0083d8adb2a78af1aa54517bc5a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/3779934
Tested-by: Cheng Yueh <cyueh@chromium.org>
Reviewed-by: George Engelbrecht <engeg@google.com>
Reviewed-by: Alex Klein <saklein@chromium.org>
Commit-Queue: Cheng Yueh <cyueh@chromium.org>
diff --git a/api/controller/image.py b/api/controller/image.py
index 4717c38..fa67275 100644
--- a/api/controller/image.py
+++ b/api/controller/image.py
@@ -169,7 +169,7 @@
base_path = chroot.full_path(sysroot_class.path)
board = build_target.name
factory_shim_location = Path(
- image_lib.GetLatestImageLink(board, pointer=LOCATION_FACTORY)).resolve()
+ image_lib.GetLatestImageLink(board, pointer=LOCATION_FACTORY))
generated = []
dlc_func = functools.partial(image.copy_dlc_image, base_path)