mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-10 14:36:58 +02:00
Fix bug where you can't mount a non-developer image from the most recent image.
Currently if you use -m and -i chromiumos_test_image.bin, you get an error saying that -i and --from=<block_device> are incompatible. -m changes --from to the most recent folder but does this after the check so this is broken. This change re-orders the calls to fix this bug. BUG=None TEST=Ran it with args that were broken. Change-Id: I367a74f7b77f127b6ad8eeeb92ab72ae00e5235e Reviewed-on: https://gerrit.chromium.org/gerrit/17760 Commit-Ready: Chris Sosa <sosa@chromium.org> Reviewed-by: Chris Sosa <sosa@chromium.org> Tested-by: Chris Sosa <sosa@chromium.org>
This commit is contained in:
parent
e9e2d66366
commit
f37f64d929
@ -51,6 +51,11 @@ eval set -- "${FLAGS_ARGV}"
|
|||||||
# Die on error
|
# Die on error
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
# Find the last image built on the board.
|
||||||
|
if [ ${FLAGS_most_recent} -eq ${FLAGS_TRUE} ] ; then
|
||||||
|
FLAGS_from="$(${SCRIPT_ROOT}/get_latest_image.sh --board="${FLAGS_board}")"
|
||||||
|
fi
|
||||||
|
|
||||||
# Check for conflicting args.
|
# Check for conflicting args.
|
||||||
# If --from is a block device, --image can't also be specified.
|
# If --from is a block device, --image can't also be specified.
|
||||||
if [ -b "${FLAGS_from}" ]; then
|
if [ -b "${FLAGS_from}" ]; then
|
||||||
@ -189,11 +194,6 @@ function mount_image() {
|
|||||||
"${FLAGS_rootfs_mountpt} successfully."
|
"${FLAGS_rootfs_mountpt} successfully."
|
||||||
}
|
}
|
||||||
|
|
||||||
# Find the last image built on the board.
|
|
||||||
if [ ${FLAGS_most_recent} -eq ${FLAGS_TRUE} ] ; then
|
|
||||||
FLAGS_from="$(${SCRIPT_ROOT}/get_latest_image.sh --board="${FLAGS_board}")"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Turn paths into absolute paths.
|
# Turn paths into absolute paths.
|
||||||
FLAGS_from=`eval readlink -f ${FLAGS_from}`
|
FLAGS_from=`eval readlink -f ${FLAGS_from}`
|
||||||
FLAGS_rootfs_mountpt=`eval readlink -f ${FLAGS_rootfs_mountpt}`
|
FLAGS_rootfs_mountpt=`eval readlink -f ${FLAGS_rootfs_mountpt}`
|
||||||
|
Loading…
Reference in New Issue
Block a user