-
Notifications
You must be signed in to change notification settings - Fork 686
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Empty dependency __pycache__
folders left behind on upgrade
#6743
Comments
__pycache__
left behind on upgrades__pycache__
folders left behind on upgrade
To clarify, there is no actual problem caused by this, it's just messy and an unintentional consequence of having the postinst generate the |
Looking at what dh-python does, we need a prerm script that runs py3clean; see https://salsa.debian.org/python-team/tools/dh-python/-/blob/master/autoscripts/prerm-py3clean So the flow ends up being:
|
We are currently cleaning the Python cache in the postinst and postrm, but that still leaves us with warnings from apt that non-empty `__pycache__` directories couldn't be deleted. This mimics what dh-python does, which is to run py3compile in the postinst (already doing) and run py3clean in the prerm. During a fresh install, only the postinst is triggered to compile the cache. During an upgrade, first the prerm runs, removing the cache, then the new version is unpacked, then postinst goes, recreating the cache. Fixes #6743.
[Backlog pruning, 5/15] Removing this from 2.6.0, it's not important enough. |
Description
When upgrading from 2.5.1 to 2.6.0~rc1 (current develop), dpkg emits warnings that it can't remove the passlib directories because of the
__pycache__
directories.Steps to Reproduce
make build-debs
on developExpected Behavior
No dpkg warnings;
/opt/venvs/securedrop-app-code/lib/python3.8/site-packages/passlib/
is deletedActual Behavior
Comments
All of the code is correctly removed, it's just the empty folders left behind...
The text was updated successfully, but these errors were encountered: