Investigate using DNF excludepkgs config option instead of repository metadata modification #5
Labels
No labels
ai-review-please
Backlog Status
Needs Review
Backlog Status
Ready
chore
documentation
points
01
points
02
points
03
points
05
points
08
points
13
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Sprint Status
Blocked
Sprint Status
Done
Sprint Status
In Progress
Sprint Status
Review
Sprint Status
To Do
Technical Debt
Work Item
Bug
Work Item
Epic
Work Item
Spike
Work Item
Task
Work Item
User Story
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
quality/rmdepcheck#5
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
In the DNF docs I found the
excludepkgsrepo config setting, which we may be able to use instead of doing repository modification. The logic of rmdepcheck would remain the same, but instead of all the snazzy/terrifying XML editing stuff, to 'modify' the base repo(s) all we'd do is set theexcludepkgsconfig option appropriately (at runtime, with--setopt, I guess).I haven't actually tried this yet, but I thought about it while revising the XML parser, and it occurred to me that it's not totally simple, because we still need to do the 'what binary packages are built from this SRPM?' thing. Five minutes thinking about it gave me this:
which runs very fast and is probably usable. I'm not sure if
excludepkgsallows excluding by NEVRA as opposed to name, though. Excluding by name is technically not quite correct, I think - it's theoretically possible (I think) for a repo to contain multiple packages with the same name but different source RPMs. It might be practically OK to just go with--queryformat="%{source_name},%{name}\n"and exclude by name, though, for real-world cases...not 100% sure.oooh, looks like excluding by NVR does work:
so...I think this may be viable. Hmmmm.
#32 is merged.