Skip to content

Commit f4af4d2

Browse files
2nd try to fix apt warning
1 parent 29c9397 commit f4af4d2

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

.github/actions/bombsquad_build_env/action.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,7 @@ runs:
100100
# apt's fetch sandbox drops to the _apt user, which can't reach an
101101
# archive dir inside the runner workspace -- apt notices and falls
102102
# back to fetching as root anyway, just with a warning per package.
103-
# Ask for that fallback explicitly so it isn't noise. Downloads then
104-
# land as root:root 0644, which the cache save (running as the
105-
# runner user) can still read.
103+
# Ask for that fallback explicitly so it isn't noise.
106104
mkdir -p .cache/apt-archives/partial
107105
sudo apt-get update -qq -o Acquire::Languages=none
108106
sudo apt-get install -y --no-install-recommends \
@@ -114,6 +112,14 @@ runs:
114112
libpango1.0-dev \
115113
ninja-build \
116114
libsdl3-dev
115+
116+
# Running unsandboxed means apt leaves root-owned droppings here.
117+
# The .debs are 0644 and readable, but 'lock' is 0640 and 'partial'
118+
# is root-owned too, which makes the cache save's tar bail out.
119+
# Neither is worth caching, so drop them; chown the rest back so
120+
# tar (running as the runner user) can read everything left.
121+
sudo rm -rf .cache/apt-archives/lock .cache/apt-archives/partial
122+
sudo chown -R "$(id -u):$(id -g)" .cache/apt-archives
117123
- name: Setup env variables
118124
if: ${{ inputs.using-cmake == 'true' }}
119125
shell: bash

0 commit comments

Comments
 (0)