mirror of
https://github.com/flatcar/scripts.git
synced 2025-11-28 05:51:43 +01:00
Recompile any old perl modules after perl upgrade
Whenever perl is upgraded, it is a good idea to clean out any old
modules and recompile them. This check ensures that perl-cleaner is run
once and only once after each major perl upgrade.
BUG=chromium-os:19244
TEST=Run preflight queue with perl upgrade and old sdk. Verify that old
perl modules are removed in the first run. Verify perl-cleaner is
not run again in subsequent runs. Run sdk builder and confirm sdk
builder runs perl-cleaner every time since it starts with an old
version of perl.
Change-Id: Ib14f9d73122d5ff2c7a23afc3f56905e30ff2cbc
Reviewed-on: http://gerrit.chromium.org/gerrit/6149
Reviewed-by: Anush Elangovan <anush@chromium.org>
Tested-by: David James <davidjames@chromium.org>
This commit is contained in:
parent
6601c52b1f
commit
d899f8d93f
@ -58,3 +58,9 @@ fi
|
||||
eretry sudo -E ${EMERGE_CMD} ${EMERGE_FLAGS} \
|
||||
chromeos-base/hard-host-depends world
|
||||
|
||||
# If the user still has old perl modules installed, update them.
|
||||
PERL_VERSIONS=$(find /usr/lib*/perl5/vendor_perl/ -maxdepth 1 -mindepth 1 \
|
||||
-type d -printf '%P\n' | sort -u | wc -w)
|
||||
if [ "$PERL_VERSIONS" -gt 1 ] ; then
|
||||
sudo /usr/sbin/perl-cleaner --all
|
||||
fi
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user