mirror of
https://github.com/flatcar/scripts.git
synced 2026-05-04 19:56:32 +02:00
toolchain_util: fix parsing emerge --pretend output
Fix parsing the following output:
[ebuild N ] dev-libs/gmp-5.1.3-r1 to /usr/x86_64-cros-linux-gnu/
[ebuild UD] sys-libs/timezone-data-2013d [2014i-r1] to /usr/x86_64-cros-linux-gnu/
The previous regex did not account for upgrades and got confused by the
`[2014i-r1]` listing and goobbled up too much of the string. I am not
sure *why* portage is reporting an upgrade when --emptytree is also used
but there it is. Match all not-] characters instead.
This commit is contained in:
parent
103a146c10
commit
d0da252d49
@ -181,7 +181,7 @@ _get_dependency_list() {
|
||||
|
||||
PORTAGE_CONFIGROOT="$ROOT" emerge "$@" --pretend \
|
||||
--emptytree --root-deps=rdeps --onlydeps --quiet | \
|
||||
sed -e 's/.*\] \([^ :]*\).*/=\1/' |
|
||||
sed -e 's/[^]]*\] \([^ :]*\).*/=\1/' |
|
||||
egrep -v "(=$(echo "${pkgs[*]}")-[0-9])"
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user