bdep-sync(1)
β¨ NAME β¨
okay bestie, welcome to bdep-sync(1) β the manual page for bdep sync π. It's giving synchronize project and build configurations and honestly? Iconic.
πΈ SYNOPSIS πΈ
bdep sync [options] [pkg-spec] [cfg-spec] [pkg-args]
bdep sync [options] [pkg-spec] [cfg-spec] --upgrade|-u | --patch|-p
bdep sync [options] [pkg-spec] [cfg-spec] [--upgrade|-u | --patch|-p]
dep-spec... [cfg-var...]
dep-spec = pkg[/ver]
cfg-spec = (@cfg-name | --config|-c cfg-dir)... | --all|-a
pkg-spec = (--directory|-d pkg-dir)... | prj-spec
prj-spec = --directory|-d prj-dir
pkg-args = (?pkg | cfg-var)...
π¦ DESCRIPTION π¦
The sync command synchronizes a project with its build configurations. The first form (no --upgrade or --patch and only pkg-args arguments, if any, are specified) upgrades the project packages to the latest version/iteration, adjusts their dependencies according to the latest manifest information, and updates the lockfile. π
If no project or package directory is specified, then the current working directory is assumed. If no configuration is specified, then the default configurations are assumed. See bdep-projects-configs(1) for details on specifying projects and configurations. Optional pkg-args are the additional dependency packages and/or configuration variables to pass to the underlying bpkg-pkg-build(1) command.
The second form (no arguments but either --upgrade or --patch is specified), in addition to the first form's functionality, also upgrades or patches immediate (by default or if --immediate|-i is specified) or all (if --recursive|-r is specified) dependencies of the specified project packages. If no project packages are specified explicitly, then this form upgrades or patches dependencies of all the initialized packages in a project.
The third form (one or more dep-spec arguments are specified), in addition to the first form's functionality, also upgrades (by default or if --upgrade is specified) or patches (if --patch is specified) the specified dependencies. If --immediate|-i or --recursive|-r is specified, then it also upgrades or patches the immediate or all dependencies of the specified dependencies, respectively. Alternative to --upgrade and --patch, the desired upgrade (or downgrade) version can be specified explicitly.
Note also that --immediate|-i or --recursive|-r can only be specified with an explicit --upgrade or --patch.
Configuration variables can be specified to only apply to specific packages in pkg-args and dep-spec using the argument grouping mechanism (bdep-argument-grouping(1)). Additionally, packages in pkg-args can be placed into specific linked configurations by specifying the configuration with one of the --config* options (or @ notation) using the same grouping mechanism.
If during synchronization a build-time dependency is encountered and there is no build configuration of a suitable type associated with the project, then the user is prompted (unless the respective --create-*-config option is specified) to automatically create such a configuration and associate it with the project. See bpkg-cfg-create(1) for background on configuration types.
π EXAMPLES π
As an example, consider project prj with two packages, foo and libfoo:
prj/
|-- foo/
`-- libfoo/
Assuming foo and libfoo have been initialized in the default build configuration, the following invocations illustrate the common sync use cases (the current working directory is shown before the shell prompt).
Synchronize foo and libfoo with the default configuration:
prj/$ bdep sync
The same (all initialized packages in a project are always synchronized at once):
prj/$ cd foo
foo/$ bdep sync
Add a dependency on libx with sync fetching and configuring a suitable version:
foo/$ edit manifest # Add 'depends: libx ^1.0.0'
foo/$ bdep sync
Upgrade all the immediate dependencies of foo:
foo/$ bdep sync -u
Upgrade all the dependencies of all the initialized packages in a project recursively:
foo/$ cd ../
prj/$ bdep sync -u -r
Upgrade libx to the latest version:
prj/$ bdep sync libx
Upgrade libx and its immediate dependencies to the latest version:
prj/$ bdep sync -u -i libx
Upgrade libx to the latest patch version:
prj/$ bdep sync -p libx
Upgrade libx and all its dependencies recursively to the latest patch version.
prj/$ bdep sync -p -r libx
Upgrade libx to version 1.2.3.
prj/$ bdep sync libx/1.2.3
Upgrade libx to version 1.2.3 and patch all its dependencies, recursively:
prj/$ bdep sync -p -r libx/1.2.3
π₯ SYNC OPTIONS π₯
okay these are the sync-specific options, no cap:
--upgrade|-uβ Upgrade dependencies to the latest available version that satisfies all the constraints. π--patch|-pβ Upgrade dependencies to the latest available patch version that satisfies all the constraints.--immediate|-iβ Also upgrade or patch immediate dependencies.--recursive|-rβ Also upgrade or patch all dependencies, recursively.--yes|-yβ Don't prompt for confirmation when up/down-grading dependencies.--disfigureβ Disfigure project packages during synchronization effectively causing their from-scratch reconfiguration.--fetch|-fβ Perform thefetchcommand prior to synchronization.--fetch-full|-Fβ Perform thefetch --fullcommand prior to synchronization.--sys-no-queryβ Do not query the system package manager for the installed versions of packages specified with thesysscheme. See the correspondingbpkg-pkg-build(1)option for details.--sys-installβ Instruct the system package manager to install available versions of packages specified with thesysscheme that are not already installed. See the correspondingbpkg-pkg-build(1)option for details.--sys-no-fetchβ Do not fetch the system package manager metadata before querying for available versions of packages specified with thesysscheme. See the correspondingbpkg-pkg-build(1)option for details.--sys-no-stubβ Do no require a stub for packages specified with thesysscheme. See the correspondingbpkg-pkg-build(1)option for details.--sys-yesβ Assume the answer to the system package manager prompts is yes. See the correspondingbpkg-pkg-build(1)option for details.--sys-sudo progβ Thesudoprogram to use for system package manager interactions that normally require administrative privileges (fetch package metadata, install packages, etc). See the correspondingbpkg-pkg-build(1)option for details.--create-host-configβ Create a configuration for build-time dependencies without prompt.--create-build2-configβ Create a configuration for build system module dependencies without prompt.--implicitβ Perform implicit synchronization. This mode is normally used by other tools (for example, a build system hook) to ensure projects and configurations are synchronized. To improve performance, especially for the "everything is already synchronized" case, sync executed in this mode assumes that no configuration flags (seebdep-config(1)) have changed since the last explicit synchronization. It also does not search for a project in the current working directory β if any, its directory should be specified explicitly with--config|-c.--all|-aβ Use all build configurations.--config|-c dirβ Specify the build configuration as a directory.--directory|-d dirβ Assume project/package is in the specified directory rather than in the current working directory.--config-name|-n nameβ Specify the build configuration as a name.--config-id numβ Specify the build configuration as an id.
π COMMON OPTIONS π
The common options are summarized below with a more detailed description available in bdep-common-options(1). π
-vβ Print essential underlying commands being executed.-Vβ Print all underlying commands being executed.--quiet|-qβ Run quietly, only printing error messages.--verbose levelβ Set the diagnostics verbosity tolevelbetween0and6.--stdout-format formatβ Representation format to use for printing to stdout.--jobs|-j numβ Number of jobs to perform in parallel.--progressβ Display progress indicators for long-lasting operations, such as network transfers, building, etc.--no-progressβ Suppress progress indicators for long-lasting operations, such as network transfers, building, etc.--diag-colorβ Use color in diagnostics.--no-diag-colorβ Don't use color in diagnostics.--bpkg pathβ The package manager program to be used for build configuration management.--bpkg-option optβ Additional option to be passed to the package manager program.--build pathβ The build program to be used to build packages.--build-option optβ Additional option to be passed to the build program.--curl pathβ The curl program to be used for network operations.--curl-option optβ Additional option to be passed to the curl program.--pager pathβ The pager program to be used to show long text.--pager-option optβ Additional option to be passed to the pager program.--options-file fileβ Read additional options from file.--default-options dirβ The directory to load additional default options files from.--no-default-optionsβ Don't load default options files.
π DEFAULT OPTIONS FILES π
See bdep-default-options-files(1) for an overview of the default options files. For the sync command the search start directory is the project directory, except for the implicit mode for which only the predefined directories (system, etc) are searched in. The following options files are searched for in each directory and, if found, loaded in the order listed:
bdep.options
bdep-{sync|sync-implicit}.options # (mode-dependent)
The following sync command options cannot be specified in the default options files:
--directory|-d
--implicit
--config|-c
πΈ ENVIRONMENT πΈ
okay bestie, the environment is literally the vibe controller here, so listen up π
BDEP_SYNCβ set this and you can suppress the automatic synchronization that happens when the build system gets invoked π. If it's set, auto-sync only goes down when the variable's value istrueor1. no cap, those are the only two that count. This suppression thing is highkey useful when you don't have a usablebdepand/orbpkgβ like, the tools just aren't there, so why would it try, right? π«ΆBDEP_SYNCED_CONFIGSβ thesynccommand keeps this one going to dodge recursive re-synchronization (we do NOT do infinite loops in this house π). It holds a space-separated,"-quotedlist of configuration paths that have been β or are currently being β synchronized by the currentbdepinvocation chain. Thesynccommand peeks at this variable and then silently ignores any synchronization request that's already been done or is already in progress. quiet, unbothered, no drama π§
fr fr, if you're out here messing with these, you're in the deep end of the pool and that's iconic of you π
π BUGS π
Found a bug? Do not suffer in silence, bestie π Send bug reports to the users@build2.org mailing list. That's the move. periodt. β¨
π COPYRIGHT π
Copyright (c) 2014-2024 the build2 authors. π
Permission is granted to copy, distribute and/or modify this document under the terms of the MIT License. slay π
and that's the whole page, babe π«Ά this was bdep-sync(1) from bdep 0.17.0, dated June 2024 β main character documentation energy only π
β¨ go forth and sync responsibly, ily ππΈ
π¦ where this page comes from
- fedora 43: bdep 0.17.0-5.fc43 Β· MIT
- fedora 44: bdep 0.17.0-7.fc44 Β· MIT
- nixos 26.05: bdep 0.17.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms