blob: bc409cf2b326f8c692202ff908dd73c477c55443 [file] [log] [blame]
# Copyright 2021 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Portage changed the file name.
migrate() {
local root="$1"
local etc="${root}/etc/portage"
# If the old dir doesn't exist, nothing to migrate.
if [[ ! -d "${etc}/package.keywords" ]]; then
return 0
fi
# Clear possibly empty dir.
sudo rmdir "${etc}/package.keywords" 2>/dev/null || :
# Create the new dir.
sudo mkdir -p "${etc}/package.accept_keywords"
# Move the content.
sudo mv "${etc}"/package.keywords/* "${etc}"/package.accept_keywords
# Delete the new empty dir.
sudo rmdir "${etc}/package.keywords"
}
migrate / &
for board in /build/*/; do
migrate "${board}" &
done
wait