mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-27 08:31:04 +02:00
cros_workon: optimize "list" slightly
Some of the repos that we search have dirs (like profiles/ and metadata/) that will never contain ebuilds but do contain a lot of files. Restrict what find searches for to speed things up a bit. BUG=None TEST=`./cros_workon --board x86-alex list --all` shows same list of packages Change-Id: I09f59f3bb7920a02607cc4595b99ae67c06a18cf Reviewed-on: https://gerrit.chromium.org/gerrit/18395 Reviewed-by: David James <davidjames@chromium.org> Tested-by: Mike Frysinger <vapier@chromium.org> Commit-Ready: Mike Frysinger <vapier@chromium.org>
This commit is contained in:
parent
4b7fa1e97c
commit
2af1a305e3
@ -115,8 +115,8 @@ find_keyword_workon_ebuilds() {
|
|||||||
# NOTE: overlay may be a symlink, and we have to use ${overlay}/
|
# NOTE: overlay may be a symlink, and we have to use ${overlay}/
|
||||||
for overlay in ${cros_overlays}; do
|
for overlay in ${cros_overlays}; do
|
||||||
# only look up ebuilds named 9999 to eliminate duplicates
|
# only look up ebuilds named 9999 to eliminate duplicates
|
||||||
find ${overlay}/ -name '*9999.ebuild' | \
|
find ${overlay}/*-* -maxdepth 2 -type f -name '*9999.ebuild' \
|
||||||
xargs grep -l "inherit.*cros-workon" | \
|
-exec grep -l 'inherit.*cros-workon' {} + 2>/dev/null | \
|
||||||
xargs grep -l "KEYWORDS=.*${keyword}.*"
|
xargs grep -l "KEYWORDS=.*${keyword}.*"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user