Update get_package_list to be more robust to changing output formats.

With Portage 2.1.10, the number of spaces in the output changed. This broke
the get_package_list and caused failures during unit tests. To fix this,
I've updated the script to handle this.

BUG=chromium-os:17151
TEST=Verify that get_package_list works now.

Change-Id: I2a334451807abdbeb9fb5cbb99a54ab75f234330
Reviewed-on: http://gerrit.chromium.org/gerrit/3415
Reviewed-by: Anush Elangovan <anush@chromium.org>
Tested-by: David James <davidjames@chromium.org>
This commit is contained in:
David James 2011-06-29 16:40:30 -07:00
parent 26d68ecaa5
commit 25602368f4

View File

@ -49,4 +49,4 @@ if [[ -z "${FLAGS_ARGV}" ]]; then
fi
emerge-$FLAGS_board --emptytree --usepkgonly -p -v --columns \
$1 2> /dev/null | cut -d ' ' -f 8 | grep '/'
$1 2> /dev/null | sed -n -E -e 's/^\[binary[^]]*\] ([^ ]*) .*$/\1/p'