diff -r d85258458623 -r a89729bdde89 src/Pure/System/linux.scala --- a/src/Pure/System/linux.scala Thu Dec 19 22:13:47 2019 +0100 +++ b/src/Pure/System/linux.scala Thu Dec 19 22:21:43 2019 +0100 @@ -71,7 +71,11 @@ progress.bash("apt-get install -y -- " + Bash.strings(packages), echo = true).check def package_installed(name: String): Boolean = - Isabelle_System.bash("dpkg-query -s " + Bash.string(name)).ok + { + val result = Isabelle_System.bash("dpkg-query -s " + Bash.string(name)) + val pattern = """^Status:.*installed.*$""".r.pattern + result.ok && result.out_lines.exists(line => pattern.matcher(line).matches) + } /* users */