Commit 80d39938 by Sébastien Eustace

Fix skipped packages appearing as being installed

parent 7ae7e2b7
......@@ -16,6 +16,7 @@
- Fixed handling of post releases.
- Fixed python restricted dependencies not being checked agaisnt virtualenv version.
- Fixed python/platform constraint not being picked up for subdependencies.
- Fixed skipped packages appearing as installing.
## [0.4.2] - 2018-03-10
......
......@@ -35,5 +35,6 @@ exist it will look for <comment>poetry.toml</> and do the same.
installer.extras(self.option('extras'))
installer.dev_mode(not self.option('no-dev'))
installer.dry_run(self.option('dry-run'))
installer.verbose(self.option('verbose'))
return installer.run()
......@@ -201,7 +201,12 @@ class Installer:
installs = []
updates = []
uninstalls = []
skipped = []
for op in ops:
if op.skipped:
skipped.append(op)
continue
if op.job_type == 'install':
installs.append(
f'{op.package.pretty_name}'
......@@ -223,7 +228,7 @@ class Installer:
f'<info>{len(installs)}</> install{"" if len(installs) == 1 else "s"}, '
f'<info>{len(updates)}</> update{"" if len(updates) == 1 else "s"}, '
f'<info>{len(uninstalls)}</> removal{"" if len(uninstalls) == 1 else "s"}'
f''
f'{", <info>{}</> skipped".format(len(skipped)) if skipped and self.is_verbose() else ""}'
)
self._io.new_line()
......@@ -251,7 +256,7 @@ class Installer:
def _execute_install(self, operation: Install) -> None:
if operation.skipped:
if self._io.is_verbose() and (self._execute_operations or self.is_dry_run()):
if self.is_verbose() and (self._execute_operations or self.is_dry_run()):
self._io.writeln(
f' - Skipping <info>{operation.package.pretty_name}</> '
f'(<comment>{operation.package.full_pretty_version}</>) '
......@@ -275,7 +280,7 @@ class Installer:
target = operation.target_package
if operation.skipped:
if self._io.is_verbose() and (self._execute_operations or self.is_dry_run()):
if self.is_verbose() and (self._execute_operations or self.is_dry_run()):
self._io.writeln(
f' - Skipping <info>{target.pretty_name}</> '
f'(<comment>{target.full_pretty_version}</>) '
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment