Skip to content
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

Merged
merged 1 commit into from
Mar 22, 2024

Conversation

dralley
Copy link
Contributor

@dralley dralley commented Mar 19, 2024

On publications created by mirror_complete sync.

closes #3462

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)
Copy link
Contributor Author

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.

@dralley
Copy link
Contributor Author

dralley commented Mar 20, 2024

Working on a test

@dralley dralley force-pushed the repo-config branch 5 times, most recently from 8245e64 to 670581c Compare March 20, 2024 03:52
@@ -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 = (
Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, works for me

@dralley dralley force-pushed the repo-config branch 5 times, most recently from 43ca85a to c71ee2b Compare March 21, 2024 22:00
On publications created by `mirror_complete` sync.

closes pulp#3462
@dralley dralley merged commit 2f8a477 into pulp:main Mar 22, 2024
16 checks passed
@dralley dralley deleted the repo-config branch March 22, 2024 14:43
Copy link

patchback bot commented Mar 22, 2024

Backport to 3.25: 💚 backport PR created

✅ Backport PR branch: patchback/backports/3.25/2f8a477574389bbfa23972c7f6e93801ffd0197f/pr-3471

Backported as #3474

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

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

Successfully merging this pull request may close these issues.

repo_config gpgcheck value lost ? (mirror_complete option)
3 participants