Mercurial 1.2.1

Paul Boddie paul.boddie at biotek.uio.no
Fri Oct 7 12:23:29 UTC 2011


On 07/10/11 13:18, Tom Anderson wrote:
> On 7 October 2011 12:00, Paul Boddie<paul.boddie at biotek.uio.no>  wrote:
>> On 07/10/11 12:52, Tom Anderson wrote:
>>>
>>> $ rpm -ql python python-libs | xargs du -hsc | tail -1
>>> 73M     total
>>> $ rpm -ql mercurial | xargs du -hsc | tail -1
>>> 11M     total
>>>
>>> That's quite a difference.
>>
>> $ rpm -ql python-libs | xargs du -shc | tail -n 1
>> 1.9M    total
>
> I note you're not including the python package itself there. 1.9M
> seems suspiciously small.

Well, I was just wondering why your libpython was over 70M larger than 
mine. The installed libraries and extensions - apparently included in 
that package in previous RHEL releases - probably shouldn't exceed 30M 
to 40M, looking at what is installed in /usr/lib64/python2.6 and 
excluding site-packages.

Looking at RHEL 5.7 (32-bit), it seems to have been decided that the 
tests should be installed in /usr/lib*/python*/test, so there goes 13M 
or so of your disk straight away. Also, your test seems to double-count 
everything because it also runs du on directories. My shell scripting 
isn't always that great, so the following quick hack might not be the 
best way to get these figures, but on RHEL 5.7...

$ rpm -ql python-libs | xargs -I '{}' sh -c '[ -f {} ] && echo {}' | 
xargs du -shc | tail -n 1
25M     total

On RHEL 6.1, it's still under 2M, but the python package itself weighs 
in at 24M and provides the libraries and extensions.

[...]

> I am unlucky enough to have a remote VM running RHEL 5.5:
>
> $ lsb_release -d
> Description:    Red Hat Enterprise Linux Server release 5.5 (Tikanga)
> $ rpm -ql python | xargs du -hsc | tail -1
> 159M    total
>
> It doesn't have Mercurial, though, and i don't have the permissions
> needed to install it as a package.

No, but my point was that if you can't install a package, you don't need 
that much quota to install software into your home area. Having access 
to some spacious system partition just isn't necessary.

> These numbers seem crazily all over the place. 73M for Python 2.7.1 on
> F15, but 159M for Python 2.4.3 on RHEL 5.5?

They've changed what's in the package. For Debian, I'd just go on over 
to packages.debian.org and browse the file lists, but I don't know where 
you can look this up for the Red Hat distributions. Fortunately, I can 
compare RHEL versions locally.

>> And you can, of course, configure Python to be
>> smaller if necessary.
>
> That sounds like fun.

Sure, support for minimal (and general embedded-friendly) Python 
installations isn't really forthcoming from upstream, but if a few 
megabytes is a deal-breaker, something could probably be done about it. 
In this case, I'd suggest not installing the test cases or deleting them 
afterwards.

> So, to recap, we are comparing:
>
> - Installing Mercurial 1.2.1
>
> To:
>
> - Installing Mercurial 1.9.2
> - Building your own slimmed-down Python 2.6
> - Installing a slimmed-down Python 2.6
>
> The latter option involves considerably more effort. It will also
> require considerably more disk space - slimmed-down or not, that is a
> whole additional Python installation.

Yes, but it's only tens of megabytes for something that you may well end 
up needing anyway - that's the argument. If the concern is that every 
user must do this, then it's time to make the case for deploying the 
software in a central location to whoever it is who decides such things.

> If Frank does not actually need any post-1.2.1 features, it seems a
> bit mad for him to build his own Python just so he can install the
> latest Mercurial.

I don't disagree with this, but I'm just pointing out that if you don't 
really have severe disk constraints, installing Python from source isn't 
a huge undertaking, and you get more forthcoming support from both the 
Mercurial developers and the Python developers.

Paul



More information about the Mercurial mailing list