Skip to content
This repository has been archived by the owner on Jul 30, 2020. It is now read-only.

Fix 'install --force' (fix #266) #274

Merged
merged 2 commits into from
May 30, 2019
Merged

Conversation

alikins
Copy link
Contributor

@alikins alikins commented May 30, 2019

SUMMARY

Fix some issues with 'install --force', like the cases in #266

install alikins.collection_inspect,0.0.46

(mazer040test) [newswoop:F29:collection_inspect (master % u=)]$ mazer install --server http://localhost:8000 alikins.collection_inspect,0.0.46
Collections to install:
  alikins.collection_inspect,==0.0.46
Found alikins.collection_inspect,0.0.46 for spec alikins.collection_inspect,==0.0.46
Installed:
  alikins.collection_inspect,0.0.46 to /home/adrian/.ansible/collections/ansible_collections/alikins/collection_inspect

try to install latest version of alikins.collection_inspect (0.0.48) and fail that alikins.collection_inspect is already installed

(mazer040test) [newswoop:F29:collection_inspect (master % u=)]$ mazer install --server http://localhost:8000 alikins.collection_inspect
Collections to install:
  alikins.collection_inspect,*
Found alikins.collection_inspect,0.0.48 for spec alikins.collection_inspect,*
WARNING| alikins.collection_inspect,0.0.46 is already installed at /home/adrian/.ansible/collections/ansible_collections/alikins/collection_inspect
Installed:

'force' install latest version of alikins.collection_inspect (0.0.48), removing 0.0.46, and installing 0.0.48

(mazer040test) [newswoop:F29:collection_inspect (master % u=)]$ mazer install --force --server http://localhost:8000 alikins.collection_inspect
Collections to install:
  alikins.collection_inspect,*
Found alikins.collection_inspect,0.0.48 for spec alikins.collection_inspect,*
Removing previously installed alikins.collection_inspect,0.0.46 from /home/adrian/.ansible/collections/ansible_collections/alikins/collection_inspect
Installed:
  alikins.collection_inspect,0.0.48 to /home/adrian/.ansible/collections/ansible_collections/alikins/collection_inspect

ISSUE TYPE
  • Bugfix Pull Request
MAZER VERSION
name = mazer
version = 0.5.0
config_file = /home/adrian/.ansible/mazer.yml
uname = Linux, newswoop, 5.0.5-200.fc29.x86_64, #1 SMP Wed Mar 27 20:58:04 UTC 2019, x86_64
executable_location = /home/adrian/venvs/mazer_0.4.0_py36/bin/mazer
python_version = 3.6.8 (default, Jan 27 2019, 09:00:23) [GCC 8.2.1 20181215 (Red Hat 8.2.1-6)]
python_executable = /home/adrian/venvs/mazer_0.4.0_py36/bin/python

ADDITIONAL INFORMATION

alikins added 2 commits May 30, 2019 15:17
When checking if a collection intended
to be installed is already installed, let
the check of the installed packages be more
vague. ie, just check if there is a collection
by that namespace/name already installed.

If a collection is installed, and --force is
used, then make sure the already installed
collection is removed, then the new collection
is installed.

This lets 'install --force' force install
older or newer versions of a collection.

Fixes ansible#266
Some tweaks to the install stdout output
to make it more clear what is happening and
to provide more detail on what is installed/removed.
@alikins alikins force-pushed the install_force_266 branch from b38237d to e1a3109 Compare May 30, 2019 19:18
@alikins alikins changed the title [WIP] Fix 'install --force' (fix #266) Fix 'install --force' (fix #266) May 30, 2019
@alikins alikins merged commit 1a1d4a1 into ansible:devel May 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant