Crash if dpkg is missing
evildeeds opened this issue · comments
evildeeds commented
Describe the bug
If dpkg is missing, for example if the system is a custom built yocto with meta-tegra then the following line will cuse an exception
jetson_stats/jtop/core/jetson_variables.py
Line 203 in e22b49f
To Reproduce
- Install jetson_stats on a system without dpkg; or forcefully unistall dpkg; or change line 203 to an invalid command
- Remove or rename
/etc/nv_tegra_release
if it exists - (re-)start the jtop service
- See error in service log
Expected behavior
Looking at the function get_nvidia_l4t
the intended behavior I would expect is to fail the version detection and return an empty string instead of crashing.
Perhaps check that dpkg exist first and if not then return false from check_dpkg_nvidia_l4t_core
.
Board
- jetson-stats version: 4.2.7
- Jetpack: 5.1.3
- L4T: 35.5.0
evildeeds commented
My solution will be to populate my image with /etc/nv_tegra_release