From 0d7b85aacda5d3ea06004da7c2859b4512dd89f6 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Tue, 29 Jan 2013 17:49:55 -0800 Subject: [PATCH] Add the --include-masked flag when calling the equery which command. When setting up a new ebuild, the process I've used in the past was to create a 9999 ebuild and, to test it, cros_workon it so emerge can choose that version to build. cros_workon uses equery in its canonicalize_name function, and if it fails then it aborts the call to, in my case, cros_workon start. The problem is that equery ignores masked packages by default, apparently, and because no stable version exists, it can't see the lone 9999 ebuild. Because that fails you can't cros_workon the package, and because of that you can't build it because you've still only got the unstable version. To work around this new behavior, I added the --include-masked option I found while digging around in equery's source. This option seems to allow it to see the otherwise unavailable package, and the cros_workon succeeds. BUG=None TEST=Saw that this allowed cros_workon-ing a new ebuild which only had a 9999 version. Ran cros_workon-link start and stop on an existing ebuild and saw the command complete successfully. Change-Id: Icfb271ed671b118bbd4ebfa1c3341353e203162a Signed-off-by: Gabe Black Reviewed-on: https://gerrit.chromium.org/gerrit/42276 Reviewed-by: Mike Frysinger Tested-by: Gabe Black Commit-Queue: Gabe Black --- cros_workon | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cros_workon b/cros_workon index cdd2e97b1b..1d899c94eb 100755 --- a/cros_workon +++ b/cros_workon @@ -177,7 +177,8 @@ canonicalize_name () { return 0 fi - if ! pkgfile=$(ACCEPT_KEYWORDS="~${ARCH}" ${EQUERYCMD} which $1); then + if ! pkgfile=$(ACCEPT_KEYWORDS="~${ARCH}" ${EQUERYCMD} \ + which --include-masked $1); then warn "error looking up package $1" 1>&2 return 1 fi