Skip to content
Snippets Groups Projects

deviceinfo: prepend manufacturer to device name

Merged Imported Administrator requested to merge feature/deviceinfo-name-consistency into master
3 unresolved threads

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:

!1650 (comment 91245369)

Edited by Administrator

Merge request reports

Checking pipeline status.

Approval is optional

Merged by AdministratorAdministrator 6 years ago (Aug 23, 2018 12:44am UTC)

Merge details

  • Changes merged into master with ccf8b609.
  • Deleted the source branch.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • 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"
    • Author Owner

      I've googled a bit and apparently the Flame was produced by either T2Mobile or Thundersoft apparently. Seemingly Mozilla never called it "Mozilla Flame" themselves either, just 'The Flame' or just 'Flame' :)

      By Luca Weiss on 2018-08-03T07:11:56

    • Please register or sign in to reply
  • Author Owner

    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 Administrator
  • Author Owner

    Maybe add a deviceinfo var to say whether it was sold under the manufacture's name or a different one because its just sounds kinda weird for nexus devices

    By Craig Tatlor on 2018-08-03T14:44:12

  • Administrator
  • 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="Nexus 7 2012 Wifi"
    5 deviceinfo_name="Asus Nexus 7 2012 Wifi"
    6 6 deviceinfo_manufacturer="Asus"
    • Author Owner

      Isn't the point of having the seperate manufacturer so the Nexus devices would be:

      deviceinfo_name="Google Nexus 7 2012 Wifi"
      deviceinfo_manufacturer="Asus"

      Since it's a Google branded device manufactured by Asus

      By Martijn Braam on 2018-08-03T21:54:24

    • Please register or sign in to reply
  • 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"
  • Author Owner

    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

  • Author Owner

    I think maybe manufacturer name and vendor name would be better

    By Craig Tatlor on 2018-08-04T21:21:57

  • Author Owner

    Eg deviceinfo_manufacturer name and deviceinfo_vendor_name

    By Craig Tatlor on 2018-08-04T21:23:09

  • Administrator added 1 commit · Imported

    added 1 commit

    • 6b17cce7 - Fix smec-anzu, no manufacturer for Google devices

    Compare with previous version

    By Oliver Smith on 2018-08-05T17:32:49

  • Author Owner

    Thanks for all the comments! I like @GrantM11235's solution, adjusted the code accordingly. What do you think folks, is this ready?

    By Oliver Smith on 2018-08-05T17:33:44

  • Administrator added 1 commit · Imported

    added 1 commit

    • 0bfa1d5d - main/libphonenumber: pkgrel bump

    Compare with previous version

    By Oliver Smith on 2018-08-14T02:28:42

  • Author Owner

    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 Administrator
  • Administrator added 25 commits · Imported

    added 25 commits

    Compare with previous version

    By Oliver Smith on 2018-08-22T23:42:16

  • Administrator added 1 commit · Imported

    added 1 commit

    • ccf8b609 - bq-chaozu: fix deviceinfo_name

    Compare with previous version

    By Oliver Smith on 2018-08-23T00:26:27

  • Administrator changed the description · Imported

    changed the description

    By Oliver Smith on 2018-08-23T00:43:55

  • Author Owner

    All the issues you guys found are resolved now, and it's rebased. No comment in the last week, so it seems to me that this is ready to be shipped! :ship:

    By Oliver Smith on 2018-08-23T00:44:37

  • Administrator merged · Imported

    merged

    By Oliver Smith on 2018-08-23T00:44:46

  • Administrator mentioned in issue pmaports#354 (closed) · Imported

    mentioned in issue pmaports#354 (closed)

    By Oliver Smith on 2019-09-14T00:54:25

  • Please register or sign in to reply
    Loading