FS#77906 - [cockpit-machines] missing dependency 'which'

Attached to Project: Community Packages
Opened by Zep Man (Zepman) - Sunday, 19 March 2023, 13:46 GMT
Last edited by Massimiliano Torromeo (mtorromeo) - Tuesday, 21 March 2023, 00:49 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Jelle van der Waa (jelly)
Massimiliano Torromeo (mtorromeo)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
Packages `cockpit-machines` and `cockpit-packagekit` miss a dependency for package `which`.

The tool which is required by package `cockpit-machines` to be able to add VMs. If package `which` is not installed, Cockpit will report that package `virt-install` needs to be installed (even if it is installed).

The tool which is required by package `cockpit-packagekit` to be able to open the relevant UI page. If package `which` is not installed, the browser reports:
```
Tracer failed: "{"problem":null,"exit_status":127,"exit_signal":null,"message":"--: line 1: which: command not found\n--: line 1: exec: import json\nfrom tracer.query import Query\n\nq = Query()\napplications = q.affected_applications().get()\n\n\ndef filter_by_type(apps, type_str):\n return [app.name for app in apps if app.type == type_str]\n\n\ndump_obj = {}\n# ignore type \"session\" for cockpit use case\ndump_obj[\"reboot\"] = filter_by_type(applications, \"static\")\ndump_obj[\"daemons\"] = filter_by_type(applications, \"daemon\")\ndump_obj[\"manual\"] = filter_by_type(applications, \"application\")\n\nprint(json.dumps(dump_obj))\n: not found"}", data: """"
```

The tool which might be needed by other package Cockpit packages or by Cockpit itself, but I haven't tested enough to determine

Additional info:
* package version(s): cockpit:286.1-1, cockpit-machines:285-1, cockpit-packagekit:286.1-1
* config and/or log files etc.
* link to upstream bug report, if any

Steps to reproduce:
Install `cockpit`, `cockpit-machines` and `cockpit-packagekit`.
Ensure `which` is not installed.

Visit in Cockpit the Virtual Machine page, and try to add a VM.
Visit in Cockpit the Applications page, and note that it fails to load.
This task depends upon

Closed by  Massimiliano Torromeo (mtorromeo)
Tuesday, 21 March 2023, 00:49 GMT
Reason for closing:  Fixed
Additional comments about closing:  cockpit-287-2
Comment by Toolybird (Toolybird) - Sunday, 19 March 2023, 20:40 GMT
Known recurring problem. For example [1]

[1] https://bugs.archlinux.org/task/76963#comment214019

Loading...