Skip to content

Commit

Permalink
Add permissive sync setting for less lenient validation of Release files
Browse files Browse the repository at this point in the history
  • Loading branch information
hstct committed Jan 16, 2025
1 parent 2bf6e39 commit 9701e9b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions pulp_deb/app/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
APT_BY_HASH = False
FORBIDDEN_CHECKSUM_WARNINGS = True
FORCE_IGNORE_MISSING_PACKAGE_INDICES = False
PERMISSIVE_SYNC = False
4 changes: 4 additions & 0 deletions pulp_deb/app/tasks/synchronizing.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,8 @@ async def run(self):

if "components" in release_file_dict:
release_file.components = release_file_dict["Components"]
elif "component" in release_file_dict and settings.PERMISSIVE_SYNC:
release_file.components = release_file_dict["Component"]
elif release_file.distribution[-1] == "/":
message = (
"The Release file for distribution '{}' contains no 'Components' "
Expand All @@ -457,6 +459,8 @@ async def run(self):

if "architectures" in release_file_dict:
release_file.architectures = release_file_dict["Architectures"]
if "architecture" in release_file_dict and settings.PERMISSIVE_SYNC:
release_file.architectures = release_file_dict["Architecture"]
elif release_file.distribution[-1] == "/":
message = (
"The Release file for distribution '{}' contains no 'Architectures' "
Expand Down

0 comments on commit 9701e9b

Please sign in to comment.