Skip to content

Commit ed3ff4f

Browse files
authored
Remove git-core PPA from apt sources (spiceai#10677)
1 parent 6297224 commit ed3ff4f

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

.github/actions/configure-apt/action.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,21 @@ runs:
2525
Acquire::ForceIPv4 "true";
2626
EOF
2727
28+
# GitHub-hosted Ubuntu runner images can include the git-core PPA.
29+
# It is not needed for CI and can make apt update fail when Launchpad
30+
# times out.
31+
if [ -d /etc/apt/sources.list.d ]; then
32+
while IFS= read -r -d '' SOURCE_FILE; do
33+
if sudo grep -Eq 'ppa\.launchpadcontent\.net/git-core/ppa|git-core/ppa' "${SOURCE_FILE}"; then
34+
echo "Removing git-core PPA apt source: ${SOURCE_FILE}"
35+
sudo rm -f "${SOURCE_FILE}"
36+
fi
37+
done < <(
38+
sudo find /etc/apt/sources.list.d -maxdepth 1 -type f \
39+
\( -name '*.list' -o -name '*.sources' \) -print0
40+
)
41+
fi
42+
2843
# Ordered list of Ubuntu archive mirrors close to Pittsburgh, PA
2944
# (Teraswitch datacenter), with reliable fallbacks. The deb822
3045
# sources format supports multiple URIs per source, and apt will

0 commit comments

Comments
 (0)