Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Arch Linux
arch-boxes
Commits
80ae307e
Commit
80ae307e
authored
Sep 27, 2020
by
Sven-Hendrik Haase
Browse files
Merge branch 'print-retrying-message' into 'master'
Print message while waiting for device to come up See merge request
!127
parents
c49a11f0
c8e00563
Pipeline
#1909
failed with stages
in 4 minutes and 32 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
build-inside-vm.sh
View file @
80ae307e
...
...
@@ -40,6 +40,15 @@ function cleanup() {
}
trap
cleanup EXIT
# Helper function: wait until a file path exists
# ${1} - file path
function
wait_until_exists
()
{
until
test
-e
"
${
1
}
"
;
do
echo
"
${
1
}
doesn't exist yet..."
sleep
1
done
}
# Create the disk, partitions it, format the partition and mount the filesystem
function
setup_disk
()
{
truncate
-s
"
${
DISK_SIZE
}
"
"
${
IMAGE
}
"
...
...
@@ -50,7 +59,7 @@ function setup_disk() {
LOOPDEV
=
$(
losetup
--find
--partscan
--show
"
${
IMAGE
}
"
)
# Partscan is racy
until
test
-e
"
${
LOOPDEV
}
p2"
;
do
true
;
done
wait_until_exists
"
${
LOOPDEV
}
p2"
mkfs.btrfs
"
${
LOOPDEV
}
p2"
mount
-o
compress-force
=
zstd
"
${
LOOPDEV
}
p2"
"
${
MOUNT
}
"
}
...
...
@@ -104,7 +113,7 @@ function image_cleanup() {
function
mount_image
()
{
LOOPDEV
=
$(
losetup
--find
--partscan
--show
"
${
1
:-${
IMAGE
}}
"
)
# Partscan is racy
until
test
-e
"
${
LOOPDEV
}
p2"
;
do
true
;
done
wait_until_exists
"
${
LOOPDEV
}
p2"
mount
-o
compress-force
=
zstd
"
${
LOOPDEV
}
p2"
"
${
MOUNT
}
"
# Setup bind mount to package cache
mount
--bind
"/var/cache/pacman/pkg"
"
${
MOUNT
}
/var/cache/pacman/pkg"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment