New issue
Advanced search Search tips

Issue 626017 link

Starred by 2 users

Issue metadata

Status: Archived
Owner:
Closed: Nov 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

cros_workon doesn't permit "stopping" packages that no longer exist

Project Member Reported by derat@chromium.org, Jul 6 2016

Issue description

This is a minor annoyance more than anything else, but cros_workon doesn't let me stop working on packages that don't exist anymore, yet still lists them in its "list" output. This results in cruft accumulating:

$ cros_workon-lumpy list
chromeos-base/chromeos-assets-split
chromeos-base/libchromeos
chromeos-base/platform2
chromeos-base/power_manager
$ cros_workon-lumpy stop chromeos-assets-split
09:36:52: WARNING: Could not find canonical package for "chromeos-assets-split"
09:36:52: ERROR: Error parsing package list
$ cros_workon-lumpy stop platform2
09:37:00: WARNING: Could not find canonical package for "platform2"
09:37:00: ERROR: Error parsing package list

I think I'm able to manually clean this up by editing e.g. /mnt/host/source/.config/cros_workon/lumpy, but the "stop" command ought to support removing packages that no longer exist.
 
Owner: briannorris@chromium.org
Status: Started (was: Untriaged)
Actually, it works if you use the full atom:

cros_workon-lumpy stop chromeos-base/chromeos-assets-split

since there's an optimization to match exact names in the workon package list. So you could either do that, or take something like this, to do autocompletion on the workon list:

https://chromium-review.googlesource.com/408438
Project Member

Comment 2 by bugdroid1@chromium.org, Nov 10 2016

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

commit b9caab29e6c1be8f11898dba6c9442156d05200a
Author: Brian Norris <briannorris@chromium.org>
Date: Sun Nov 06 05:43:25 2016

cros_workon: autocomplete deleted (but worked-on) packages

If we've previously worked on a package, but that package is later
deleted, it still shows up in the cros_workon list, but we can't
necessarily `cros_workon stop` it. e.g., for a deleted atom
`chromeos-base/foo`, this will work:

  cros_workon-${BOARD} stop chromeos-base/foo

but this won't:

  cros_workon-${BOARD} stop foo

If we're doing a "stop", let's also autocomplete from the work list too.

This change also trims the ebuild pathnames down to the atom name before
doing matching, to make it more accurate, to print nicer warnings when
required, and to allow set-based duplicate detection to work properly.

BUG= chromium:626017 
TEST=`cros_workon-${BOARD} start foo`, delete 'foo' ebuild,
     `cros_workon-${BOARD} stop foo` (where 'foo' is not the canonical
     atom)

Change-Id: I27d288b50dcf63ef098de73b4ef112ff47115918
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/408438
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[modify] https://crrev.com/b9caab29e6c1be8f11898dba6c9442156d05200a/lib/workon_helper.py

Status: Fixed (was: Started)

Comment 4 by dchan@google.com, Jan 21 2017

Labels: VerifyIn-57

Comment 5 by dchan@google.com, Mar 4 2017

Labels: VerifyIn-58

Comment 6 by dchan@google.com, Apr 17 2017

Labels: VerifyIn-59

Comment 7 by dchan@google.com, May 30 2017

Labels: VerifyIn-60

Comment 8 by dchan@chromium.org, Aug 1 2017

Labels: VerifyIn-61

Comment 9 by dchan@chromium.org, Oct 14 2017

Status: Archived (was: Fixed)

Sign in to add a comment