Need to make PyYAML overridable on Ubuntu, it is a dependency for e.g.
cloud-init, so we cannot remove it.
Depends-On: https://review.opendev.org/703792
Change-Id: I4423dfb2c30299903b52a2bb06d846dd487f5b8b
| ... | ... |
@@ -82,6 +82,14 @@ function fixup_ubuntu {
|
| 82 | 82 |
|
| 83 | 83 |
# Enable universe |
| 84 | 84 |
sudo add-apt-repository -y universe |
| 85 |
+ |
|
| 86 |
+ # Since pip10, pip will refuse to uninstall files from packages |
|
| 87 |
+ # that were created with distutils (rather than more modern |
|
| 88 |
+ # setuptools). This is because it technically doesn't have a |
|
| 89 |
+ # manifest of what to remove. However, in most cases, simply |
|
| 90 |
+ # overwriting works. So this hacks around those packages that |
|
| 91 |
+ # have been dragged in by some other system dependency |
|
| 92 |
+ sudo rm -f /usr/lib/python3/dist-packages/PyYAML-*.egg-info |
|
| 85 | 93 |
} |
| 86 | 94 |
|
| 87 | 95 |
# Python Packages |