CFE-4742: Fixed simulate mode reporting both removal and install of the same package (3.27.x) - #6338
Open
larsewi wants to merge 1 commit into
Open
CFE-4742: Fixed simulate mode reporting both removal and install of the same package (3.27.x)#6338larsewi wants to merge 1 commit into
larsewi wants to merge 1 commit into
Conversation
larsewi
force-pushed
the
simulate-pkg-mapremove-3.27.x
branch
from
September 2, 2026 11:51
f06963e to
46e3231
Compare
Contributor
Author
|
@cf-bottom Jenkins please :) |
|
Sure, I triggered a build: Jenkins: https://ci.cfengine.com/job/pr-pipeline/14618/ Packages: http://buildcache.cfengine.com/packages/testing-pr/jenkins-pr-pipeline-14618/ |
…ckage In DiffPkgOperations() and ManifestPkgOperations(), inserting an install message into the installed/present map set name_arch to NULL because the map took ownership of it as a key. The MapRemove() call that cancels a previous removal message ran after that, so it looked up a NULL key and matched nothing. The cancellation was silently skipped exactly when an install message had been inserted: a package recorded as removed and then installed was reported as both removed and installed. In debug builds a NULL key also fails an assertion in StringHash() once the map outgrows the array-map stage. Moved the cancellation above the code that hands name_arch to the map. Changelog: Title Ticket: CFE-4742 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Co-authored-by: Lars Erik Wik <53906608+larsewi@users.noreply.github.com> Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech> (cherry picked from commit 5ddb6d9) (cherry picked from commit 17dd60d)
larsewi
force-pushed
the
simulate-pkg-mapremove-3.27.x
branch
from
September 2, 2026 11:56
46e3231 to
29b2e49
Compare
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.
Backported from #6332