Commit Graph

2136 Commits

Author SHA1 Message Date
Mike Frysinger
c585c5aa06 cros_workon: merge rm/ln commands
There's no need to execute `rm -f` directly when `ln -f` will unlink any
existing files for us.  One less command to exec.

BUG=None
TEST=`./cros_workon --board x86-alex start metrics` still works
TEST=`./cros_workon --board x86-alex stop metrics` still works

Change-Id: I784d7a215d975a11a8a4a7b5424f4e7f150bf3df
Reviewed-on: https://gerrit.chromium.org/gerrit/18176
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
2012-07-09 16:44:20 -07:00
Mike Frysinger
904e9905ed cros_workon: mask non-live versions
People who start working on a package and edit the ebuild but accidentally
introduce an error (such as invalid DEPEND) often times don't notice.  When
they do `emerge-$BOARD` on that package, portage falls back to the non-live
version automatically.  Then developers waste time trying to figure out why
their changes aren't working.  Further, emerge doesn't even tell them why
it skipped the live version.  The only way to find that out is by doing:
	emerge-$BOARD '=foo-9999'

Instead, when someone starts working on a package, automatically mask the
non-live version.  That way when they attempt to emerge things, portage
fails immediately with an error message explaining why.

This does make it hard to manually emerge the non-live version like so:
	emerge-$BOARD '<foo-9999'
but considering the number of times I've helped people with this behavior
(they added a bug to the 9999 version and couldn't figure it out), that's
a small downside to an otherwise significant improvement.  If they really
want to install the non-live version, they can do `cros_workon stop` and
then emerge it.

BUG=chromium-os:27494
TEST=`./cros_workon --board x86-alex start metrics`
     `emerge-x86-alex metrics` installs the live version
     edit metrics-9999.ebuild to add bogus depend
     `emerge-x86-alex metrics` fails explaining error in 9999 version

Change-Id: Ia1843424d771d7dce340a04b27bb164714085520
Reviewed-on: https://gerrit.chromium.org/gerrit/18175
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
2012-07-09 16:44:20 -07:00
Mike Frysinger
5bf25dbbe7 cros_workon: leverage sudo_multi
The common.sh file has a `sudo_multi` helper to collapse multiple sudo
calls into a single one for a minor speed up.  Use it.

BUG=None
TEST=`./cros_workon --board x86-alex start metrics` still works
TEST=`./cros_workon --board x86-alex stop metrics` still works

Change-Id: I4b670a4d4d6f1402a69f1f7129cadc645cc93225
Reviewed-on: https://gerrit.chromium.org/gerrit/18171
Reviewed-by: Chris Wolfe <cwolfe@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2012-07-09 16:44:20 -07:00
Mike Frysinger
0d5efffd97 cros_workon: don't use sudo to update the workon file
We start off cros_workon by doing:
	touch "${WORKON_FILE}" || die

So we've guaranteed that the user owns this file.  As such, there's no
need to go to sudo to update it, so drop that for a minor speed up.

BUG=None
TEST=`./cros_workon --board x86-alex start metrics` still works
TEST=`./cros_workon --board x86-alex stop metrics` still works

Change-Id: I5b78070b85ee53a76b6bdc29e24747b225905368
Reviewed-on: https://gerrit.chromium.org/gerrit/18170
Reviewed-by: Chris Wolfe <cwolfe@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2012-07-09 16:44:20 -07:00
Chris Wolfe
e266b3b850 cros_workon: fix for renamed chrome_set_ver
The chromite chrome_set_ver.py script lost its '.py' extension as part
of some recent refactoring. This updates the cros_workon script with
the new name.

BUG=None
TEST=cros_workon start chromeos-chrome no longer reports missing file.

Change-Id: Iae2e88739c4483243581d53daf1ade630e44ab3a
Reviewed-on: https://gerrit.chromium.org/gerrit/17963
Tested-by: Chris Wolfe <cwolfe@chromium.org>
Reviewed-by: Brian Harring <ferringb@chromium.org>
Commit-Ready: Chris Wolfe <cwolfe@chromium.org>
2012-07-09 16:44:20 -07:00
Chris Wolfe
3ffa197ac4 cros_workon: Fix for chromeos-chrome in minilayout
The cros_workon script did not support chromeos-chrome in a
minilayout. This appears to result from the usual oddities of
chromeos-chrome and some assumptions in cros_workon's support for
CHROME_ORIGIN=GERRIT_SOURCE.

BUG=None
TEST=Tested on full and minilayout with x86-alex.
  cros_workon start and stop succeed, and both equery w and
  ~/trunk/.config/cros_workon/x86-alex show the correct behavior.

Change-Id: Ic239f08ebedc02e6faea36d54c46ae219bfeb044
Reviewed-on: https://gerrit.chromium.org/gerrit/16995
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
Reviewed-by: Ryan Cui <rcui@chromium.org>
Tested-by: Chris Wolfe <cwolfe@chromium.org>
Commit-Ready: Chris Wolfe <cwolfe@chromium.org>
2012-07-09 16:44:20 -07:00
Mike Frysinger
3482223936 cros_workon: automatically display usage when given bad arguments
I find this easier to work with.

BUG=None
TEST=`cros_workon` displays usage now before showing error
TEST=`cros_workon-x86-alex` displays usage now before showing error

Change-Id: Id307bfe34e4aea4b7da62f383bd543ddbef4ccc6
Reviewed-on: https://gerrit.chromium.org/gerrit/15511
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2012-07-09 16:44:20 -07:00
David James
e7293bb80c Fix sort order for cros_workon info.
cros_workon info currently reports warnings about the sort order being
wrong. This is because we're sorting the results in a different order
from what join expects. We should fix that.

BUG=chromium-os:23909
TEST=Verify warnings are gone.

Change-Id: I021a6ac97f3ebd9d0ce0c6350b8c080e4a42977b
Reviewed-on: https://gerrit.chromium.org/gerrit/12596
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: David James <davidjames@chromium.org>
Commit-Ready: David James <davidjames@chromium.org>
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
2012-07-09 16:44:19 -07:00
Zdenek Behan
835542154c cros_workon: recreate all workon file symlinks unconditionally
Also, remove legacy conversion code slated for deletion long ago.

BUG=chromium-os:23096
TEST=have a chroot with invalid symlink in package.*/ and observe the fix

Change-Id: I04ecdf28038b63d48cf7d0768c0ccf5ac8f0c0d2
Reviewed-on: https://gerrit.chromium.org/gerrit/11978
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
Commit-Ready: Zdenek Behan <zbehan@chromium.org>
Tested-by: Zdenek Behan <zbehan@chromium.org>
2012-07-09 16:44:19 -07:00
Jonathan Kliegman
016f63d1e3 Add warnings if CHROME_ORIGIN is set on cros_workon start chromeos-chrome
Because the chromeos-chrome ebuild will no longer force GERRIT_SOURCE,
warn a user that is starting to workon chromeos-chrome that they
may not be getting the experience they expect.

BUG=None
TEST=Ran cros_workon with CHROME_ORIGIN unset, set to GERRIT_SOURCE
  and set to LOCAL_SOURCE
  Saw warning only on LOCAL_SOURCE
  Ran cros_workon start kernel with CHROME_ORIGIN set and saw
    no warnings

Change-Id: Iecbc793d3b190a12a126d42a1bfaee6d8846e9ec
Reviewed-on: https://gerrit.chromium.org/gerrit/10815
Tested-by: Jon Kliegman <kliegs@chromium.org>
Reviewed-by: Ryan Cui <rcui@chromium.org>
Commit-Ready: Jon Kliegman <kliegs@chromium.org>
2012-07-09 16:44:19 -07:00
Ryan Cui
0ddc35067b Don't set CHROME_ORIGIN environment variable
CL http://gerrit.chromium.org/gerrit/#change,10530 removes dependency of
chrome ebuild on CHROME_ORIGIN being set to GERRIT_SOURCE when user runs
cros_workon.  So remove this functionality.

BUG=chromium-os:21969
TEST=Ran cros_workon start/stop for chrome and cros-devutil

Change-Id: I04f7093b45f8e2871f369331bdafbba36443e21d
Reviewed-on: http://gerrit.chromium.org/gerrit/10531
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Ryan Cui <rcui@chromium.org>
Tested-by: Ryan Cui <rcui@chromium.org>
2012-07-09 16:44:19 -07:00
Terry Lambert
36770c8eed Add the ability to specify "." for a project name
This uses the current directory and gets the project name out of git and
then maps that to the project name(s).  In the case of no mapping, it
dies with a message.

Included more changes per review comments by David and Richard.

BUG=chromium-os:20338
TEST=cd src/platform/vpd; cros-workon start .

Change-Id: I6d31d63fe515558286623c177c23fa50a0977b9b
Reviewed-on: http://gerrit.chromium.org/gerrit/7577
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
Reviewed-by: Terry Lambert <tlambert@chromium.org>
Tested-by: Terry Lambert <tlambert@chromium.org>
2012-07-09 16:44:19 -07:00
Ryan Cui
4a4110b741 Use absolute path to chrome_set_ver.
So that users don't need to run gclient to update depot_tools when they
are developing for chrome in the chroot (i.e., using cros_workon and
emerge), since they don't need to run chrome_set_ver manually.

Developing for chrome outside of the chroot (running 'make' by
themselves) still requires the user to run chrome_set_ver manually after
a repo sync.  So they also need to run gclient to get the chrome_set_ver
symlink.

BUG=chromium-os:19112
TEST=ran cros_workon start chromeos-chrome

Change-Id: I93a6db4930ccacfa859d83d8fb19ec45b594dd31
Reviewed-on: http://gerrit.chromium.org/gerrit/6201
Reviewed-by: Zdenek Behan <zbehan@chromium.org>
Tested-by: Ryan Cui <rcui@chromium.org>
2012-07-09 16:44:19 -07:00
Ryan Cui
e84d24ed03 cros_workon - temporarily special case chrome package
When the user cros_workon starts the chrome package for a board, we set
the CHROME_ORIGIN envvar to GERRIT_SOURCE, as part of the new chrome
development workflow.  The envvar is set in the
${board}/etc/portage/env/chromeos-base/chromeos-chrome file.  We delete
the file when the user runs cros_workon stop for the chrome package.

This change is temporary - GERRIT_SOURCE will eventually become the
default behavior.

BUG=chromium-os:19112
TEST=Verified ebuild behavior for the cros_workon start and stop cases.

Change-Id: I4948383bac3fc4eafc211da2058cbcb24614cedc
Reviewed-on: http://gerrit.chromium.org/gerrit/6049
Reviewed-by: Ryan Cui <rcui@chromium.org>
Tested-by: Ryan Cui <rcui@chromium.org>
2012-07-09 16:44:19 -07:00
David James
965983e68d Update cros_workon to use repo list instead of repo forall.
repo list is a little faster and is more idiomatic.

BUG=chromium-os:5932, chromium-os:6126
TEST=Make sure cros_workon info --all and cros_workon info kernel still work

Change-Id: I61dfdc8a00669e88b90298f7c990a497b61c174a
Reviewed-on: http://gerrit.chromium.org/gerrit/877
Reviewed-by: Zdenek Behan <zbehan@chromium.org>
Tested-by: David James <davidjames@chromium.org>
2012-07-09 16:44:19 -07:00
David James
0d6b945771 Add 'info' command for showing package name, repo name, and source directory of ebuilds.
BUG=chromium-os:5932, chromium-os:6126
TEST=Run cros_workon --all --host info and cros_workon info --host power_manager kernel

Change-Id: I46849db55d9879cbd65b4400eea9fd6b697e0a10
Reviewed-on: http://gerrit.chromium.org/gerrit/861
Reviewed-by: Zdenek Behan <zbehan@chromium.org>
Tested-by: David James <davidjames@chromium.org>
2012-07-09 16:44:19 -07:00
Taylor Hutt
82bbe72ac7 Fix a typo in cros_workon, and make command help output nicer
Details

  The cros_workong help text has a typographic error of 'commond'
  rather than 'command'.  This change addresses that issue.

  The help text output for the list of commands was also not nicely
  aligned, so I've addressed that, too.

Testing

  ~thutt/g-chroot-execute sudo emerge cros-devutils

  After the build & install completed, I executed:

    ~thutt/scripts/g-workon --help

  The output now looks like the following.  The typo was on the
  'iterate' command.

usage: /usr/bin/cros_workon <command> [flags] [<list of packages>|--all]
commands:
  start:     Moves an ebuild to live (intended to support development)
  stop:      Moves an ebuild to stable (use last known good)
  list:      List of live ebuilds (workon ebuilds if --all)
  list-all:  List all of the live ebuilds for all setup boards
  iterate:   For each ebuild, cd to the source dir and run a command
flags:
  --board:  The board to set package keywords for. (default: '')
  --[no]host:  Uses the host instead of board (default: false)
  --command:  The command to be run by forall. (default: 'git status')
  --[no]all:  Apply to all possible packages for the given command (default: false)
  -h,--[no]help:  show this help (default: false)

BUG=0
TEST=See above

Review URL: http://codereview.chromium.org/6812022

Change-Id: Idbf9f2cdde1095c310a79740eeef08087c0d415c
2012-07-09 16:44:19 -07:00
Mandeep Singh Baines
230883f9ec cros_workon: fix common.sh check
Error message not necessary since you already get an error message from bash.

BUG=none
TEST=see below

$ ./cros_workon
./cros_workon: line 13: /usr/lib/crosutils/common.sh: No such file or directory

$ ./cros_workon_make
./cros_workon_make: line 10: /usr/lib/crosutils/common.sh: No such file or directory

Change-Id: I2087d77876376af9ccb497d0a67c354af281c007

R=petkov@chromium.org,anush@chromium.org

Review URL: http://codereview.chromium.org/6726039
2012-07-09 16:44:19 -07:00
Mandeep Singh Baines
514f69e8bc cros_workon: fix --help to return an exit code of 0
BUG=n0ne
TEST=cros_workon --help && echo "test passed"

Change-Id: I4d0835b0651f70256e7df82a174fbc8d025cba88

Review URL: http://codereview.chromium.org/6312176
2012-07-09 16:44:19 -07:00
Mandeep Singh Baines
4e224217a6 cros_workon: apply gspencer's cleanup from issue 6240018
Note: this is the moved version of cros_workon

BUG=11507
TEST=./cros_workon --board x86-generic list --all

Change-Id: I4bee245743b4390e1efb634887ea8858c4540f34

Review URL: http://codereview.chromium.org/6368032
2012-07-09 16:44:19 -07:00
Mandeep Singh Baines
034218dbf0 cros_workon: use portageq instead of sourcing make.conf
Fixes the following issue:

/home/msb/trunk/src/overlays/overlay-x86-generic/make.conf: line 7: prebuilt.conf: No such file or directory

BUG=11513
TEST=Verified that the error goes away.

Change-Id: I5b1dfab55394ba40c02e2a1a2ee7b03a5c4a7941

Review URL: http://codereview.chromium.org/6409031
2012-07-09 16:44:14 -07:00
Mandeep Singh Baines
0295fffe88 cros_workon: collapse cros_workon_common.sh
cros_workon is the only user of cros_workon_common.sh

This is pre-requisite to moving cros_workon into devutils.git

BUG=11507
TEST=Ran ./cros_workon --board x86-generic --all list

Change-Id: I1eab551ab33646360e507328932c151a0d36f50a

Review URL: http://codereview.chromium.org/6347052
2012-07-09 16:44:14 -07:00
Mandeep Singh Baines
893fb5789f cros_workon: allow a stop on a dead package
Previously, you could not stop working on a package if its ebuild had
been removed. This fixes this issue by skipping canonicalization if the
package name exactly matches a name in the workon file.

BUG=11214
TEST=See below.

(cros-chroot) msb@msb ~/trunk/src/scripts $ ./cros_workon --board x86-generic list
sys-kernel/chromeos-kernel
(cros-chroot) msb@msb ~/trunk/src/scripts $ echo "=foo/bar-9999" >> ~/trunk/.config/cros_workon/x86-generic
(cros-chroot) msb@msb ~/trunk/src/scripts $ ./cros_workon --board x86-generic list
sys-kernel/chromeos-kernel
foo/bar
(cros-chroot) msb@msb ~/trunk/src/scripts $ ./cros_workon --board x86-generic stop foo/bar
!!! No packages matching 'foo/bar'
WARNING: error looking up package foo/bar
ERROR  : Error parsing package list

*** I made changes to cros_workon here

(cros-chroot) msb@msb ~/trunk/src/scripts $ ./cros_workon --board x86-generic list
sys-kernel/chromeos-kernel
foo/bar
(cros-chroot) msb@msb ~/trunk/src/scripts $ ./cros_workon --board x86-generic stop foo/bar
INFO   : Stopped working on 'foo/bar' for 'x86-generic'
(cros-chroot) msb@msb ~/trunk/src/scripts $ ./cros_workon --board x86-generic list
sys-kernel/chromeos-kernel

Change-Id: Id5cbd2b145b4d0fca96cfb245f1ac99e0b3cbdf3

Review URL: http://codereview.chromium.org/6379006
2012-07-09 16:44:13 -07:00
Mandeep Singh Baines
2a18367866 cros_workon: remove logic for handling ~ in workon file
We stopped using ~ in the workon files many months ago.

BUG=n0ne
TEST=See below.

(cros-chroot) msb@msb ~/trunk/src/scripts $ ./cros_workon --board x86-generic list
sys-kernel/chromeos-kernel
(cros-chroot) msb@msb ~/trunk/src/scripts $ ./cros_workon --board x86-generic start perf
Please run "repo sync" now.
INFO   : Started working on 'dev-util/perf' for 'x86-generic'
(cros-chroot) msb@msb ~/trunk/src/scripts $ ./cros_workon --board x86-generic list
sys-kernel/chromeos-kernel
dev-util/perf
(cros-chroot) msb@msb ~/trunk/src/scripts $ ./cros_workon --board x86-generic stop perf
INFO   : Stopped working on 'dev-util/perf' for 'x86-generic'
(cros-chroot) msb@msb ~/trunk/src/scripts $ ./cros_workon --board x86-generic list
sys-kernel/chromeos-kernel

Change-Id: I61babd89073d749111be7257b2e8491f07ca52f2

Review URL: http://codereview.chromium.org/6268012
2012-07-09 16:44:13 -07:00
Anton Staaf
a5af91266e Change "cros_workon list" to show packages for all boards.
Change-Id: Id4880b423eaabbdefc91060a04629a9018295b4d

BUG=None
TEST="cros_workon list" works, so does "cros_workon --board tegra2_seaboard start chromeos-u-boot"

Review URL: http://codereview.chromium.org/4131008
2012-07-09 16:44:13 -07:00
Mandeep Singh Baines
4d13b5ef3f cros_workon: only touch local_manifest for minilayout users
Otherwise, you'll duplicate an entry already in the developers
manifest and cause repo to get confused.

BUG=6898
TEST=Verified that local_manifest gets updated when using minilayout.xml
Verified that the local_manifset does not get updated when not.

Change-Id: I67ffc7004a2267d0d5aaa31570ac2bbeaa8f4f96

Review URL: http://codereview.chromium.org/3468009
2012-07-09 16:44:13 -07:00
Mandeep Singh Baines
120d91df01 cros_workon: fix bug where cros_workon start doesn't work for first start
If the checkout dir doesn't already exist cros_workon start will print
the wrong dir. Fixed by using readlink -m instead.

BUG=none
TEST=Verified that first start is incorrect without this patch
but is fixed with this patch.

Change-Id: I5db29a8c1737dea1dbe4866e18576f67b9355f84

Review URL: http://codereview.chromium.org/3434008
2012-07-09 16:44:13 -07:00
Mandeep Singh Baines
f0eb4604d7 cros_workon: modify regen_manifest_and_sync to use loman
This fixes a bug where user added local_manifest.xml entries
get clobbered.

BUG=5787
TEST=Verified start of various packages works correctly.

Change-Id: I2348dfb1be098b81ede5928426192c655160564d

Review URL: http://codereview.chromium.org/3389013
2012-07-09 16:44:13 -07:00
Mandeep Singh Baines
99b0085555 cros_workon: WORKON_FILE should be owned by the user
BUG=none
TEST=Verified that WORKON_FILE is now owned by the user.

Change-Id: I32f05d5de5177756945b6f5bc037a2f738ffffe5

Review URL: http://codereview.chromium.org/3446002
2012-07-09 16:44:13 -07:00
Zdenek Behan
c28d7a1dfc cros_workon: redefine the concept of a "workon" package list to depend on the board
* Modified all workon listing functions to also look for keyword

* Added a fallback to list all workon ebuilds if keyword is not specified, which
is needed for cros_mark_all_as_stable, which does not differentiate between boards.

This, amongst other potential issues, resolves the case when it was possible to
start working on a package not keyworded for the given board, and making
build_packages fail unconditionally.

TEST=below
$ ./cros_workon list --all --board=x86-generic |wc -l
73
$ ./cros_workon list --all --host |wc -l
57
Looking at the lists rather than "|wc -l" looks correct
$ ./cros_mark_all_as_stable
^ Produces satisfactory result

BUG=6700

Change-Id: Ieee92a39febcef5fb95e59cf97b6e63281a7c750

Review URL: http://codereview.chromium.org/3400001
2012-07-09 16:44:13 -07:00
Jon Kliegman
8e79ec4bff Whitespace/tab cleanup for cros_workon
Change-Id: I17379dc302fcad0f3a7f59771c48d86df320c0d0

BUG=NONE
TEST=Manual diff inspection.  Ran scripts and confirmed no syntax errors.

Review URL: http://codereview.chromium.org/3335004
2012-07-09 16:44:13 -07:00
Zdenek Behan
3d47935477 cros_workon: print out short summary of what has been done for start/stop
BUG=6325
TEST=cros_workon start and stop for board and host and see it work

Change-Id: Ic0680a273391fdf93b6ebbe0e34497807f31f240

Review URL: http://codereview.chromium.org/3352002
2012-07-09 16:44:13 -07:00
Jon Kliegman
faabfed885 Cause cros_workon to die rather than clobber local_manifest
cros_workon would clobber local edits to local_manifest in many cases
This is a quick fix to prevent it. The proper solution is to actually parse
local_manifest as an XML doc and modify the DOM. Not play tricks with grep.

BUG=chromium-os:6272
TEST=Ran cros_workon against missing local_manifest, auto-generated local_manifest, local_manifest with indented tags. local_manifest with multi-line tags and local_manifest with <remote tags.

Review URL: http://codereview.chromium.org/3227006

Change-Id: I008c11a43ac21336575445273453373645f96398
2012-07-09 16:44:13 -07:00
Zdenek Behan
7a726953ce cros_workon: make --board and --host not exclusive
This fixes a case where you can't specify host if you have a
default board set.

BUG=6039

TEST=cros_workon start with --host, --board, both

Change-Id: Iad0d3f646dde10cc4adc4131e93f75fabe92f392

Review URL: http://codereview.chromium.org/3157044
2012-07-09 16:44:13 -07:00
Mandeep Singh Baines
7d25eedbb6 cros_workon: store cros_workon state outside of /build
This solves the problem of cros_workon list of packages being clobbered
by a new setup_board.

BUG=5641
TEST=Verified all cases work correctly.

1. Verified that a pre-existing list of workon packages continues to work.
2. Verified that the package.unmask symlink is created correctly.
3. Verified that a new package can be worked on.
4. Verified that an existing package continues to be worked on.

Change-Id: I566ac898ac4f74bdd5beb532c1ef0f70d4c02cec

Review URL: http://codereview.chromium.org/3151039
2012-07-09 16:44:12 -07:00
J. Richard Barnette
8216bd952c Fix cros_workon error complaints to be more descriptive
BUG=none
TEST=./cros_workon kernel

Review URL: http://codereview.chromium.org/3142032
2012-07-09 16:44:12 -07:00
Mandeep Singh Baines
b0d4eb7423 cros_workon: simplify by symlinking the keywords file to the unmask file
This is a refactoring change I want to do before I solve the problem
of cros_workon list of packages being clobbered by a new setup_board.

BUG=5641
TEST=Verified all cases work correctly.

1. Verified that a pre-existing list of workon packages continues to work.
2. Verified that the package.keywords symlink is created correctly.
3. Verified that a new package can be worked on.
4. Verified that an existing package continues to be worked on.

Change-Id: I566ac898ac4f74bdd5beb532c1ef0f70d4c02cec

pause

Change-Id: Ie2d96c897da13292f985d87adfaf3a416a614613

Review URL: http://codereview.chromium.org/3143035
2012-07-09 16:44:12 -07:00
Zdenek Behan
008b957b76 cros_workon: check for existence of local manifest before cat
* Fixes a dumb error message

	modified:   cros_workon

Review URL: http://codereview.chromium.org/3129008
2012-07-09 16:44:12 -07:00
Zdenek Behan
c2e8607b99 cros_workon: misc fixes to manifest re-generation
* Only run the regenerate once, after start
* Make regenerate preserve old projects from local manifest
* Make pkgname not found a non-fatal error
* Delete misc debug messages

	modified:   cros_workon

Review URL: http://codereview.chromium.org/3115001
2012-07-09 16:44:12 -07:00
Zdenek Behan
1af68e7781 cros_workon: refactor local manifest creation, kill duplicate entries (repo doesn't like them)
modified:   cros_workon

Review URL: http://codereview.chromium.org/3076046
2012-07-09 16:44:12 -07:00
Zdenek Behan
805eef45fd cros_workon: when finding the ebuild path, look for the 9999 ebuild
modified:   cros_workon

Review URL: http://codereview.chromium.org/3015063
2012-07-09 16:44:12 -07:00
Anush Elangovan
9e1daf4f03 Add repo local manifest support 2012-07-09 16:44:12 -07:00
Chris Sosa
8b61e59b14 Create common script file for workon tools. Planning on using in another CL.
Review URL: http://codereview.chromium.org/3022010
2012-07-09 16:44:12 -07:00
Zdenek Behan
3a1cf2061f cros-workon: change forall into iterate
* Bend iterate to accept either list of packages or --all, following the new
semantics

Reintroduces commit dc3359ba7c, with fixed list cmd

Review URL: http://codereview.chromium.org/3022003
2012-07-09 16:44:12 -07:00
David James
d52cade7d3 Revert "cros-workon: change forall into iterate"
This breaks cros-workon list, which is used by build_packages.

This reverts commit dc3359ba7c.

Review URL: http://codereview.chromium.org/3008005
2012-07-09 16:44:12 -07:00
Zdenek Behan
d17540f6bc cros-workon: change forall into iterate
* Bend iterate to accept either list of packages or --all, following the new
semantics

This is a re-upload of the original CL which seems to be broken beyond repair
by the git malfunctions yesterday

Review URL: http://codereview.chromium.org/3040001
2012-07-09 16:44:12 -07:00
Zdenek Behan
014939b2c7 cros_workon: fix forall (broken by --host) :/
Review URL: http://codereview.chromium.org/2966016
2012-07-09 16:44:12 -07:00
Zdenek Behan
f9a42ed40b cros_workon: introduce --all flag
* Replaced listall with list --all
* stop/start without arguments will now fail
* stop/start with --all will do just the expected thing
* Rewritten package list decision logic

TBR: msb - already got LGTM, then fixed a comment i noticed

Review URL: http://codereview.chromium.org/2963011
2012-07-09 16:44:11 -07:00
Zdenek Behan
7d12cb8bd1 cros_workon: introduce a very simple listall command
TBR: sosa, msb - I already got the LGTM, then made a silly whitespace change!

Review URL: http://codereview.chromium.org/2909009
2012-07-09 16:44:11 -07:00
Zdenek Behan
627eb08855 cros_workon: check selected packages if they are cros-workon, related fixes
Override locally warn/error functions to not interfere with stdout of canonicalize_name.
Future FIXME in common.sh.

Review URL: http://codereview.chromium.org/2985003
2012-07-09 16:44:11 -07:00