CmdRequiredOsPkg: Don't modify deps while iterating #97

Merged
Jan Lindemann merged 1 commit from jan/feature/20260913-cmdrequiredospkg-don-t-modify-deps-while-iterating into master 2026-09-13 20:16:23 +02:00 AGit
Owner

CmdRequiredOsPkg: Don't modify deps while iterating

--skip-excluded removed excluded modules from deps with deps.remove() while iterating over deps. Removing an element shifts the remaining elements to the left, so the loop skipped the entry following each removed one, and consecutively excluded modules survived the filter and leaked into the output.

Build the filtered list with a comprehension instead.

#### CmdRequiredOsPkg: Don't modify deps while iterating --skip-excluded removed excluded modules from deps with deps.remove() while iterating over deps. Removing an element shifts the remaining elements to the left, so the loop skipped the entry following each removed one, and consecutively excluded modules survived the filter and leaked into the output. Build the filtered list with a comprehension instead.
CmdRequiredOsPkg: Don't modify deps while iterating
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 4m51s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 4m34s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 4m40s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 4m39s
CI / Packaging test (push) Successful in 0s
2b951f7861
--skip-excluded removed excluded modules from deps with
deps.remove() while iterating over deps. Removing an element
shifts the remaining elements to the left, so the loop skipped
the entry following each removed one, and consecutively
excluded modules survived the filter and leaked into the
output.

Build the filtered list with a comprehension instead.

Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v0.84.2
Signed-off-by: Jan Lindemann <jan@janware.com>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
janware/jw-pkg!97
No description provided.