jw-pkg packages install: Add -x/--exact option #159

Merged
Jan Lindemann merged 4 commits from jan/feature/20261028-jw-pkg-packages-install-add-x-exact-option into master 2026-10-28 21:02:52 +01:00 AGit
2 changed files with 16 additions and 2 deletions
Showing only changes of commit afd3a8c40b - Show all commits

cmds.pkg: Add --exact to jw-pkg packages install
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 5m17s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 5m16s
CI / Packaging test (pull_request) Successful in 0s

Add an additional option -x, which inhibits dependency resolution during
installation of packages.

Signed-off-by: Jan Lindemann <jan@janware.com>
Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v1.4.0
Jan Lindemann 2026-10-27 14:56:40 +01:00
Signed by: Jan Lindemann
GPG key ID: 3750640C9E25DD61

View file

@ -26,6 +26,14 @@ class CmdInstall(Cmd): # export
action = 'store_true',
help = "Only update the listed packages, don't install them",
)
parser.add_argument(
'-x',
'--exact',
default = False,
action = 'store_true',
help = "Install local files directly, without resolving "
"dependencies",
)
parser.add_argument(
'-F',
'--fixed-strings',
@ -38,4 +46,8 @@ class CmdInstall(Cmd): # export
names = (
args.names if args.fixed_strings else self.distro.expand_macros(args.names)
)
return await self.distro.install(names, only_update = args.only_update)
return await self.distro.install(
names,
only_update = args.only_update,
install_deps = not (args.only_update or args.exact),
)

View file

@ -88,7 +88,7 @@ options:
--download-only Only download packages from the repos, don't install them,
yet (default: False)
============= Running: jw-pkg.py -t ../../../.. --log-level info packages install --help
usage: jw-pkg.py packages install [-h] [--only-update] [-F] [names ...]
usage: jw-pkg.py packages install [-h] [--only-update] [-x] [-F] [names ...]
Install the distribution's notion of available packages
@ -99,6 +99,8 @@ options:
-h, --help show this help message and exit
--only-update Only update the listed packages, don't install them
(default: False)
-x, --exact Install local files directly, without resolving
dependencies (default: False)
-F, --fixed-strings Don't expand macros in <names> (default: False)
============= Running: jw-pkg.py -t ../../../.. --log-level info packages ls --help
usage: jw-pkg.py packages ls [-h] [names ...]