Skip to content

Commit

Permalink
Merge pull request #1020 from ATIX-AG/suppress_python_apt_warning
Browse files Browse the repository at this point in the history
Suppress the warnings about python3-apt not being installed

(cherry picked from commit 98d8266)
  • Loading branch information
quba42 committed Feb 27, 2024
1 parent 1813185 commit d92c82c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGES/1019.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Suppressed deb822's confusing log warning about python-apt not being installed.
4 changes: 3 additions & 1 deletion pulp_deb/app/tasks/synchronizing.py
Original file line number Diff line number Diff line change
Expand Up @@ -923,7 +923,9 @@ async def _handle_package_index(
# parse package_index
package_futures = []
package_index_artifact = await _get_main_artifact_blocking(package_index)
for package_paragraph in deb822.Packages.iter_paragraphs(package_index_artifact.file):
for package_paragraph in deb822.Packages.iter_paragraphs(
package_index_artifact.file, use_apt_pkg=False
):
# Sanity check the architecture from the package paragraph:
package_paragraph_architecture = package_paragraph["Architecture"]
if release_file.distribution[-1] == "/":
Expand Down
2 changes: 1 addition & 1 deletion pulp_deb/tests/functional/api/test_publish.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ def parse_package_index(pkg_idx):
Returns a dict of the packages by '<Package>-<Version>-<Architecture>'.
"""
packages = {}
for package in deb822.Packages.iter_paragraphs(pkg_idx):
for package in deb822.Packages.iter_paragraphs(pkg_idx, use_apt_pkg=False):
packages[
"-".join([package["Package"], package["Version"], package["Architecture"]])
] = package
Expand Down

0 comments on commit d92c82c

Please sign in to comment.