Skip to content

Commit

Permalink
Merge pull request #985 from daviddavis/fix984
Browse files Browse the repository at this point in the history
Fix APT_BY_HASH setting
  • Loading branch information
quba42 authored Jan 2, 2024
2 parents bb3a6f7 + 98393c0 commit dd67d7e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
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

0 comments on commit dd67d7e

Please sign in to comment.