From fd76ba692d0b27afdd051d595ac834b0e3873fb8 Mon Sep 17 00:00:00 2001 From: Mandeep Singh Baines Date: Tue, 21 Sep 2010 12:05:10 -0700 Subject: [PATCH] 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 --- cros_workon | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/cros_workon b/cros_workon index d71879f930..6892e7a669 100755 --- a/cros_workon +++ b/cros_workon @@ -136,23 +136,14 @@ show_live_ebuilds () { sed -n 's/^[~=]\(.*\)-9999$/\1/p' "${WORKON_FILE}" } -find_repo_dir () { - curdir=`pwd` - while [ $curdir != / ]; do - if [ -d "$curdir/.repo" ]; then - #echo "Found .repo directory at ${curdir}" - REPODIR=${curdir}/.repo - return 0 - fi - curdir=`dirname "$curdir"` - done - echo "Unable to find .repo directory. Did you checkout with repo?" - exit 1 -} - - # This is called only for "cros-workon start". We dont handle the "stop" case since the local changes are ignored anyway since the 9999.ebuild is masked and we dont want to deal with what to do with the user's local changes. regen_manifest_and_sync() { + # Nothing to do unless you are working on the minilayout + local manifest=${CHROOT_TRUNK_DIR}/.repo/manifest.xml + if [ $(basename $(readlink -f ${manifest})) != "minilayout.xml" ]; then + return + fi + for pkgname in $(show_live_ebuilds); do eval $(${EBUILDCMD} $(${EQUERYCMD} which ${pkgname}) info) local srcdir=$(readlink -m ${CROS_WORKON_SRCDIR})