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="
librem5-gnome-dev
"
# Packages that are patched (need to have a magic tag in their version number)
# See https://source.puri.sm/snippets/20
# Packages that, if installed, are patched (need to have a magic tag in their
# version number). See https://source.puri.sm/snippets/20
patched="
flash-kernel
libgl1-mesa-dri
......
......@@ -107,10 +107,13 @@ function check_patched()
fi
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."
exit 1
fi
fi
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