"dpkg-query -s" doesn't give the desired answer, it includes packages
known to dpkg for different reasons, but does not exactly reply
whether they are installed or not, which is the intention of the code.
Change-Id: I84b4a6c4c7c84997c31b2bdb3f10e0fe9ab0b721