summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@gmail.com>2023-09-06 16:50:49 +0000
committerBruce Ashfield <bruce.ashfield@gmail.com>2023-09-15 17:30:40 +0000
commitae22af84a0c90318a2192dceabef9a71d8d2544e (patch)
tree0a30e75ddf64f1edd859e6ab0f70ac3592fddf46
parentff3dd2d68e95ff9aee851dff279dd238a5846c8c (diff)
downloadmeta-virtualization-ae22af84a0c90318a2192dceabef9a71d8d2544e.tar.gz
oe-go-mod: enhance help message
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
-rwxr-xr-xscripts/oe-go-mod-autogen.py20
1 files changed, 18 insertions, 2 deletions
diff --git a/scripts/oe-go-mod-autogen.py b/scripts/oe-go-mod-autogen.py
index f4cdcf06..36feba88 100755
--- a/scripts/oe-go-mod-autogen.py
+++ b/scripts/oe-go-mod-autogen.py
@@ -26,6 +26,7 @@ import logging
26import argparse 26import argparse
27from collections import OrderedDict 27from collections import OrderedDict
28import subprocess 28import subprocess
29import textwrap
29 30
30# This switch is used to make this script error out ASAP, mainly for debugging purpose 31# This switch is used to make this script error out ASAP, mainly for debugging purpose
31ERROR_OUT_ON_FETCH_AND_CHECKOUT_FAILURE = True 32ERROR_OUT_ON_FETCH_AND_CHECKOUT_FAILURE = True
@@ -638,8 +639,23 @@ do_compile:prepend() {
638 639
639def main(): 640def main():
640 parser = argparse.ArgumentParser( 641 parser = argparse.ArgumentParser(
641 description="oe-go-mod-autogen.py is used to generate src_uri.inc, relocation.inc and modules.txt to be used by go mod recipes", 642 description="go mod dependency -> SRC_URI procesing",
642 epilog="Use %(prog)s --help to get help") 643 formatter_class=argparse.RawDescriptionHelpFormatter,
644 epilog=textwrap.dedent('''\
645
646 Overview:
647
648 go-mod-oe is a tool for processing go dependencies to generate
649 dependencies suitable for OE fetcher consumption.
650
651 In particular, it creates a build structure suitable for
652 '-mod="vendor"' go builds. All dependencies are in the vendor/
653 directory, so no golang specific fetching or network access happens
654 during the build.
655
656 The files src_uri.inc, relocation.inc and modules.txt are generated
657 and suitable for recipe inclusion.
658 '''))
643 parser.add_argument("--repo", help = "Repo for the recipe.", required=True) 659 parser.add_argument("--repo", help = "Repo for the recipe.", required=True)
644 parser.add_argument("--rev", help = "Revision for the recipe.", required=True) 660 parser.add_argument("--rev", help = "Revision for the recipe.", required=True)
645 parser.add_argument("--module", help = "Go module name. To be used with '--test'") 661 parser.add_argument("--module", help = "Go module name. To be used with '--test'")