Skip to content

Conversation

kenodegard
Copy link
Contributor

@kenodegard kenodegard commented Mar 31, 2022

There are 6 kinds of conda clean:

  • --tarballs
  • --packages
  • --index-cache
  • --tempfiles
  • --all: all of the above
  • --force-pkgs-dirs: nuclear option removing the entire package cache

Previously if running as dry-run only the tarball and package removal checks for the dry-run condition. So running the following had no impact with --dry-run:

  • --index-cache
  • --tempfiles
  • --force-pkgs_dirs: this is of particular concern given the potentially corrupting nature of this removal

Further if running --all with --dry-run the way the dry-run check is implemented the program exists after only processing the tarballs. So effectively an incomplete dry-run report.

This addresses all of these inconsistencies.

Also removes --source-cache argument deprecated 5 years ago in conda 4.6.0.

@kenodegard kenodegard self-assigned this Mar 31, 2022
@kenodegard kenodegard requested a review from a team as a code owner March 31, 2022 21:04
@anaconda-issue-bot anaconda-issue-bot added the cla-signed [bot] added once the contributor has signed the CLA label Mar 31, 2022
@kenodegard kenodegard added this to the 4.13.0 milestone Apr 1, 2022
Copy link
Member

@jezdez jezdez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great, I think I found an issue in the typehints and minor flake8 stuff that god picked up by my editor.

@kenodegard kenodegard merged commit 9014956 into conda:master Apr 1, 2022
@kenodegard kenodegard deleted the main_clean-dryrun branch April 1, 2022 19:35
travishathaway pushed a commit to travishathaway/conda that referenced this pull request Apr 5, 2022
* Custom action for `-c [PATH [...]]` parsing

* Proper dry-run cascading

* Split all clean function into `find_*` vs `rm_*`

* Remove unnecessary/confusing cache location print

* Include tempfiles in json_result

* conda clean need --yes for non-interactive

* Remove extra black formatting

* Remove argparse._copy_items import

* Fix typing inconsistencies

* Remove deprecated --source-cache
@github-actions github-actions bot added the locked [bot] locked due to inactivity label Apr 4, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla-signed [bot] added once the contributor has signed the CLA locked [bot] locked due to inactivity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants