diff --git a/qubes-anaconda-addon/org_qubes_os_initial_setup/gui/spokes/qubes_os.py b/qubes-anaconda-addon/org_qubes_os_initial_setup/gui/spokes/qubes_os.py index 57edb85..68f261c 100644 --- a/qubes-anaconda-addon/org_qubes_os_initial_setup/gui/spokes/qubes_os.py +++ b/qubes-anaconda-addon/org_qubes_os_initial_setup/gui/spokes/qubes_os.py @@ -57,8 +57,8 @@ from pyanaconda.ui.common import FirstbootOnlySpokeMixIn __all__ = ["QubesOsSpoke"] def is_package_installed(pkgname): - return not subprocess.call(['rpm', '-q', pkgname], - stdout=open(os.devnull, 'w'), stderr=open(os.devnull, 'w')) + pkglist = subprocess.check_output(['rpm', '-qa', pkgname]) + return bool(pkglist) def usb_keyboard_present(): context = pyudev.Context() @@ -245,8 +245,8 @@ class QubesOsSpoke(FirstbootOnlySpokeMixIn, NormalSpoke): ('qvm.personal', 'qvm.work', 'qvm.untrusted', 'qvm.vault'), depend=self.choice_network) - if (is_package_installed('qubes-template-whonix-gw') and - is_package_installed('qubes-template-whonix-ws')): + if (is_package_installed('qubes-template-whonix-gw*') and + is_package_installed('qubes-template-whonix-ws*')): self.choice_whonix = QubesChoice( _('Create Whonix Gateway and Workstation qubes ' '(sys-whonix, anon-whonix)'),