diff --git a/documentation/userguide/configmodel.rst b/documentation/userguide/configmodel.rst index 588a62cac0d99db8e08f97860b3844dbe9f6eff6..12c057d038ac8ac4f227c3aa3ccb3d00e43acdb4 100644 --- a/documentation/userguide/configmodel.rst +++ b/documentation/userguide/configmodel.rst @@ -190,7 +190,7 @@ component section =========== =========== =========== key type description =========== =========== =========== -repo dictionary Specifies information about the git repo(s) that must be cloned and checked out. By default, Shrinkwrap syncs the git repo to the specified revision when building. ``--no-sync`` can be used to tell Shrinkwrap to build it in whatever state the user left it in. Not required if ``sourcedir`` is provided. +repo dictionary Specifies information about the git repo(s) that must be cloned and checked out. By default, Shrinkwrap syncs the git repo to the specified revision when building. ``--no-sync`` or ``--no-sync-all`` can be used to tell Shrinkwrap to build it in whatever state the user left it in. Not required if ``sourcedir`` is provided. sourcedir string If specified, points to the path on disk where the source repo can be found. Useful for developer use cases where a local repo already exists. builddir string If specified, the location where the component will be built. If not specified, shrinkwrap allocates its own location based on SHRINKWRAP_BUILD. toolchain string Defines the toolchain to be used for compilation. Value is set as CROSS_COMPILE environment variable before invoking any prebuild/build/postbuild commands. When using the standard image with a container runtime, the options are: ``aarch64-none-elf-``, ``arm-none-eabi-``, ``aarch64-linux-gnu-``, or ``arm-linux-gnueabihf-``. diff --git a/documentation/userguide/quickstart.rst b/documentation/userguide/quickstart.rst index 87f012f4014dce4ea0e7565b9410692a8fc30bcf..3d0da12d2372f9bbd1fd9205d97f840ca57a9e8f 100644 --- a/documentation/userguide/quickstart.rst +++ b/documentation/userguide/quickstart.rst @@ -317,7 +317,7 @@ artifacts. in the config on every build invocation. If you have made changes in the working directory, your CHANGES WILL BE LOST! You can override this behaviour so that Shrinkwrap just builds whatever is in the working directory by adding - ``--no-sync []`` to the command line. + ``--no-sync `` or ``--no-sync-all`` to the command line. Alternatively, pass ``--dry-run`` to view the shell script that would have been run: diff --git a/shrinkwrap/commands/build.py b/shrinkwrap/commands/build.py index 39180b418fc605963c8af37b8c455717db944df0..564a8d2778885c4f3b7b4ccd7e422cdd6c204b1d 100644 --- a/shrinkwrap/commands/build.py +++ b/shrinkwrap/commands/build.py @@ -48,12 +48,15 @@ def add_parser(parser, formatter): cmdp.add_argument('-s', '--no-sync', metavar='component', required=False, default=[], - action='append', const=True, nargs='?', + action='append', help="""Optionally specify any components whose git repos should not be synced. For all other components, Shrinkwrap ensures that all repos are clean and checked out at the correct - revision. Option can be specified multiple times. If - specified without an argument, behaves as if --no-sync was + revision. Option can be specified multiple times.""") + + cmdp.add_argument('--no-sync-all', + required=False, default=False, action='store_true', + help="""Do not sync repos for any component, as if --no-sync was specified for every component in the config.""") buildall.add_common_args(cmdp) @@ -68,6 +71,6 @@ def dispatch(args): command line. The arguments comply with those requested in add_parser(). """ btvars = vars.parse(args.btvar, type='bt') - if any([c == True for c in args.no_sync]): + if args.no_sync_all: args.no_sync = True buildall.build([args.config], [btvars], args.no_sync, args)