Commit graph

4 commits

Author SHA1 Message Date
Fabián Cañas
c1f344e980 Add * support products and modules
Passing "*" to --products is equivalent to passing the all_named_producs
build variable

Passing "*" to --modules passes the contents of
PRODUCT_OUT/all_modules.txt

The total length of the text of all_modules can easily exceed the
maximum argument size for the OS. The proper solution is likely to call
getconf ARG_MAX, then concatenate the command to be executed to check
against the limit. Instead, the modules are processed in batches of 40k
modules. As long as module names don't get extremely long, this should
keep us under the ARG_MAX limit. In testing, using --modules "*" gets
split into two batches.

Test: build/make/tools/whichgit --modules "*"
Test: build/make/tools/whichgit --modules "*" --unused
Test: build/make/tools/whichgit --modules "*" --products "*"

Existing use-cases should remain unchanged:

TEST: build/make/tools/whichgit --modules framework
Change-Id: Ifa947daea2d439df0145e6def92637b67a8b5d22
2024-04-24 21:23:58 +00:00
Fabián Cañas
97ea68aea6 Add --unused parameter to whichgit
The --unused parameter inverts the output of whichgit, reporting which
git projects are not used for a given build target.

Test: build/make/tools/whichgit --unused
Test: build/make/tools/whichgit --unused --modules framework

Existing use-cases should remain unchanged:

Test: build/make/tools/whichgit --modules framework
Change-Id: Ia4e55a5cb0331d522fed76821fe813ef98c25a67
2024-04-23 21:28:29 -04:00
Joe Onorato
8e908b221f The --why parameter in whichgit should be optional
Test: ./build/make/tools/whichgit --modules out/target/product/coral/system.img
Change-Id: Ibc6e208d75c8e68c8130dc9ba3fc7af51390691b
2022-10-24 08:03:20 -07:00
Joe Onorato
cccf2ca337 Add a tool that will tell which git projects are used for a build target
See build/make/tools/whichgit -h for the options

Test: build/make/tools/whichgit --modules com.google.android.tzdata
Test: build/make/tools/whichgit --modules framework
Test: TARGET_BUILD_APPS=com.google.android.tzdata4 build/make/tools/whichgit --products mainline_modules_arm64 --variants eng --modules $TARGET_BUILD_APPS --why "*"
Change-Id: I05d91b85575a920b3ec9f5959e2ce463a45e63a3
2022-09-28 23:46:18 -07:00