[Distutils] PEP 376 -- new round

Ron Adam rrr at ronadam.com
Fri Feb 5 14:37:20 CET 2010



Tarek Ziadé wrote:
> 2010/2/5 P.J. Eby <pje at telecommunity.com>:
>> At 01:55 AM 2/5/2010 +0100, Tarek Ziadé wrote:
>>> I think it's still useful, because it points the root packages that
>>> can be removed
>>> safely without breaking the system -- even if leaving orphaned packages
>>> behind.
>>>
>>> Any opinion ?
>> I think it's a good idea to have a way to tell what packages were *not*
>> installed to satisfy dependencies.
>>
>> Merely plotting the dependency graph doesn't tell you this, because you
>> could have a non-root orphan - i.e., something that was installed to fill a
>> dependency, but the depender(s) have now vanished.
>>
>> I guess what I'm saying is, a thing that is not needed by anything else
>> could either be an orphan (due to other uninstalls) *or* a root (manually
>> chosen for install), and there is no way to tell them apart just by
>> following the graph.
> 
> I am wondering *when* the depender(s) may vanish like that, leaving
> behind them orphaned dependencies.
> 
> I guess this can happen when:
> 
> 1/ a package (*looks like we can't help it calling a distribution a
> package after all...*) is removed by another
>    tool that it was installed with.
> 
> 2/ something goes wrong during uninstallation
> 
> So I wonder : will 1/ really happen that often ? and shouldn't 2/ be
> taken care by the high-level uninstaller ?

If eggs were limited to installing their files in one location things would 
be much simpler.

Because files from eggs can be installed in multiple directories, and some 
of those are in arbitrary locations, I am wandering if it might be better 
to use a logging approach as files get installed.

An uninstall tool could then walk though the log to build a dependency 
table.  Or maybe break that into two tools, one that builds a dependency 
table, then another to uninstall files by reading the table.

Regards,
    Ron




















More information about the Distutils-SIG mailing list