Skip to content

Commit

Permalink
Add comments/context to explain why and how python-distro was patched…
Browse files Browse the repository at this point in the history
… on s16/18 (#590)

python3-distro was broken until the 1.6 release.
See python-distro/distro#260
  • Loading branch information
yphus authored and diohe0311 committed Jul 18, 2023
1 parent c5e1c64 commit 14155ec
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions checkbox-core-snap/series16/snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,12 @@ parts:
- PYTHONPATH: $SNAPCRAFT_PART_INSTALL/usr/lib/python3/dist-packages:$PYTHONPATH
override-stage: |
snapcraftctl stage
# The oneliner below was required in 2019 to fix an upstream bug:
# https://github.com/python-distro/distro/issues/260
# This patch was meant to catch and ignore subprocess.CalledProcessError
# when running lsb_release on ubuntu core
# The fix was finally released with the distro 1.6 release available as of
# 22.04 (i.e base: core22)
sed -i 's|except OSError: # Command not found|except subprocess.CalledProcessError: # Command not found|g' lib/python3.*/site-packages/distro.py
build-packages:
- libbluetooth-dev
Expand Down
6 changes: 6 additions & 0 deletions checkbox-core-snap/series18/snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,12 @@ parts:
after: [acpi-tools]
override-stage: |
snapcraftctl stage
# The oneliner below was required in 2019 to fix an upstream bug:
# https://github.com/python-distro/distro/issues/260
# This patch was meant to catch and ignore subprocess.CalledProcessError
# when running lsb_release on ubuntu core
# The fix was finally released with the distro 1.6 release available as of
# 22.04 (i.e base: core22)
sed -i 's|except OSError: # Command not found|except subprocess.CalledProcessError: # Command not found|g' lib/python3.*/site-packages/distro/distro.py
################################################################################
checkbox-ng:
Expand Down

0 comments on commit 14155ec

Please sign in to comment.