mirror of
https://github.com/flatcar/scripts.git
synced 2026-02-07 08:42:23 +01:00
build_image_util: Drop duplicate EGIT_REPO_URI handling
This was left over from the cros_workon migration. Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
This commit is contained in:
parent
2aca5d3352
commit
a9297cf2e9
@ -304,13 +304,12 @@ get_metadata() {
|
||||
if [ "${key}" = "SRC_URI" ]; then
|
||||
local package_name="$(echo "${pkg%%:*}" | cut -d / -f 2)"
|
||||
local ebuild_path="${prefix}/var/db/pkg/${pkg%%:*}/${package_name}.ebuild"
|
||||
# SRC_URI is empty for the special github.com/flatcar projects
|
||||
if [ -z "${val}" ]; then
|
||||
# The grep invocation gives errors when the ebuild file is not present.
|
||||
# This can happen when the binary packages from ./build_packages are outdated.
|
||||
val="$(grep "EGIT_REPO_URI=" "${ebuild_path}" | cut -d '"' -f 2)"
|
||||
if [ -n "${val}" ]; then
|
||||
# All github.com/flatcar projects specify their commit
|
||||
# If using git, then the package was probably pinned to a commit.
|
||||
local commit=""
|
||||
commit="$(grep "EGIT_COMMIT=" "${ebuild_path}" | cut -d '"' -f 2)"
|
||||
if [ -n "${commit}" ]; then
|
||||
@ -323,10 +322,6 @@ get_metadata() {
|
||||
# Do not attempt to postprocess by resolving ${P} and friends because it does not affect production images
|
||||
val="$(cat "${ebuild_path}" | tr '\n' ' ' | grep -P -o 'SRC_URI=".*?"' | cut -d '"' -f 2)"
|
||||
fi
|
||||
# Some packages use nothing from the above but EGIT_REPO_URI (currently only app-crypt/go-tspi)
|
||||
if [ -z "${val}" ]; then
|
||||
val="$(grep "EGIT_REPO_URI=" "${ebuild_path}" | cut -d '"' -f 2)"
|
||||
fi
|
||||
# Replace all mirror://MIRRORNAME/ parts with the actual URL prefix of the mirror
|
||||
new_val=""
|
||||
for v in ${val}; do
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user