always apk upgrade builder VM, fix --clean of symlinked dirs

Fix for softlinks to directories during --clean / always use latest packages within a release at build time to pick up latest security fixes etc.
This commit is contained in:
Stefan Reimer 2022-03-12 17:56:14 +00:00 committed by Jake Buchholz Göktürk
parent c9665f68dc
commit 5e8967002e
2 changed files with 3 additions and 1 deletions

2
build
View File

@ -95,7 +95,7 @@ def clean_work():
for x in (set(os.listdir('work')) - WORK_CLEAN):
x = os.path.join('work', x)
log.debug('removing %s', x)
if os.path.isdir(x):
if os.path.isdir(x) and not os.path.islink(x):
shutil.rmtree(x)
else:
os.unlink(x)

View File

@ -22,6 +22,8 @@ setup_builder() {
einfo "Setting up Builder Instance"
setup-apkrepos -1 # main repo via dl-cdn
# ODO? also uncomment community repo?
# Always use latest versions within the release, security patches etc.
apk upgrade --no-cache --available
apk --no-cache add \
e2fsprogs \
dosfstools \