fix: Keep removed package metadata in repodata#2210
Open
baszalmstra wants to merge 4 commits intomainfrom
Open
fix: Keep removed package metadata in repodata#2210baszalmstra wants to merge 4 commits intomainfrom
baszalmstra wants to merge 4 commits intomainfrom
Conversation
When patching repodata, packages marked for removal were being deleted from the packages/conda_packages maps. They should only be added to the `removed` key to signal they are yanked, while keeping their metadata available. https://claude.ai/code/session_01WAbEdaYeU6m4cmbXTPdwSM
No need to check if the package exists in the map first — just always insert into the removed set as instructed by the patch. https://claude.ai/code/session_01WAbEdaYeU6m4cmbXTPdwSM
…kages When a tar.bz2 package is removed, only also mark the equivalent .conda package as removed if it actually exists in the conda_packages map. https://claude.ai/code/session_01WAbEdaYeU6m4cmbXTPdwSM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Changes the package removal behavior in repodata patches to preserve package metadata for removed packages instead of deleting them entirely. When a package is marked for removal, it is now added to the
removedset while keeping its metadata in thepackagesandpackages.condamaps.This allows consumers to:
The change updates the patch application logic to:
removedset.tar.bz2and.condaarchive formats consistentlyHow Has This Been Tested?
The existing test snapshots have been updated to reflect the new behavior:
test__removing_1: Verifies that removed packages remain in the package maps with their metadata intacttest__removing_2: Confirms that removed packages are properly tracked in theremovedset while their metadata is preservedThe snapshot updates show that packages marked for removal now appear in both their original location (with full metadata) and in the
removedlist.Checklist: