New issue
Advanced search Search tips

Issue 893754 link

Starred by 0 users

Issue metadata

Status: Fixed
Owner:
Closed: Oct 25
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Feature

Blocking:
issue 875003



Sign in to add a comment

get_latest_image.sh: move to chromite

Project Member Reported by vapier@chromium.org, Oct 9

Issue description

this is a small util script.  i think we already have util code in chromite that does the same thing, so hopefully shouldn't be too hard.

imo we should try to pull this out of the user's view so we can eventually make it a util lib only and not have a program for scripts to run at all.

(1) implement chromite/scripts/get_latest_image.py that provides same functionality as src/scripts/get_latest_image
(2) *don't* put a symlink under chromite/bin/ for it, just under chromite/scripts/
(2) update single caller in chromite to use new get_latest_image
(3) delete get_latest_image.sh from src/scripts/

 
Wanted to verify details here. I feel like I'm seeing a very different script than is described WRT its usages. Code search is turning up a good number of usages, none of which are in chromite, including a couple of docs that suggest using it.

https://cs.corp.google.com/search/?q=get_latest_image&sq=package:chromeos_&type=cs

I'm still kind of early in searching, but I've not found the chromite implementation yet, do you know off the top of your head where it might be?
that is indeed the script i'm referring to

i sent you a CL to fix the main docs.  i wouldn't worry about the autotest docs ... those are slated for cleaning.

that leaves the three normal repos: crostestutils, platform/dev/, and src/scripts/.
Project Member

Comment 3 by bugdroid1@chromium.org, Oct 16

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/docs/+/b18f0689718e0fe2f03ab469eca0fca055137924

commit b18f0689718e0fe2f03ab469eca0fca055137924
Author: Mike Frysinger <vapier@chromium.org>
Date: Tue Oct 16 17:44:40 2018

developer_guide: drop redundant get_latest_image.sh usage

The mount_gpt_image.sh script provides a flag that does the same
thing as passing in get_latest_image.sh, so use that directly.

BUG= chromium:893754 
Change-Id: I5e19ffd585abe44c2fd539a567663163b0c5ff6b
Reviewed-on: https://chromium-review.googlesource.com/1281790
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>

[modify] https://crrev.com/b18f0689718e0fe2f03ab469eca0fca055137924/developer_guide.md

Status: Started (was: Available)
thinking a bit more, i wonder if we even need this script anymore.  it basically just looks up the target of the ${DEFAULT_BUILD_ROOT}/images/${FLAGS_board}/latest symlink.  maybe we should replace all users with that direct symlink and delete the script out right ?
For the record, confirming we took the script removal route. A simple check to clarify the possible failure was added to a couple of scripts. The rest have existing checks that make the problem clear enough that it was not necessary.

Project Member

Comment 7 by bugdroid1@chromium.org, Oct 24

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/dev-util/+/d0f9e178c4373429b58f0a448d0e2e8323d99f22

commit d0f9e178c4373429b58f0a448d0e2e8323d99f22
Author: Alex Klein <saklein@chromium.org>
Date: Wed Oct 24 05:50:43 2018

get_latest_image: update usage

BUG= chromium:893754 
TEST=precq

Change-Id: If39e41f7790cae7bc242cc2fff455f46215f4c97
Reviewed-on: https://chromium-review.googlesource.com/1292029
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Alex Klein <saklein@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[modify] https://crrev.com/d0f9e178c4373429b58f0a448d0e2e8323d99f22/build_util.py
[modify] https://crrev.com/d0f9e178c4373429b58f0a448d0e2e8323d99f22/host/image_to_live.sh

Project Member

Comment 9 by bugdroid1@chromium.org, Oct 24

Project Member

Comment 10 by bugdroid1@chromium.org, Oct 25

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/crosutils/+/e1f90ebfd28c6ff0bf3f42a50d84b2e76908580b

commit e1f90ebfd28c6ff0bf3f42a50d84b2e76908580b
Author: Alex Klein <saklein@chromium.org>
Date: Thu Oct 25 03:07:18 2018

get_latest_image: delete

BUG= chromium:893754 
TEST=precq
CQ-DEPEND=CL:1291872, CL:1292029, CL:1292030

Change-Id: I38ff425499a4a5cf01b51b57afdc5a32e5d55266
Reviewed-on: https://chromium-review.googlesource.com/1291873
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Alex Klein <saklein@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[delete] https://crrev.com/999443c6ea05f515623b155ef8b3e07223396685/get_latest_image.sh

Status: Fixed (was: Started)

Sign in to add a comment