New issue
Advanced search Search tips

Issue 764067 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

"cros clean" should clean src/build/images

Project Member Reported by dgarr...@chromium.org, Sep 11 2017

Issue description

cros clean --clobber no longer cleans up old build images. Did they git moved, or has it always missed them?
 
Project Member

Comment 1 by bugdroid1@chromium.org, Feb 7 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/chromite/+/79af018d7fcb6615c39393ca2436d019d75e2c96

commit 79af018d7fcb6615c39393ca2436d019d75e2c96
Author: Don Garrett <dgarrett@google.com>
Date: Wed Feb 07 05:32:48 2018

cros clean: Remove build images from new location.

cros clean has missed images for a long time. Move the image directory
cleaned up to the correct location. Also create a helper function for
not wiping out bind mounted directories.

BUG= chromium:764067 
TEST=cros clean --images

Change-Id: I087010934f6d040b7fdce79f9338398e696c5da5
Reviewed-on: https://chromium-review.googlesource.com/898349
Commit-Ready: Don Garrett <dgarrett@chromium.org>
Tested-by: Don Garrett <dgarrett@chromium.org>
Reviewed-by: Ningning Xia <nxia@chromium.org>

[modify] https://crrev.com/79af018d7fcb6615c39393ca2436d019d75e2c96/cli/cros/cros_clean.py

Status: Fixed (was: Untriaged)
Project Member

Comment 3 by bugdroid1@chromium.org, Jul 20

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

commit a46f57d4d45fd0e2b49abab22070a99453fc40eb
Author: Mike Frysinger <vapier@chromium.org>
Date: Fri Jul 20 12:31:28 2018

cros clean: fix debugging error

The debug message for handling bind mounts uses an invalid variable:
...
  File ".../chromite/cli/cros/cros_clean.py", line 142, in CleanNoBindMount
    self.options.path)
AttributeError: 'ArgumentNamespace' object has no attribute 'path'

Linting didn't notice it because the argparse options are dynamically
constructed.  It failed on my system because I have a bind mount.

Also improve the debug cros error message to tell people to try
using --debug to get a full traceback.

BUG= chromium:764067 
TEST=`cros clean --safe` works again

Change-Id: I7b96008557d7b9232f4668da116e7742028825b9
Reviewed-on: https://chromium-review.googlesource.com/1143682
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>

[modify] https://crrev.com/a46f57d4d45fd0e2b49abab22070a99453fc40eb/cli/cros/cros_clean.py
[modify] https://crrev.com/a46f57d4d45fd0e2b49abab22070a99453fc40eb/scripts/cros.py

Sign in to add a comment