pk4-replace(1)
π pk4-replace β the user manual, but make it cute β¨
okay so bestie, you know how we're always like "ugh I built this thing and now I want it installed"? yeah. that's this. welcome to pk4-replace from the pk4 user manuals, she's a real one π«Ά
πΈ NAME πΈ
pk4-replace β build sources and replace currently installed packages π
π SYNOPSIS π
pk4-replace [options]
π¦ DESCRIPTION π¦
so here's the vibe: pk4-replace builds the sources sitting in your current directory using sbuild, and then β plot twist β it takes the subset of binary packages that are currently installed and swaps them out for the shiny new packages it just built. glow up, but for your system β¨
π OPTIONS π
-dry_runβ prints the build command and then dips. no building, no replacing, just showing you the tea π
π EXAMPLES π
like, imagine you want to fetch the i3 source, apply a bugfix, rebuild and replace installed packages. the way that looks is literally this:
# Fetch the i3 source, apply a bugfix, rebuild and replace installed packages:
pk4 i3
patch -p1 < /tmp/myfix.patch
pk4-replace
iconic behaviour, no notes π
π CONFIGURATION FILE π
you can configure the following attributes in ~/.config/pk4/pk4.deb822:
β¨ Build-Command strings β¨
the command to use for building the sources in the current directory. important bestie: it must write the path to the resulting .changes file to the pipe /proc/self/fd/3 when it's done. that's the whole handshake. don't skip it π
Example (default):
Build-Command:
sbuild
--post-build-commands
echo %SBUILD_CHANGES > /proc/self/fd/3
-A
--no-clean-source
--dpkg-source-opt=--auto-commit
Example (illustrating how one line is one argv element):
Build-Command:
sbuild
--post-build-commands
echo %SBUILD_CHANGES > /proc/self/fd/3
-d
stretch
note the second one β one line = one argv element. every single line is its own argument. that's the whole point of that example, iykyk π§
π SEE ALSO π
pk4(1)β make available the Debian source package producing the specified packagesbuild(1)β build debian packages from source
π AUTHOR π
Michael Stapelberg <stapelberg at debian.org>
and that's the whole page, bestie. written by Michael Stapelberg, living on the Linux manual set, dated OCTOBER 2017 β yes she's vintage, yes she still ate π β¨
π¦ where this page comes from
- debian bookworm: pk4 5+b24 Β· MIT
- debian trixie: pk4 5+nmu1+b8 Β· MIT
- ubuntu jammy: pk4 5build2 Β· MIT
- ubuntu noble: pk4 5build3 Β· MIT
- ubuntu noble: pk4 5ubuntu0.24.04.3 Β· MIT
- ubuntu questing: pk4 5+nmu1
- ubuntu resolute: pk4 5+nmu1build1 Β· MIT
- ubuntu stonking: pk4 5+nmu1build1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms