bpkg-pkg-unpack(1)

πŸ“¦
version 0.17.0 Β· 2 versions
, in fedora 43, fedora 44, nixos 26.05

NAME πŸ’–

bpkg-pkg-unpack β€” bestie, this is the one that unpacks your package archive. πŸ“¦βœ¨


SYNOPSIS πŸŽ€

bpkg pkg-unpack [options] (pkg[/ver] | --existing|-e dir)

DESCRIPTION πŸ¦‹

Okay so picture this: you've already fetched a package with bpkg-pkg-fetch(1), and now you just want it unpacked. If you only hand over the package name, that's exactly what pkg-unpack does β€” it unpacks the archive of that previously fetched package. The resulting package state? unpacked (peep bpkg-pkg-status(1) for the receipts). 🫢

But now, if you also specify the package version, things get spicy. Then the (source) directory from one of the directory-based repositories (bpkg-rep-add(1)) gets used in place β€” no copying it into the configuration directory, nope, none of that. A package like this is called external. πŸ‘‘

And if you roll up with the --existing|-e option? Then instead of a package name, pkg-unpack expects a local path to an existing package directory. In that case bpkg uses the (source) directory in place too, same energy as the packages from directory-based repositories. Also, unless you pass --purge|-p, bpkg will not try to remove that directory when the package is later purged with the bpkg-pkg-purge(1) command. That kind of package is external as well. 🧚

Now, if --existing|-e shows up together with --replace|-r, then pkg-unpack will replace the archive and/or source directory of a package that's already sitting in the unpacked or fetched state. Swap szn. πŸ”₯

Heads up bestie, external packages come with semantics changes compared to a normal package, and you gotta know them:
  • The package (output) directory inside the configuration is called just pkg rather than pkg-ver. πŸ’…
  • It's also assumed that the packaging information (package manifest and lockfile) for such packages may change without incrementing the package version β€” like, say, during development. To support this, bpkg implements the package iteration mechanism, which may result in iteration numbers being shown as part of the package version β€” for example, 1.2.3#1 (see Package Version (#package-version)). No cap.

PKG-UNPACK OPTIONS ✨

  • --existing, -e β€” treat the argument as a path to an existing package directory instead of as the package name you want to unpack.
  • --purge, -p β€” remove that existing package directory when the package gets purged.
  • --replace, -r β€” replace the source directory if the package is already unpacked or fetched. Can only be specified with an external package.
  • --directory, -d dir β€” assume the configuration is in dir instead of in the current working directory.

COMMON OPTIONS 🌸

Here's the whole common-options lineup, summarised below β€” the fuller, more detailed tea lives in bpkg-common-options(1). πŸ“

  • -v β€” print the essential underlying commands being executed.
  • -V β€” print all the underlying commands being executed.
  • --quiet, -q β€” run quietly, only printing error messages.
  • --verbose level β€” set the diagnostics verbosity to level between 0 and 6.
  • --stdout-format format β€” the representation format to use for printing to stdout.
  • --jobs, -j num β€” number of jobs to perform in parallel.
  • --no-result β€” don't print informational messages about the outcome of performing a command or some of its parts.
  • --structured-result fmt β€” write the result of performing a command in a structured form.
  • --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.
  • --build path β€” the build program to be used to build packages.
  • --build-option opt β€” additional option to be passed to the build program.
  • --fetch path β€” the fetch program to be used to download resources.
  • --fetch-option opt β€” additional option to be passed to the fetch program.
  • --fetch-timeout sec β€” the fetch and fetch-like (for example, git) program timeout.
  • --pkg-proxy url β€” HTTP proxy server to use when fetching package manifests and archives from remote pkg repositories.
  • --git path β€” the git program to be used to fetch git repositories.
  • --git-option opt β€” additional common option to be passed to the git program.
  • --sha256 path β€” the sha256 program to be used to calculate SHA256 sums.
  • --sha256-option opt β€” additional option to be passed to the sha256 program.
  • --tar path β€” the tar program to be used to extract package archives.
  • --tar-option opt β€” additional option to be passed to the tar program.
  • --openssl path β€” the openssl program to be used for crypto operations.
  • --openssl-option opt β€” additional option to be passed to the openssl program.
  • --auth type β€” types of repositories to authenticate.
  • --trust fingerprint β€” trust a repository certificate with a SHA256 fingerprint.
  • --trust-yes β€” assume the answer to all authentication prompts is yes.
  • --trust-no β€” assume the answer to all authentication prompts is no.
  • --git-capabilities up=pc β€” protocol capabilities (pc) for a git repository URL prefix (up).
  • --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.
  • --keep-tmp β€” don't remove bpkg's temporary directory at the end of the command execution, and print its path at the verbosity level 2 or higher.

DEFAULT OPTIONS FILES 🧚

Wanna know how default options files work overall? Go read bpkg-default-options-files(1) β€” it's giving overview. πŸ“– For the pkg-unpack command specifically, the search start directory is the configuration directory. The following options files are searched for in each directory and, if found, loaded in the order listed:

bpkg.options
bpkg-pkg-unpack.options
But bestie, listen β€” these pkg-unpack command options cannot be specified in the default options files:
  • --directory|-d
  • --purge|-p

BUGS πŸ›

Found a bug? Send bug reports to the users@build2.org mailing list. They'll handle it, fr fr. πŸ™ˆ


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.


And that's the whole thing, my love β€” written for bpkg 0.17.0, dated June 2024. Go unpack something iconic. πŸ’…βœ¨πŸ«Ά

πŸ“¦ where this page comes from