deviceinfo: prepend manufacturer to device name
Overview:
About half the devices had the manufacturer name in the "deviceinfo_name" variable, the other half did not. For consistency in our aports, and to make reviews consistent as well, it is now mandatory to prepend the vendor name to the device's name.
I thought about forcing it the other way as well, but then we have a
few weird cases, where the phone has the same name as the company,
"Jolla Phone" would just have deviceinfo_name="Phone"
then.
Details:
- Add test that requires the manufacturer's name to be in front of
deviceinfo_name
- Adjust all existing
deviceinfo
files which failed this test, and bump the pkgrel - New device wizard: when the manufacturer is not specified in front of the name, add it automatically.
- Adjust test case for the
ask_for_name()
function.
See also:
Merge request reports
Activity
mentioned in merge request !1650 (merged)
By Oliver Smith on 2018-08-02T21:20:09
- Resolved by Administrator
1 # Reference: <https://postmarketos.org/deviceinfo> 2 # Please use double quotes only. You can source this file in shell scripts. 3 1 4 deviceinfo_format_version="0" 2 deviceinfo_name="Flame" 5 deviceinfo_name="T2M Flame" LGTM except the 1-2 comments (where the Flame one isn't really important for now). Your example with the Jolla phone is also valid for both Fairphones :)
By Luca Weiss on 2018-08-03T07:15:06
Edited by Administrator2 2 # Please use double quotes only. You can source this file in shell scripts. 3 3 4 4 deviceinfo_format_version="0" 5 deviceinfo_name="Nexus 7 2012 Wifi" 5 deviceinfo_name="Asus Nexus 7 2012 Wifi" 6 6 deviceinfo_manufacturer="Asus" 2 2 # Please use double quotes only. You can source this file in shell scripts. 3 3 4 4 deviceinfo_format_version="0" 5 deviceinfo_name="Google Nexus 5" 5 deviceinfo_name="LG Google Nexus 5" changed this line in version 2 of the diff
By Oliver Smith on 2018-08-05T17:32:49
How about an explicit exception for Google Nexus devices?
diff --git a/test/test_aports.py b/test/test_aports.py index 7d1a84c3..6e198382 100644 --- a/test/test_aports.py +++ b/test/test_aports.py @@ -56,7 +56,8 @@ def test_deviceinfo(args): # deviceinfo_name must start with manufacturer name = info["name"] manufacturer = info["manufacturer"] - if not name.startswith(manufacturer): + if not name.startswith(manufacturer) \ + and not name.startswith("Google Nexus"): raise RuntimeError("Please add the manufacturer in front of" " the deviceinfo_name, e.g.: '" + manufacturer + " " + name + "'")
By Grant Miller on 2018-08-03T22:28:59
added 1 commit
- 6b17cce7 - Fix smec-anzu, no manufacturer for Google devices
By Oliver Smith on 2018-08-05T17:32:49
I added a commit by accident, which was meant for master. Reverted it again, pushed with force and canceled the tests.
Anyways, I'm wondering what you think about this merge request everybody. Maybe someone could take another look at it, thanks!
By Oliver Smith on 2018-08-14T02:34:44
Edited by Administratoradded 25 commits
-
6b17cce7...d00f4998 - 23 commits from branch
master
- 4e10bf11 - deviceinfo: prepend manufacturer to device name
- 850e2d19 - Fix smec-anzu, no manufacturer for Google devices
By Oliver Smith on 2018-08-22T23:42:16
-
6b17cce7...d00f4998 - 23 commits from branch
mentioned in issue pmaports#354 (closed)
By Oliver Smith on 2019-09-14T00:54:25