Commit Graph

107 Commits

Author SHA1 Message Date
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
Zdenek Behan
c075f0401e cros_workon: corner case fixes
* Warn if user stops working on a package he wasn't working on
* Warn if user starts to work on a package he already is working on

Review URL: http://codereview.chromium.org/2978002
2012-07-09 16:44:11 -07:00
Zdenek Behan
e906f22eee cros_workon: allow unmasking packages for the host
modified:   cros_workon

Review URL: http://codereview.chromium.org/2945010
2012-07-09 16:44:11 -07:00
Zdenek Behan
d26c7eec73 cros_workon: also create unmask
* This fixes the issue, where cros-workon packages have a package.mask set
to prevent upstream ebuilds from rolling in. In general, it brings out the
cavalry for unmasking the live package in every possible way.

Review URL: http://codereview.chromium.org/2934007
2012-07-09 16:44:11 -07:00
Mandeep Singh Baines
57ae485cd4 cros_workon: quick hack at package name checking
Change-Id: I30e97760d5b96077e38414be31ef434542021361

Review URL: http://codereview.chromium.org/2883012
2012-07-09 16:44:11 -07:00
Mandeep Singh Baines
a8df0aed42 cros_workon: add support for a forall command
Change-Id: If0c75ee905c4a8076340fa9675c17e9292125268

Review URL: http://codereview.chromium.org/2880007
2012-07-09 16:44:11 -07:00
Mandeep Singh Baines
4cf9fdb84e cros_workon: modify to be less verbose
We need to be able to use "cros_workon list" in pipelines. Also, would
be nice if the other commands were less verbose. Ideally, they should
die and return a non-zero value.

Also cleaned up the logic in some of the functions. This fixed a couple
of bugs:

1) "cros-workon list" would fail if KEYWORDS_FILE didn't exist
2) "cros-workon start" would fail if KEYWORDS_DIR didn't exit

Change-Id: I76c87f0e36b72c12e8ae937cbadca6cf21a34bad

Review URL: http://codereview.chromium.org/2880005
2012-07-09 16:44:11 -07:00
Brian Daugherty
01772ff58f cros_workon: initial implementation
Moves ebuild(s) between stable and live states.

Lists ebuilds currently under development in the testing branch.

Stable ebuilds obtain and build against the last known good commit.
Live ebuilds (9999) perform a 'git clone' during the src_unpack
step to obtain and save the source for development and building.

Example usage:

  Sync & build 'ibus-hangul' testing ebuild (9999)
     ./cros_workon start app-i18n/ibus-hangul

  Build 'ibus-hangul' from the last stable commit
     ./cros_workon stop app-i18n/ibus-hangul

  List of ebuilds under development
     ./cros_workon list

Change-Id: I2ea4babd7597d5cea9ca96419a74152f9f0b23f1

Note: --board must be specified if the --default option
      to setup_board was not used.

Review URL: http://codereview.chromium.org/2852019
2012-07-09 16:44:11 -07:00
Mandeep Singh Baines
afa1b4ca27 cros_workon: remove this file
The version of cros_workon has been deprecated for 3 weeks. Time to
remove.

BUG=11507
TEST=none

Change-Id: Ie843046ab616519109124b04c7b958f6c28020fb

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

Review URL: http://codereview.chromium.org/6676105
2011-03-24 14:04:37 -07:00
Mandeep Singh Baines
efba42eb10 cros_workon: start process of removing cros_workon from src/scripts
All tools have been modified to use /usr/bin/cros_workon. So we can
start removing from src/scripts.

For now, print an error so users aren't caught off guard. In a couple
of weeks, I'll remove from src/scripts.

BUG=11507
TEST=none

Change-Id: Ia5f9996bc54fd97b1264cddcf4a0f945fbcb01b4

Review URL: http://codereview.chromium.org/6594132
2011-03-02 18:32:09 -08:00
Greg Spencer
798d75f3be This starts to fix the scripts so that they load from /usr/lib/crosutils
from within the chroot.

It also fixes a number of style issues.

It changes the meaning of cros_workon "list-all" to list all available
packages, and adds "list-live" to list all live packages.

It changes things that load chromeos-common.sh from the installer to
load it from /usr/lib/installer.

BUG=chromium-os:4230
TEST=synced, rebuilt chroot, made packages, made images, built chrome
from source, and wrote an image to a USB stick.

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

Change-Id: I90c34420af1a64020402bafef8e9e77f56837c02
2011-02-01 22:04:49 -08:00
Mandeep Singh Baines
0fdf2a7aeb 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
2011-01-31 16:59:37 -08:00
Mandeep Singh Baines
f9ea0036fa 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
2011-01-31 16:13:30 -08:00
Mandeep Singh Baines
07f92099a4 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
2011-01-24 14:04:35 -08:00
Mandeep Singh Baines
26998d4c6e 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
2011-01-24 13:46:52 -08:00
Anton Staaf
abb9144d97 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
2010-11-02 11:23:00 -07:00
Mandeep Singh Baines
fd76ba692d 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
2010-09-21 12:05:10 -07:00
Mandeep Singh Baines
30b64cab3f 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
2010-09-16 14:28:31 -07:00
Mandeep Singh Baines
a4e793268b 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
2010-09-16 10:57:54 -07:00
Mandeep Singh Baines
90438ca854 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
2010-09-15 12:28:42 -07:00
Zdenek Behan
e9474900c6 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
2010-09-15 11:33:54 -07:00
Jon Kliegman
03a4dad734 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
2010-09-07 11:12:20 -04:00
Zdenek Behan
6fb7a3680c 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
2010-09-03 17:29:09 -07:00
Jon Kliegman
3ecded4794 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
2010-09-01 09:39:44 -04:00
Zdenek Behan
45156c46e1 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
2010-08-26 16:17:03 -07:00
Mandeep Singh Baines
038dc8f89d 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
2010-08-25 17:21:14 -07:00
J. Richard Barnette
acdfa8f2e8 Fix cros_workon error complaints to be more descriptive
BUG=none
TEST=./cros_workon kernel

Review URL: http://codereview.chromium.org/3142032
2010-08-24 11:10:17 -07:00
Mandeep Singh Baines
63412de664 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
2010-08-23 13:57:25 -07:00
Zdenek Behan
077af11ba9 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
2010-08-10 18:27:25 -07:00
Zdenek Behan
5f66b8667a 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
2010-08-09 18:03:01 -07:00
Zdenek Behan
19294323c6 cros_workon: refactor local manifest creation, kill duplicate entries (repo doesn't like them)
modified:   cros_workon

Review URL: http://codereview.chromium.org/3076046
2010-08-09 13:51:25 -07:00
Zdenek Behan
638976a796 cros_workon: when finding the ebuild path, look for the 9999 ebuild
modified:   cros_workon

Review URL: http://codereview.chromium.org/3015063
2010-08-06 15:13:03 -07:00
Anush Elangovan
9df55b2055 Add repo local manifest support 2010-07-28 12:07:48 -07:00
Chris Sosa
a5e394704d Create common script file for workon tools. Planning on using in another CL.
Review URL: http://codereview.chromium.org/3022010
2010-07-19 11:50:11 -07:00
Zdenek Behan
47d039a48c 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
2010-07-16 16:05:14 -07:00
David James
21d93ccac3 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
2010-07-15 20:37:23 -07:00
Zdenek Behan
dc3359ba7c 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
2010-07-15 16:13:00 -07:00
Zdenek Behan
d27f9039b5 cros_workon: fix forall (broken by --host) :/
Review URL: http://codereview.chromium.org/2966016
2010-07-15 15:41:52 -07:00
Zdenek Behan
9f52b31150 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
2010-07-14 15:47:09 -07:00
Zdenek Behan
8683b8082f 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
2010-07-13 16:48:12 -07:00
Zdenek Behan
2089bed7b8 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
2010-07-13 15:08:07 -07:00
Zdenek Behan
aefb186237 cros_workon: corner case fixes
* Warn if user stops working on a package he wasn't working on
* Warn if user starts to work on a package he already is working on

Review URL: http://codereview.chromium.org/2978002
2010-07-13 13:31:44 -07:00
Zdenek Behan
a5959f5c14 cros_workon: allow unmasking packages for the host
modified:   cros_workon

Review URL: http://codereview.chromium.org/2945010
2010-07-12 15:40:49 -07:00
Zdenek Behan
9a8f3998f0 cros_workon: also create unmask
* This fixes the issue, where cros-workon packages have a package.mask set
to prevent upstream ebuilds from rolling in. In general, it brings out the
cavalry for unmasking the live package in every possible way.

Review URL: http://codereview.chromium.org/2934007
2010-07-09 18:08:46 -07:00
Mandeep Singh Baines
a0fcf30e54 cros_workon: quick hack at package name checking
Change-Id: I30e97760d5b96077e38414be31ef434542021361

Review URL: http://codereview.chromium.org/2883012
2010-07-01 14:05:19 -07:00
Mandeep Singh Baines
952996c605 cros_workon: add support for a forall command
Change-Id: If0c75ee905c4a8076340fa9675c17e9292125268

Review URL: http://codereview.chromium.org/2880007
2010-06-30 18:51:48 -07:00
Mandeep Singh Baines
451cee1349 cros_workon: modify to be less verbose
We need to be able to use "cros_workon list" in pipelines. Also, would
be nice if the other commands were less verbose. Ideally, they should
die and return a non-zero value.

Also cleaned up the logic in some of the functions. This fixed a couple
of bugs:

1) "cros-workon list" would fail if KEYWORDS_FILE didn't exist
2) "cros-workon start" would fail if KEYWORDS_DIR didn't exit

Change-Id: I76c87f0e36b72c12e8ae937cbadca6cf21a34bad

Review URL: http://codereview.chromium.org/2880005
2010-06-30 09:21:55 -07:00
Brian Daugherty
76418ea6b1 cros_workon: initial implementation
Moves ebuild(s) between stable and live states.

Lists ebuilds currently under development in the testing branch.

Stable ebuilds obtain and build against the last known good commit.
Live ebuilds (9999) perform a 'git clone' during the src_unpack
step to obtain and save the source for development and building.

Example usage:

  Sync & build 'ibus-hangul' testing ebuild (9999)
     ./cros_workon start app-i18n/ibus-hangul

  Build 'ibus-hangul' from the last stable commit
     ./cros_workon stop app-i18n/ibus-hangul

  List of ebuilds under development
     ./cros_workon list

Change-Id: I2ea4babd7597d5cea9ca96419a74152f9f0b23f1

Note: --board must be specified if the --default option
      to setup_board was not used.

Review URL: http://codereview.chromium.org/2852019
2010-06-23 14:43:28 -06:00