On Sat, Aug 20, 2016 at 11:07 PM, Nick Coghlan <ncogh...@gmail.com> wrote:
> On 21 August 2016 at 05:46, Jim Fulton <j...@jimfulton.info> wrote: > > On Sat, Aug 20, 2016 at 3:02 PM, Nick Coghlan <ncogh...@gmail.com> > wrote: > >> > I have the impression that uninstalling things can be > >> > problematic, but maybe that's been fixed. > >> > >> Uninstallation is fine, as we *do* have a full file manifest after a > >> component has been installed. > > > > So, if package A and B install the same file, X, and then A is > uninstalled, > > is X still there? If then B is uninstalled, does X go away? Does this > > machinery depend on whether X has the the same contents in A and B? > > If A and B install to the same path, B will overwrite A's version, and > if either is uninstalled, they'll delete whichever version is > currently there. Since "the same path" in this case usually refers to > either a script or a Python module, the unhandled conflict is really > at install time - we'd want something closer to the RPM/deb style "A > file already exists at that destination, so we're not installing the > requested package at all", rather than a Windows-style reference > counting system. > > As Daniel notes, this kind of check is actually already possible when > installing from a wheel file today, it just requires someone with the > roundtuits to add it to pip (perhaps via a new vendorable package for > working with Python installation metadata and detecting conflicts > between what's already installed and a wheel being considered for > installation). > The most common source of conflicts, I expect, are namespace package __init__.py files. You wouldn't want to reject installing a package with a conflicting __init__.py file in a namespace package. I realize that PEP420 and the demise of Python 2 should make this case go away, someday, although PEP420 doesn't prohibit __init__.py files in namespace packages. OK, I'm done beating this horse. It was dead a while ago. :) Jim -- Jim Fulton http://jimfulton.info
_______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org https://mail.python.org/mailman/listinfo/distutils-sig