diff options
| -rwxr-xr-x | scripts/oe-go-mod-autogen.py | 20 |
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 | |||
| 26 | import argparse | 26 | import argparse |
| 27 | from collections import OrderedDict | 27 | from collections import OrderedDict |
| 28 | import subprocess | 28 | import subprocess |
| 29 | import 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 |
| 31 | ERROR_OUT_ON_FETCH_AND_CHECKOUT_FAILURE = True | 32 | ERROR_OUT_ON_FETCH_AND_CHECKOUT_FAILURE = True |
| @@ -638,8 +639,23 @@ do_compile:prepend() { | |||
| 638 | 639 | ||
| 639 | def main(): | 640 | def 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'") |
