-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed an issue where the value of gpgcheck wasn't set appropriately #3471
Conversation
publication.package_checksum_type = CHECKSUM_TYPES.UNKNOWN | ||
publication.metadata_checksum_type = CHECKSUM_TYPES.UNKNOWN | ||
publication.repo_config = {"repo_gpgcheck": has_repomd_signature, "gpgcheck": gpgcheck} | ||
|
||
for path, repo_version in repo_sync_results.items(): | ||
add_metadata_to_publication(publication, repo_version, prefix=path) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also think we were re-setting these values over and over again for repositories with .treeinfo, and the end result values might have ended up being incorrect as a result. We want to consider the parent repo only.
Working on a test |
8245e64
to
670581c
Compare
@@ -577,6 +571,15 @@ def is_subrepo(directory): | |||
with RpmPublication.create( | |||
repo_sync_results[PRIMARY_REPO], pass_through=False | |||
) as publication: | |||
gpgcheck = repository.repo_config.get("gpgcheck", 0) | |||
has_repomd_signature = ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if instead of looking at .asc file we should be fetching the repo_gpgcheck from repository.repo_config?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about: if it's enabled and the .asc exists then we enable it, if either is false then we disable it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, works for me
43ca85a
to
c71ee2b
Compare
On publications created by `mirror_complete` sync. closes pulp#3462
Backport to 3.25: 💚 backport PR created✅ Backport PR branch: Backported as #3474 🤖 @patchback |
On publications created by
mirror_complete
sync.closes #3462