[Distutils] Finding dependencies and Limiting download

Ian Bicking ianb at colorstudy.com
Fri Mar 17 17:21:58 CET 2006

Juha Tuomala wrote:
> On Thursday 16 March 2006 22:37, Ian Bicking wrote:
>>Another solution is at the package level -- RPMs can overwrite each 
>>other's files, if they are spec'd out to do that somehow.  
> Yes, you could do that in the %post section where post installation
> script can be put. It's executed as root so it can do rm -rf / 
> if needed.
>>This is not  
>>very clean -- I don't know which if any package is allowed to ultimately 
>>delete that file.  
> All packages are installed as root. So any package could do that. 
> There where the trust comes into picture. I trust fedoraproject.org
> as my OS supplier and they digitally sign every package, so it's unlikely
> that any package would behave badly in my system.

Well, the question is which should.  E.g., if you install PasteScript, 
then Paste, then remove PasteScript, PasteScript should leave 
paste/__init__.py since Paste also needs it.  In practice, I tend to 
notice files like this are just left around by packagers.  I don't think 
that would be appropriate at all in this situation, though (it would 
mean there would still be an importable "paste" even though there'd be 
nothing in it).

> I think that there is something wrong in the installation if 
> it overwrites each other's files during the process.

This is why Eggs have their namespace package support, but it relies on 
the packages being installed in separate hierarchies even though they 
share the same package space.  If Phillip can fix that, then great, we 
should all be happy ;)  Yet another option would be to make Paste a 
requirement for PasteDeploy and PasteScript, and rely on Paste 
installing paste/__init__.py

Namespace packages *are* rather annoying, I'll admit.  If I knew when I 
first wrote them how I wanted paste.* factored into three packages, I 
probably wouldn't have used a namespace package.  The only real reason I 
see for it is legacy package names, or when you really really like 
hierarchy (and I don't).

The issue with installing as an egg is that either you have to have 
postinstall scripts handle easy-install.pth (or rpm-install.pth or 
something), or you have to handle the fact that no egg will be installed 
by default.  But otherwise you can just install an egg instead of using 
--single-version... -- and I don't know if there's really a reason not 
to do that at this time.

Ian Bicking  /  ianb at colorstudy.com  /  http://blog.ianbicking.org

More information about the Distutils-SIG mailing list