Commit f693d67f authored by Guido Gunther's avatar Guido Gunther
Browse files

root.sh: Only check for patched packages when installed

Not all architectures have all packages (e.g. we don't have
flash-kernel on amd64) so check if a package is installed at
all before checking if it's patched.
parent d1088583
Pipeline #16325 passed with stage
in 18 seconds
...@@ -5,8 +5,8 @@ packages=" ...@@ -5,8 +5,8 @@ packages="
librem5-gnome-dev librem5-gnome-dev
" "
# Packages that are patched (need to have a magic tag in their version number) # Packages that, if installed, are patched (need to have a magic tag in their
# See https://source.puri.sm/snippets/20 # version number). See https://source.puri.sm/snippets/20
patched=" patched="
flash-kernel flash-kernel
libgl1-mesa-dri libgl1-mesa-dri
......
...@@ -107,9 +107,12 @@ function check_patched() ...@@ -107,9 +107,12 @@ function check_patched()
fi fi
for pkg in ${patched}; do for pkg in ${patched}; do
if ! chroot "${basedir}" dpkg -s ${pkg} | grep "^Version: .*pureos"; then # Not all architectures have all packages, so check this first
if chroot "${basedir}" dpkg -s ${pkg}; then
if ! chroot "${basedir}" dpkg -s ${pkg} | grep -qs "^Version: .*pureos"; then
echo "${pkg} is not a patched version." echo "${pkg} is not a patched version."
exit 1 exit 1
fi
fi fi
done done
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment