New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 761418 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Aug 30
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

cros_payload: adding empty file won't update version

Project Member Reported by hungte@chromium.org, Sep 1 2017

Issue description

1. cros_payload add test.json firmware PATH_TO_A_REAL_UPDATER
2. touch empty
3. cros_payload add test.json firmware empty
4. cat test.json

The 'version' will be version of PATH_TO_A_REAL_UPDATER.

This is a problem when we want to deal with empty (or invalid) files as resource.

Not sure what we should do for version of empty files (or should we reject empty?) - or make it a special string like '(empty)'.
 
I would prefer not to do anything special on empty files.
Agree. but we should still clear or reset a component's data before adding new one.
Project Member

Comment 3 by bugdroid1@chromium.org, Sep 4 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/2d154a8d695bd15a45bcbb3df9790f5afb56fe04

commit 2d154a8d695bd15a45bcbb3df9790f5afb56fe04
Author: Hung-Te Lin <hungte@chromium.org>
Date: Mon Sep 04 08:47:23 2017

cros_payload: Always update version information.

Version is now a core attribute that we have to set for every
components, even if the file is empty.

Without this, version will be wrong if we add a valid resource then
replace it with an empty file - the version string won't be changed.

BUG= chromium:761418 
TEST=./cros_payload add test.json firmware empty_file

Change-Id: I0ff1e97d67cfefc8aae053a9286af0afdb6d3b98
Reviewed-on: https://chromium-review.googlesource.com/647731
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Youcheng Syu <youcheng@chromium.org>

[modify] https://crrev.com/2d154a8d695bd15a45bcbb3df9790f5afb56fe04/sh/cros_payload.sh

Owner: hungte@chromium.org
Status: Verified (was: Untriaged)
Cc: chromeos-factory-eng@google.com

Sign in to add a comment