classification
Title: packaging: add tests for old versions cleanup on update
Type: behavior Stage: test needed
Components: Distutils2 Versions: Python 3.3, 3rd party
process
Status: open Resolution:
Dependencies: 14270 Superseder:
Assigned To: eric.araujo Nosy List: alexis, eric.araujo, illume, tarek, thomas.holmes
Priority: normal Keywords: easy

Created on 2009-02-21 22:43 by illume, last changed 2012-05-16 18:04 by eric.araujo.

Messages (4)
msg82586 - (view) Author: Rene Dudfield (illume) Date: 2009-02-21 22:43
A common problem is removing old files from the installed location.

eg.
version 1 installs.
site-packages/packagename/bla.so

version 2 installs.
site-packages/packagename/_bla.so
site-packages/packagename/bla.py


However, in version 2 if we install over the top of version 1, distutils
does not remove bla.so.  Which causes the package to break because
bla.so will be used instead of bla.py
 

distutils should be able to be given a list of old files to make sure
are removed from the package.

It should work with the various installers... msi, dmg etc, as well as
when using setup.py install.

I've seen this cause breakage with numerous packages.  The solution is
to hack some old file detection into each package, or tell users 'delete
the old install first'.  Neither of which is really nice.

Specifying an old_files meta data should be able to help.
msg82588 - (view) Author: Tarek Ziadé (tarek) * (Python committer) Date: 2009-02-21 22:52
A uninstall command, based on the record of installed files, will be
proposed for #4673.

It should adress your problem, since we will be able to add a new option
in the install command.

I am leaving this issue open so we can keep track of this need.
msg139774 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-07-04 14:36
I’m renaming this to make the status clearer: it’s about adding tests.
msg160903 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2012-05-16 18:04
Jonathan Fernandes started to work on this at the last Montreal sprint.  The tests would use install_local_project, which is missing a parameter to control the destination directory (see #14270).
History
Date User Action Args
2012-05-16 18:04:51eric.araujosetassignee: tarek -> eric.araujo
dependencies: + Can't install a project in a specific directory
messages: + msg160903
versions: + 3rd party
2011-07-06 00:04:19thomas.holmessetnosy: + thomas.holmes
2011-07-04 14:36:47eric.araujosettype: enhancement -> behavior
title: distutils removing old files, deleting unneeded old files from installed location. -> packaging: add tests for old versions cleanup on update

keywords: + easy
nosy: + alexis
versions: + Python 3.3, - 3rd party
messages: + msg139774
stage: test needed
2011-07-04 14:35:14eric.araujounlinkissue4673 dependencies
2010-10-22 14:55:51eric.araujolinkissue4673 dependencies
2010-10-22 14:55:38eric.araujosetnosy: + eric.araujo

components: + Distutils2, - Distutils
versions: + 3rd party, - Python 3.2
2010-08-09 03:22:41terry.reedysetversions: + Python 3.2, - Python 3.1, Python 2.7
2009-02-21 22:52:18tareksetmessages: + msg82588
versions: + Python 3.1, Python 2.7
2009-02-21 22:43:49illumecreate