Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bd5c14a8 authored by Alexander Martinz's avatar Alexander Martinz Committed by Michael Bestas
Browse files

roomservice: check all device repositories



Some devices have the same codename but shipped a long time
ago and may not have a current branch set up.
Continue looking up all repositories until a match is found
or no repos are left to check.

For example:

  - android_device_amazon_thor
    - cm-14.1
  - android_device_xiaomi_thor
    - lineage-21.0

  - android_device_semc_zeus
    - jellybean
  - android_device_xiaomi_zeus
    - lineage-21.0

  - android_device_amazon_otter
    - cm-12.1
  - android_device_shift_otter
    - lineage-21.0

Change-Id: Icf9826b31efd872363fdfe73d5a71ff2d06cbe20
Signed-off-by: Alexander Martinz's avatarAlexander Martinz <amartinz@shiftphones.com>
parent 05838ba9
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -287,7 +287,7 @@ def get_default_or_fallback_revision(repo_name):
    for branch in [branch['name'] for branch in result]:
        print(branch)
    print("Use the ROOMSERVICE_BRANCHES environment variable to specify a list of fallback branches.")
    sys.exit()
    return ""

if depsonly:
    repo_path = get_from_manifest(device)
@@ -306,6 +306,12 @@ else:
            manufacturer = repo_name.replace("android_device_", "").replace("_" + device, "")
            repo_path = "device/%s/%s" % (manufacturer, device)
            revision = get_default_or_fallback_revision(repo_name)
            if revision == "":
                # Some devices have the same codename but shipped a long time ago and may not have
                # a current branch set up.
                # Continue looking up all repositories until a match is found or no repos are left
                # to check.
                continue

            device_repository = {'repository':repo_name,'target_path':repo_path,'branch':revision}
            add_to_manifest([device_repository])