Skip to content

main/devicepkg-dev: machine-info: remove manufacturer from HARDWARE_MODEL

Administrator requested to merge machine-info-updates into master

Fixes https://gitlab.com/postmarketOS/pmaports/-/merge_requests/4547#note_1643793191

In !3950, we added some more stuff to /etc/machine-info, which is a systemd file, that we use due to the re-implementation of hostname1 dbus in openrc-settingsd. As part of what was added is HARDWARE_VENDOR, and HARDWARE_MODEL, which are two nice strings, that can be fetched from hostname1 by applications. This is indeed already the case in GNOME Settings, which displays it pretty nicely: https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/919 (they were later merged).

As it can be seen in that initial implementation (to my knowledge, the properties were added to machine-info and to hostname1 by the same author of that GNOME Settings MR), the MODEL does not include information about the VENDOR. However (from #354 (closed)), our deviceinfo_name includes both. Which results in ugly outputs like "Hardware Model PINE64 PINE64 PinePhone". This MR attempts to fix that, by removing the vendor prefix

@z3ntu unfortunately, I don't have better documentation that what introduced it, and this still has to remove the whitespaces from the variable name, but I wanted to put it here, so we can discuss better than in matrix.

@PureTryOut do you have any idea if this is shown in Plasma too? Might give us some additional info on how do they expect to implement this.

Another pending things to do, would be to rebuild all the device packages 😄

Merge request reports

Loading