mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-27 16:41:11 +02:00
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>
This commit is contained in:
parent
835542154c
commit
e7293bb80c
@ -142,15 +142,16 @@ show_workon_ebuilds() {
|
|||||||
show_workon_info() {
|
show_workon_info() {
|
||||||
local atoms="$1"
|
local atoms="$1"
|
||||||
local keyword="$2"
|
local keyword="$2"
|
||||||
|
local sort="sort -u -k1b,1"
|
||||||
# Column 1: Package name
|
# Column 1: Package name
|
||||||
# Column 2: Repo name
|
# Column 2: Repo name
|
||||||
# Column 3: Source directory (if present locally)
|
# Column 3: Source directory (if present locally)
|
||||||
join \
|
join \
|
||||||
<(echo "$atoms" | sed -e 's/ /\n/g' | sort -u) \
|
<(echo "${atoms}" | sed -e 's/ /\n/g' | ${sort}) \
|
||||||
<(join -a 1 -e - -o 1.2,1.1,2.2 \
|
<(join -a 1 -e - -o 1.2,1.1,2.2 \
|
||||||
<(show_project_ebuild_map "${keyword}" | sort -u) \
|
<(show_project_ebuild_map "${keyword}" | ${sort}) \
|
||||||
<(show_project_path_map | sort -u) \
|
<(show_project_path_map | ${sort}) \
|
||||||
| sort -u)
|
| ${sort})
|
||||||
}
|
}
|
||||||
|
|
||||||
# Canonicalize package name to category/package.
|
# Canonicalize package name to category/package.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user