Skip to content

Preserve marked manual Requires during updates - #3163

Open
jakduch wants to merge 1 commit into
theforeman:rpm/developfrom
jakduch:fix/3126-preserved-requires
Open

jakduch wants to merge 1 commit into
theforeman:rpm/developfrom
jakduch:fix/3126-preserved-requires

Conversation

@jakduch

@jakduch jakduch commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • add an explicit # update-deps: preserve-require marker for manual RPM requirements
  • preserve marked requirements during PyPI dependency rewrites and exclude them from generated dependency diffs
  • reject malformed markers instead of silently applying a lossy update

Testing

  • python -m pytest automation/tests/ -v — 30 passed
  • python -m py_compile automation/update_deps.py automation/dep_diff.py

Fixes #3126

This contribution was prepared with AI assistance and manually reviewed and tested.

@theforeman-bot

Copy link
Copy Markdown
Member

Can one of the admins verify this patch?

@Odilhao

Odilhao commented Sep 28, 2026

Copy link
Copy Markdown
Member

Hi @jakduch thanks the for the PR, in the end we discovered that pulp dropped the need of rhsm and it's now used w/o the need of rhsm python package, but this is a good support to have.

Comment thread automation/dep_diff.py Outdated
@jakduch
jakduch force-pushed the fix/3126-preserved-requires branch 2 times, most recently from 1fbb07b to 05084c6 Compare September 30, 2026 11:46
@jakduch

jakduch commented Sep 30, 2026

Copy link
Copy Markdown
Contributor Author

The RPM job correctly caught that the modified spec kept the old release. I bumped it to 3.118.1-3, added the changelog entry, verified the SRPM version/release locally, and squashed the branch back to one commit. The focused dep-diff tests still pass (6/6).

@jakduch
jakduch force-pushed the fix/3126-preserved-requires branch from 05084c6 to 23ce198 Compare September 30, 2026 13:41
@jakduch
jakduch force-pushed the fix/3126-preserved-requires branch from 23ce198 to f418b18 Compare October 2, 2026 13:55
@jakduch

jakduch commented Oct 2, 2026

Copy link
Copy Markdown
Contributor Author

Thanks. I rebased this onto the current rpm/develop and removed the python-rhsm spec change since Pulpcore no longer needs it. The PR now contains only the generic marker support and its regression tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Preserve explicitly marked manual Requires during dependency updates

3 participants