Commit 406961a5 authored by Dorota Czaplejewicz's avatar Dorota Czaplejewicz
Browse files

Merge branch 'check-patched-installed' into 'master'

root.sh: Only check for patched packages when installed

See merge request Librem5/image-builder!99
parents d1088583 f693d67f
......@@ -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