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

[PR #985/dd67d7e6 backport][3.1] Fix APT_BY_HASH setting #987

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES/984.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed a bug where enabling the ``APT_BY_HASH`` setting did not enable the feature.
6 changes: 2 additions & 4 deletions pulp_deb/app/tasks/publishing.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@
CHECKSUM_TYPE_MAP,
)

from pulp_deb.app.settings import APT_BY_HASH

import logging
from gettext import gettext as _

Expand Down Expand Up @@ -356,7 +354,7 @@ def finish(self):
gz_package_index.save()

# Generating metadata files using checksum
if APT_BY_HASH:
if settings.APT_BY_HASH:
for path, index in (
(package_index_path, package_index),
(gz_package_index_path, gz_package_index),
Expand Down Expand Up @@ -425,7 +423,7 @@ def __init__(
self.release["Components"] = "" # Will be set later
if release.description != NULL_VALUE:
self.release["Description"] = release.description
self.release["Acquire-By-Hash"] = "yes" if APT_BY_HASH else "no"
self.release["Acquire-By-Hash"] = "yes" if settings.APT_BY_HASH else "no"

for checksum_type, deb_field in CHECKSUM_TYPE_MAP.items():
if checksum_type in settings.ALLOWED_CONTENT_CHECKSUMS:
Expand Down