209 Commits

Author SHA1 Message Date
SkyMinus
821a9ddc31 Initial MinusOS Balsam
Signed-off-by: SkyMinus <minus_rav@qq.com>
2025-07-01 21:20:43 +08:00
Michael W
230d1dca1c repopick: Paginate queries properly
Currently there is a limit of 500 changes per page, giving us only
those when repopicking a query. By observing the "_more_changes" field
in the response and adding the "start" parameter to the query we can
do pagination and return all changes

Test: repopick -p -Q "branch:lineage-23.0"
Result before: 500 changes
Result after: 1094 changes (correct count as of time of commit)

Change-Id: I00304bc2c87b75cef89a26838da3dd1b1f0e65db
2025-06-27 15:07:55 +00:00
Alexander Koskovich
40161df056 merge_dtbs: Add qcom,oem-id to EXTRA_KEYS
This is used by Nothing to differentiate between the base & pro models
on the Phone (3a).

Change-Id: I56f7e58f134571ea35a6dafef54e2b30ba20b5f0
2025-06-14 18:24:24 +00:00
Cosmin Tanislav
49cbf625f2 merge_dtbs: ignore not matching DTBOs when finding symbols for a fixup
Change-Id: I1705341d9ec68b46ac6f6c1007c6ea28f9c4e95d
2025-06-11 05:53:44 +00:00
Cosmin Tanislav
0ea2a44fbc merge_dtbs: Sort DTBOs based on needed symbols
Some DTBOs might use symbols from other DTBOs and require them to be
applied before them.

Sort them based on the __symbols__ and __fixups__ nodes, by creating a
dependency graph.

Change-Id: I40acf5da6b673b636a91f75ae3f3c634f2b5c505
2025-06-08 18:34:54 +03:00
Arian
eef4080d27 android: merge_dtbs: Respect oem specific extra ids
Some OEMs add their own properties to avoid merging incompatible
overlays for different devices with the same QCOM soc.

Change-Id: Ic5b38a122173d8e9ecc1f0f399411cb37acf3150
2025-04-18 16:08:24 +08:00
Guru Das Srinagesh
8e2709c91e merge_dtbs: Craft unique name for final saved merged trees
Incorporate the hash of a combination of all msm-ids, board-ids, and
pmic-ids of the InnerMergedDeviceTree in the final filenames of the
saved InnerMergedDeviceTrees.

Change-Id: I629e1a274b23d71061c547578d1ddbcf92c8cf79
Signed-off-by: Guru Das Srinagesh <quic_gurus@quicinc.com>
2025-01-30 19:16:33 +08:00
Guru Das Srinagesh
81c8cad9e8 merge_dtbs: Use logging and argparse
Use the logging module to log important information to various log
levels: info, debug, warning and error.
- Modify __str__ representations of classes DeviceTree and
  InnerMergedDeviceTree for readability in debug logs
- Make parse_dt_files() return instead of yield so as to order all the
  filename parsing at one go after the preceding log messages

Use the argparse module to specify script arguments cleanly. Also make
the corresponding change to merge_dtbs.sh to invoke this script with the
correct flags.

Change-Id: Id09d9d7b34cde60eff99876f0c0c4f6643852aee
Signed-off-by: Guru Das Srinagesh <quic_gurus@quicinc.com>
2025-01-30 19:16:33 +08:00
Guru Das Srinagesh
bd92c42017 merge_dtbs.py: Print only basenames of dtb* files
When debugging issues with the script, it helps to not have in the
script's output the fully qualified path names of the DTB and DTBO files
being merged as they are very lengthy. Retain only the relevant parts of
the filnames - the basenames for better readability.

Change-Id: Ia18584fcf9ff173c4b22d4543c83c4091e15b8f8
Signed-off-by: Guru Das Srinagesh <quic_gurus@quicinc.com>
2025-01-30 19:14:46 +08:00
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
Chirayu Desai
0c5aab2704 repopick: unquote URL
Test: repopick -Q "status:open+-is:wip" works
Change-Id: I346c5c40e8197ad1c91235ee1cbacaa3d30c7b91
2024-12-22 17:42:42 +00:00
LuK1337
be60f23b63 repopick: Use add_mutually_exclusive_group() where possible
Change-Id: I7e38e2371d075afd53200d60703eb4466fff07e3
2024-12-09 19:19:23 +01:00
Michael Bestas
8e7b7795df repopick: Add support for hashtags
Test: repopick -H redbull
Change-Id: I1522be31e547a7f8917223e7eeae4389de083227
2024-12-09 19:19:23 +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
75b2afaadf repopick: Require python3
Change-Id: I95f598947a29b2095bd7539b1f279dccc1b25097
2024-03-26 20:09:48 +01:00
LuK1337
2a348e8e2b repopick: Use number instead of id for error msgs
Change-Id: I1ebfd8315d1dbbdbee2cd50095f5d7c6b98e7057
2024-03-11 11:58:11 +01: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
LuK1337
65498a79bd repopick: Skip commit_exists() check when using -p
Change-Id: I7b99e8c940bddad80e6362302f1ae24248e42faf
2024-02-12 21:45:28 +00:00
LuK1337
92ced50692 repopick: Fix logic for skipping already merged changes
We can't iterate a list and update it at the same time.

Test: Run `repopick -t XXI` twice
Change-Id: I85651783531b59fd4b48d54a663c22cb243edac7
2024-02-11 11:03:43 +01:00
dianlujitao
77e5f117f7 repopick: Use hostname of the URL to determine lineage gerrit
Change-Id: Ifd3883917bc4acd7d58179235d880f2e4a43b670
2024-02-08 20:26:58 +08: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
dianlujitao
12c5c7233e repopick: Clear Pyright warnings
Change-Id: I63962cc31820329a0fcf8ed96a13ef12a9f67875
2024-02-06 09:39:58 +00:00
dianlujitao
ce64349c54 repopick: Check fetch result based on the actual commit
Checking for FETCH_HEAD is not reliable when fetching in parallel.

Change-Id: I0c07f7c4bffb80e5d12b13f301ba684b95112272
2024-02-06 09:39:58 +00:00
dianlujitao
8a3a02e0b5 repopick: Apply change in parallel
Change-Id: Iafd803422082bcc17f2ad3300df3882d689f3674
2024-02-06 09:39:58 +00:00
dianlujitao
0b48b9b0c1 repopick: Avoid repeatedly performing the same check
Jobs such as check for already picked changes only need to be done once
for each git repository, but it was lunched every time picking a commit.

Change-Id: I87b3fea101dbcedb38502015fe9a9af5f25b397c
2024-02-06 09:39:58 +00:00
dianlujitao
6682b3f35a repopick: Use the builtin urllib to handle HTTP basic authentication
Also do proper URL encode while at it.

Change-Id: I64c0913eed535b109af2adc830288b3dd17c0cbb
2024-02-06 09:39:58 +00:00
dianlujitao
6f048e37fd repopick: Clean up subprocess calls
* Use the builtin approach to decode text output
 * Drop unnecessary system shell usage
 * Use subprocess.run when we don't need its stdout

Change-Id: Ibb2aeae442b5e97828fe4e0eb783e6512288d245
2024-02-06 09:39:58 +00:00
dianlujitao
c0fb88f19e repopick: Organize imports and format with black
Change-Id: I94080fb8adba0af83d86f0c67af8fac460ffbea0
2024-02-06 09:39:58 +00:00
dianlujitao
94b1026f1a repopick: Remove python2 support
Change-Id: I8f164eea3a17888bcf30ff649ddcf81a00bab582
2024-02-06 09:39:58 +00:00
Paul Keith
6b8c2baf9f lineage: s/master/main/
Change-Id: Ia922dd6b396627fea2c8e69f8a7d6bf025b80f7e
2023-10-18 11:57:14 -05:00
LuK1337
0ddf65dc8d repopick: Fix regex related SyntaxWarning on Python 3.12
Change-Id: I23f80997f34a158d564a2e41043242a5af9f2ac3
2023-09-20 20:29:28 +02:00
Aaron Kling
0d1608e30f kernel: Support Qualcomm merge_dtbs script
Script from clo kernel/build at kernel.lnx.5.10.r1-rel

Change-Id: Ia90975c895644b86d9f861ddd5a18b7cf6ce1470
2023-08-28 19:15:02 +03:00
Chirayu Desai
11eaeaf039 repopick: Don't ignore change status for query mode (-Q)
* Why not just use force with it if you really want to
  pick abandoned changes?
* Avoids surprises

Change-Id: I7420e1c37cc127d1f74539d5685bd9bf77be44c3
2023-05-27 05:15:30 +05:30
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