diff --git a/src/python/jw/pkg/cmds/pkg/CmdInstall.py b/src/python/jw/pkg/cmds/pkg/CmdInstall.py index 066b8b8e..a041652b 100644 --- a/src/python/jw/pkg/cmds/pkg/CmdInstall.py +++ b/src/python/jw/pkg/cmds/pkg/CmdInstall.py @@ -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), + ) diff --git a/test/integration/jw_pkg/help/test-expected.txt b/test/integration/jw_pkg/help/test-expected.txt index 9c2e5f12..fe76fc8d 100644 --- a/test/integration/jw_pkg/help/test-expected.txt +++ b/test/integration/jw_pkg/help/test-expected.txt @@ -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 (default: False) ============= Running: jw-pkg.py -t ../../../.. --log-level info packages ls --help usage: jw-pkg.py packages ls [-h] [names ...]