KAS-LOCK(1)
β¨ kas-lock β the lock plugin, bestie β¨
okay so real quick: this is kas-lock from the kas suite, manual section 1. it's a plugin, and it's the one that makes lockfiles. let's get into it π
πΈ SYNOPSIS πΈ
kas lock [-h] [--skip STEP] [--force-checkout] [--update] [--indent INDENT]
[--sort]
[config]
π¦ DESCRIPTION π¦
so basically: this creates and updates kas project lockfiles. that's the whole vibe.
this plugin is what implements the kas lock command. periodt.
when you run this command, kas makes a locking spec that contains only the exact commit of each repository. why do you care? because that's how you pin the commit of floating branches and tags, while still keeping a super easy update path. π«Ά the lockfile gets created next to the first file on the kas cmdline. for the full tea on locking support, go look at kas.includehandler.IncludeHandler <#kas.includehandler.IncludeHandler>.
Note, bestie: β¨ - all referenced repositories are checked out, because we need to resolve cross-repo configs - all branches are resolved before patches are applied
π Updating lockfiles
when you update lockfiles, kas tries to update the repository revisions in the lockfile that defines the revision. and here's the important bit: if a repository is exclusively locked in an external lockfile, that lock does not get updated β because we literally cannot modify an external repository, no cap. BUT if that same revision is also defined in a local lockfile, then it does get updated in the local lockfile. slay.
so the algorithm for figuring out where to pin a repository's revision goes like this:
- Find all repositories that have a floating ref (i.e. no commit). Assign to to-lock list
- Iterate over all lockfiles (in include order)
- for each repository, check if it is locked in the current file
- if lock is up to date, remove from to-lock list
- else if lockfile is internal, update lockfile, remove from to-lock list
- else (repo is locked in external lockfile): mark repo external
- for each repository, check if it is locked in the current file
- Remove all repos with external marks from to-lock list
- Add all remaining repos in to-lock list to topmost lockfile, create if needed
π Examples
the lockfile gets created as kas-project.lock.yml. wanna regenerate it? just call it again:
kas lock --update kas-project.yml
and the generated lockfile will automatically be used to pin the revisions:
kas build kas-project.yml
heads up though β the lockfiles should be checked-in into the VCS. don't be the person who forgets this π
β¨ OPTIONS β¨
π Positional Arguments
configβ the config file(s), separated by colon. if you don't specify one, it uses.config.yamlinsideKAS_WORK_DIR.
π Named Arguments
--skip=[]β skip build steps. wanna skip more than one step? use this argument multiple times, no biggie.- Possible choices:
setup_dir,setup_home,make_non_interactive,init_setup_repos,repo_setup_loop,finish_setup_repos,repos_checkout,repos_apply_patches,setup_environ,write_bbconfig
- Possible choices:
--force-checkout=Falseβ always checkout the desired commit/branch/tag of each repository, discarding any local changes. yes, that means your local changes. gone. π--update=Falseβ pull new upstream changes to the desired branch even if it's already checked out locally--indent=2β line indent (# of spaces, default:2)--sort=Falseβ alphanumerically sort keys in output
π SEE ALSO π
kas-project-config(1), kas-dump(1), kas-build(1)
π KAS π
part of the kas(1) suite, iykyk.
Author Daniel Wagner, Jan Kiszka, Claudius Heine
Copyright Siemens and contributors, 2017-2025
and that's the whole thing, bestie π«Ά this was version 5.4, dated Jun 25, 2026 β go lock some revisions, you absolute icon πβ¨π
π¦ where this page comes from
- ubuntu stonking: kas 5.4-1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms