Commit Graph

35 Commits

Author SHA1 Message Date
Patrick Gaskin
1c00116c6e fixup! roomservice: Skip setting revision if it's the same as default
If the project remote starts with "aosp-", the revision already gets
removed, causing a KeyError.

Change-Id: Ie016f55d55f4cf64e66de529db9caca1de9b2e82
2025-01-23 07:34:46 +00:00
LuK1337
caae07034a roomservice: Skip setting revision if it's the same as default
Change-Id: I8bcb638c1c395ae460363c626be45727c10c6db7
2025-01-22 10:21:10 +01:00
LuK1337
991fd49cd8 fixup! fixup! roomservice: Migrate from GitHub API to git ls-remote
Change-Id: Ide422d1b056816114c7e372bcd296dbf8675ec95
2025-01-07 01:48:23 +01:00
LuK1337
d5aa270f99 fixup! roomservice: Migrate from GitHub API to git ls-remote
Change-Id: I7a86c7d2344dd4cf1757ffea3c51c3dfc52c6e62
2025-01-07 01:27:43 +01:00
LuK1337
4de0265cdd roomservice: Migrate from GitHub API to git ls-remote
Change-Id: Ia62594dc0d350c2eaa93e9f02372443ac737abb7
2025-01-04 10:23:52 +01:00
LuK1337
ee73731e4e roomservice: Exit if get_default_or_fallback_revision() fails
This was accidentally broken in 8e47b888.

Change-Id: I86c986202afb30cba14b1a1378f8403e462d0e55
2025-01-02 10:24:02 +01:00
Alexander Martinz
8e47b88870 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 <amartinz@shiftphones.com>
2024-12-04 16:58:36 +00:00
LuK1337
6f60459814 Revert "roomservice: Try major-only revision if default doesn't exist"
This reverts commit 39392c99e1.

Change-Id: I124fb3cb668715b1c15a7bcd07f5889785333c16
2024-10-19 01:10:11 +02:00
Chirayu Desai
2d402ed8c0 Revert "roomservice: Use ElementTree.indent()"
Revert submission 402436

Reason for revert: Breaks build

Reverted changes: /q/submissionid:402436

Change-Id: Ia53f8a2c2a39ee437c334c5157a2f7dc5aed44ac
2024-09-13 00:44:07 +00:00
Chirayu Desai
76b04d2f8b Revert "roomservice: Use ElementTree.write()"
Revert submission 402436

Reason for revert: Breaks build

Reverted changes: /q/submissionid:402436

Change-Id: Iac5d3be6cb7692d93dc68c7124dd4362e0800321
2024-09-13 00:44:07 +00:00
Jyotiraditya Panda
13e7f92f72 roomservice: Use ElementTree.write()
write() handles XML conversion and file writing internally.
The xml_declaration=True parameter adds the XML header
automatically, eliminating the need for manual string manipulation

Change-Id: Ib8c3fe33e60accad05572c5af0f0b90866a219d9
Signed-off-by: Jyotiraditya Panda <jyotiraditya@aospa.co>
2024-09-12 18:50:41 +05:30
Jyotiraditya Panda
3bab6429ec roomservice: Use ElementTree.indent()
Replace custom indent() function with the built-in ElementTree.indent()
method, which was introduced in Python 3.9:
https://docs.python.org/3/library/xml.etree.elementtree.html#xml.etree.ElementTree.indent

Change-Id: I45c513a2f02a36c012490db9b05b8fa1eec356ca
Signed-off-by: Jyotiraditya Panda <jyotiraditya@aospa.co>
2024-09-12 18:32:31 +05:30
Yumi Yukimura
14403c2122 roomservice: Set timeout when accessing GitHub
* Bypasses the literally infinite timeout for users who have
  limited access to GitHub (before: 2m13.749s, after: 0m14.354s)
* The timeouts should be enough for users who have freedom internet
  access, even ADSL network connection shouldn't take that long...

Test:
1. Execute `source build/envsetup.sh`
2. `breakfast` a existing device
3. Add "0.0.0.1 github.com" and "0.0.0.1 raw.githubusercontent.com"
   to /etc/hosts
4. `breakfast` any device, observe that it should not take up to
   minutes to quit

Change-Id: Ib90e69c75a50e66b47e6245cb6d0521351b5c71b
2024-07-02 00:28:34 +00:00
LuK1337
2f89bf24a2 roomservice: Remove python2 imports
Change-Id: Id65a4c139f14106632587634c42ef9941b55d0c1
2024-02-14 09:22:34 +01:00
LuK1337
2a9bbcf403 roomservice: Require python3
Change-Id: I08429fbc9380b3a1f04bbcc5116fedf3e2457747
2024-02-14 09:06:18 +01:00
LuK1337
3e865ebb78 roomservice: Add support for remote=aosp-*
This will let us sync kernel prebuilts directly from AOSP.

Change-Id: Ie94f84ee7ec5020023533f8f3364b546ace4983d
2024-02-13 12:12:19 +00:00
Yumi Yukimura
b5e2177257 roomservice: Add support for dry run
* In local build environments, we may want roomservice to
  not mess with the repos and local_manifests

Change-Id: I83014fdedbfdcd9f731463954a8779cf6d1f4cbf
2024-02-08 07:25:01 +00:00
Paul Keith
6b8c2baf9f lineage: s/master/main/
Change-Id: Ia922dd6b396627fea2c8e69f8a7d6bf025b80f7e
2023-10-18 11:57:14 -05:00
LuK1337
d0612f5768 roomservice: Read all local manifests
Change-Id: Idfe6330ff82b9e4c0d11cb0320defa7bf44121f5
2023-04-22 21:26:19 +02:00
LuK1337
7395c7f50e roomservice: Use mirror manifest instead of search API
Change-Id: Ifc64e42e1d443f36033756a6247a9f253b1ab82d
2023-03-04 13:19:33 +01:00
Alessandro Astone
39392c99e1 roomservice: Try major-only revision if default doesn't exist
Change-Id: I91c18a1711e0d01b25e33b30bf0be9bbd443904e
2022-10-10 14:58:57 +02:00
Alessandro Astone
a4cbd27142 roomservice: Finer branch control for roomservice repositories
* Recursively extend the fallback branches mechanism to any
  layer of dependencies.

* Instead of forcing a dependency to use the fallback branch,
  check for each repository if the current one is available.

* Always write the revision in the manifest entry

Change-Id: I37a4aa094de51e9f58e72851f3bc9dc4767dd79b
2022-10-10 14:58:57 +02:00
Timi Rautamäki
882e97e4ad roomservice: add repo to syncable repo list if dir doesn't exist
breakfast may get stuck if the first breakfast for a target is
interrupted before cloning but after adding repositories to local
manifest. Re-doing breakfast skips syncing the repositories if
they're added to the manifest even if not cloned.

Change-Id: Ifefd08fa6da8785c1d5de0b27ac1a08a782f21d6
2021-07-29 21:14:02 +02:00
LuK1337
8137c7c3bf roomservice: Set exit status if we fail to fetch data from github
Change-Id: I6f69f1df1ba7d28e68c5961b405a54e209643db3
2021-05-10 10:32:45 +02:00
Tom Powell
f8adf067fd roomservice: support new manifest formats.
.repo/manifest.xml is no longer a symlink becuase apparently windows
developers need to use repo and windows needs admin for symlinks.

https: //gerrit.googlesource.com/git-repo/+/a269b1cb9dc21dfd598bfea3766206b606ad4589
Change-Id: I88ea0295133959136d7214f13a76b66d89dc88d4
2020-02-25 20:48:12 -08:00
LuK1337
f017e36e65 lineage: Change 'bailing out' message to something more friendly
Change-Id: Iee519ea5cbfa92b6bb26e33d2bac3d2335c770a8
2018-01-27 14:40:17 +00:00
LuK1337
e67b6cb4fd lineage: Allow roomservice to check non device/* repos
Change-Id: I840bcf945c746b3fcdda0ffd567bec7466a22207
2018-01-02 21:01:09 +00:00
Luca Stefani
5c60e4fd24 lineage: Complete the rebrand
* TODO: Rebrand cmsdk when it's in a working state

Change-Id: I0d8d573f9e0032110ae3a0f54ebe11a877b83137
2017-08-23 17:33:22 +03:00
Michael Bestas
e5969e2d1c roomservice: Search for repos in lineage snippet too
Change-Id: Id544d4bce731b14dbc7656382163d4657c347b83
2017-06-17 20:01:23 +03:00
Michael Bestas
21b9d391e7 roomservice: Remove support for devices in main manifest
* We are using roomservice for all devices since a long time

Change-Id: Ice5c37de154ca3fb4cf69a8401e5bbe3c9e56e2a
2017-06-17 19:58:55 +03:00
Michael Gernoth
29f3b5775b roomservice: handle devices with underscores
This change correctly handles devices with underscores in their
name even if there is a device with the same name after the last
underscore (spyder, umts_spyder) by not allowing any underscores
in the manufacturers name.

Without this change, spyder gets resolved to:
device/motorola_umts/spyder
device/motorola/spyder

Only the last one is valid.

With this change, both spyder and umts_spyder get resolved correctly.

Change-Id: I0c95ff126d827a2d6b58875dfcb9327e999f4913
2017-04-03 07:25:01 -05:00
Simon Shields
63ce74b055 cm: support lineage device trees
Change-Id: Id7d7c5747639903d1289557dab38341d5c7cc287
2016-12-31 21:29:32 +00:00
Dan Pasanen
0344771b53 vendor: we are now LineageOS
* Change necessary bits to support our project move

Change-Id: I085470d448a243cc9d60b4ce920dee52086f64cd
2016-12-28 19:44:28 +00:00
Adrian DC
01bdd55142 roomservice: Follow fetched android_device_ projects
* In a situation where the Android tree is already
    fetched and entirely set for a device tree,
    all additions to cm.dependencies in a common
    project were ignored due to being already fetched

 * Add a new array of projects to verify but not
    necessarily fetch, and fill it upon fetch request
    or if the project starts with "android_device_",
    to let the iterations follow the common trees

Change-Id: I9eea0ab9c46a4bed8366baa37a4e7e8696481504
Signed-off-by: Adrian DC <radian.dc@gmail.com>
2016-12-03 01:56:54 -08:00
Michael Bestas
3952f6cb0d Import CM build additions
Change-Id: Id1eb902129754e61dfcc2b5d95c3a75172ff0c5e
2016-09-25 22:32:37 -07:00