Commit graph

185 commits

Author SHA1 Message Date
80a67129e3
Initialize tequila 2024-05-25 22:23:29 +02: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
Michael W
39881f863a repopick: Limit commit counting
* For every commit, repopick checks the last commits for the presence of
  the commits to be picked
* In every project a change should go in, it calls "git rev-list --count"
  to find the maximum amount of commits to be searched, but it only cares
  if there are less (or equal) commits at all than to be checked
* Therefore, we can limit the counting to one more than we want to check
* This is relevant for example for fw/b, where there is a huge amount of
  changes and therefore a lot of time used to count

* Example: fw/b
  git rev-list --count HEAD: 46.693s
  git rev-list --count --max-count=1000 : 0.019s
* Real-life example:
  repopick -t qs-lightmode
  Old: 2m33.375s
  New: 0m6.657s

Change-Id: If0500574fb282e332996b606dd9926841f8e0e88
2022-06-15 20:57:30 +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
Michael Bestas
151e17118c build: Relocate extract utils to tools/extract-utils
Change-Id: I13489b54298ebc2410c38ca9e16aa7121a28f997
2021-01-03 03:33:59 +01:00
Sebastiano Barezzi
85359e5b65
fixup! extract_utils: implement patchelf
* Move $PATCHELF exporting from oat2dex to setup_vendor
* Since it requires $HOST to be set, let's make it global, so oat2dex can also use it

Change-Id: I4556a3c19cd01c9b3a68d358d19a361217d9c3c1
2020-12-23 16:51:06 +01:00
Alessandro Astone
46b6e3a454 extract_utils: generate_prop_list: Ignore vdex/odex files too
Change-Id: Ibe77e8b93466a71d4d0c48ca8f4ff2e00c6e40af
(cherry picked from commit ee669788bc86330215f2444b3beb1f3870329c9e)
2020-12-15 19:22:12 +01:00
Volodymyr Zhdanov
a039a46b0d extract_utils: implement patchelf
Change-Id: I406f70ef1ce9ec7a0998f77439b7d3fa3ec4e62a
2020-11-26 20:40:02 +01:00
LuK1337
a574c010d2 repopick: Use project revision if available
* Fixes repopicking from repos synced under multiple paths + branches.

Change-Id: Icb165f3d9df67f1b11304e8d7ed955464dcb57bc
2020-11-23 10:55:24 +01:00
LuK1337
abb6597d30 extract_utils: Set filename_from_src: true for CLASS=ETC targets
Change-Id: I881f6a67d84d8de0a4bef17bf3c9eac049679c38
2020-10-06 19:29:53 +02:00
dianlujitao
37e088a2c9 extract_utils: Disable ELF check for shared library
* This is indeed a nice feature, but it's absolutely a bad idea to
   hardcode dependencies of prebuilt modules in proprietary-files.txt.

Change-Id: I8c2d75ff62c0c7862f40e777bcbad4d9cebc074c
2020-09-20 14:56:47 +01:00
Alexander Koskovich
411066c311 extract_utils: Fix system_ext framework blueprint generation.
Change-Id: I20e44be6ea48b9bd5b05055d3cf465f63c908463
2020-09-17 10:00:17 +02:00
Luca Stefani
0409f23119 extract_utils: Add support for system_ext
Change-Id: I0760cdd9bec1a0a0551aa68a60c34f9c00932668
2020-09-09 20:17:37 +02:00
Aayush Gupta
d395aa21eb repopick: Address PEP8 warnings regarding indentations and variable naming
- Format variables into snake case
- Add spacing between # and text
- Space after ','
- Test for membership with "not in" instead
- Remove too many empty lines

Ref:
[0]: https://www.python.org/dev/peps/pep-0008/#function-and-variable-names
[1]: https://www.python.org/dev/peps/pep-0008/#block-comments
[2]: http://pep8online.com/

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
Change-Id: I16dedf465674056571782921983eb3ec4276a1f8
2020-08-08 21:23:41 +02:00
Aayush Gupta
5fd8e2b1ee repopick: Use empty metavar parameter to fix help's indentation
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
Change-Id: I05329c3e5d234846a65f230f69d6b36aa3cc6fa1
2020-08-08 21:23:27 +02:00
Aaron Kling
7d6601cf02 repopick: Use upstream instead of revision to determine branch
This is to allow repopick to determine a branch even on a
revision locked manifest. If upstream is not set, it falls
back to revision.

Per the repo manifest documentation:
Attribute upstream: Name of the Git ref in which a sha1 can be
found. Used when syncing a revision locked manifest in -c mode to
avoid having to sync the entire ref space. Project elements not
setting their own upstream will inherit this value.

Change-Id: I12876f7e3b440f9eab6d1b96eba9b18a13cff2e0
2020-07-20 19:23:05 +02:00
Aaron Kling
d97bfec63f repopick: Fallback to name when project path is empty
When a manifest project path and project name is identical, the
repo manifest parser returns None for the project path. Since
both name and path are required, fall back to using name for path
when path is None.

Change-Id: I2fb3cc0cc643808a3049171804742f249d737679
2020-06-28 18:38:47 +02:00
Andreas Schneider
b1d3f65ac2 extract-utils: Fix usage for ETC files which need sub_dir
Thanks to Tad.

Change-Id: I6a0e7978afce6444d0827f97d7686f23aa7500c9
2020-05-25 23:52:52 +02:00
Andreas Schneider
a7e400ceb6 extract_utils: Fix vendor Android.bp creation with subdirectory
error: vendor/samsung/beyond0lte/Android.bp:37:9: unrecognized property "sub_dir"

Change-Id: I23becda0345f41d2cb1462e74b66a787e9ad4c96
2020-05-23 16:00:38 +02:00
dianlujitao
ee95f242c8 extract_utils: Handle Brotli compressed block image
Change-Id: I1b3ef34ebba9b43fd684c6abaa1dbc77c8786da7
2020-04-25 16:21:32 +02:00
dianlujitao
fc48634419 extract_utils: Support odm/product/vendor partition for zip extract
Change-Id: Iec06835f1703e276f8882c5ee327ef241a2f8f23
2020-04-25 16:21:32 +02:00
dianlujitao
0b501d534a extract_utils: Generate deodexed apk/jar with consistent checksum
* zip stores timestamp for all included files. The timestamps of dex
   files are different across different runs, result in inconsistent
   checksum of output apk/jar.
 * Workaround the issue by using fixed timestamp for dex files.

Change-Id: I21f3a7e32cdfdb07c5f5c140df2e797efd4a8005
2020-04-06 13:10:36 +08:00
dianlujitao
db1caf4597 extract_utils: Fix doubled path separator
* $DST_FILE is already prefixed with "/", don't double it.

Change-Id: I2655313abd7720a54b20f541a95960ae9ec373ad
2020-04-06 12:43:17 +08:00
Han Wang
ae82c34dd5 extract_utils: Fix up 4a2b65fb60
Change-Id: I9e5ea799812ca932de95ec6cbdedb604cbde5736
2020-03-10 09:41:34 +02:00
XiNGRZ
4a2b65fb60 extract_utils: Fix bad substitution for zsh
Change-Id: I5f4fabc62b1ac3da159b36c3ae6080e145948530
2020-03-10 07:49:55 +01:00