Skip to content
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

Clean Python cache in prerm only #6782

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from
Draft

Clean Python cache in prerm only #6782

wants to merge 1 commit into from

Commits on Apr 14, 2023

  1. Clean Python cache in prerm only

    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.
    legoktm committed Apr 14, 2023
    Configuration menu
    Copy the full SHA
    fbcd77b View commit details
    Browse the repository at this point in the history