Skip to content

Commit

Permalink
apps: Hide page if PackageKit is not installed.
Browse files Browse the repository at this point in the history
The Applications page uses PackageKit. Hide it via a manifest condition
if it isn't available. Similar to commit 0278284 for the Software
Updates page.
  • Loading branch information
martinpitt authored and mvollmer committed Oct 15, 2024
1 parent 49d67d2 commit 4df9b70
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/apps/manifest.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{
"conditions": [
{"path-exists": "/lib/systemd/system/packagekit.service"},
{"path-not-exists": "/sysroot/ostree"}
],
"tools": {
"index": {
"label": "Applications",
Expand Down
14 changes: 14 additions & 0 deletions test/verify/check-apps
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,20 @@ This <is <not XML.
b.wait_not_present(".pf-v5-c-empty-state")
b.wait_visible(".app-list .pf-v5-c-data-list__item-row:contains('Summary 2')")

def testNoPackageKit(self):
b = self.browser
m = self.machine

m.execute("systemctl stop packagekit")
system_service = m.execute("systemctl show -p FragmentPath packagekit.service | cut -f2 -d=").strip()
m.execute(f"mv {system_service} {system_service}.disabled")
self.addCleanup(m.execute, f"mv {system_service}.disabled {system_service}")

self.assertNotIn("\napps", m.execute("cockpit-bridge --packages"))
self.login_and_go(None)
b.wait_in_text("#host-apps", "Terminal")
self.assertNotIn("Applications", b.text("#host-apps"))


if __name__ == '__main__':
testlib.test_main()

0 comments on commit 4df9b70

Please sign in to comment.