FS#17350 - [mercurial] wrongly packaged

Attached to Project: Arch Linux
Opened by Frederic Bezies (fredbezies) - Wednesday, 02 December 2009, 17:43 GMT
Last edited by Giovanni Scafora (giovanni) - Thursday, 11 February 2010, 23:14 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Giovanni Scafora (giovanni)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Description: As I follow trunk source code for mozilla software, I have to use mercurial.

Today, version 1.4.1-1 appeared, and when I tried to update my current source code, I got this error message :

abort: couldn't find mercurial libraries in [/usr/bin /usr/lib/python26.zip /usr/lib/python2.6 /usr/lib/python2.6/plat-linux2 /usr/lib/python2.6/lib-tk /usr/lib/python2.6/lib-old /usr/lib/python2.6/lib-dynload /usr/lib/python2.6/site-packages /usr/lib/python2.6/site-packages/PIL /usr/lib/python2.6/site-packages/gst-0.10 /usr/lib/python2.6/site-packages/gtk-2.0]
(check your install and PYTHONPATH)

Previous version was working without problem.

Downgrading to version 1.4-2 is the only answer.

Additional info:
pacman -Qi mercurial
Nom : mercurial
Version : 1.4.1-1
URL : http://www.selenic.com/mercurial
Licences : GPL
Groupes : --
Fournit : --
Dépend de : python>=2.6
Dépendances opt. : tk: for the hgk GUI
Requis par : --
Est en conflit avec : --
Remplace : --
Taille (installé) : 5557,00 K
Paqueteur : Giovanni Scafora <giovanni@archlinux.org>
Architecture : x86_64
Compilé le : jeu. 03 déc. 2009 01:26:57 CET
Installé le : mer. 02 déc. 2009 18:35:35 CET
Motif d'installation : Explicitement installé
Script d'installation : Non
Description : A scalable distributed SCM tool

Steps to reproduce:

Just upgrade mercurial and see... Looks like there is some missing libraries...
This task depends upon

Closed by  Giovanni Scafora (giovanni)
Thursday, 11 February 2010, 23:14 GMT
Reason for closing:  Not a bug
Comment by Ismael Carnales (void) - Wednesday, 02 December 2009, 18:02 GMT
I confirm the same happening, I think is related to this line in the PKGBUILD ;)

rm -rf ${pkgdir}/usr/lib/python2.6/site-packages/mercurial/*.py

Removing that line fixes the PKGBUILD
Comment by Braden Pellett (braden) - Wednesday, 02 December 2009, 18:45 GMT
I can confirm that the above change results in a successful installation
Comment by Giovanni Scafora (giovanni) - Wednesday, 02 December 2009, 18:59 GMT
Removed that line in mercurial-1.4.1-2
Please, let me know if now it is OK.
Comment by Thomas Dahms (thomasd) - Wednesday, 02 December 2009, 19:32 GMT
Did not try 1.4.1-2 yet, but you should also remove that other line:

rm -rf ${pkgdir}/usr/lib/python2.6/site-packages/mercurial/*.py

which removes the byte-compiled *.pyc files. It will work with *.py files only, but is faster with the byte-compiled ones.
Comment by Thomas Dahms (thomasd) - Wednesday, 02 December 2009, 19:33 GMT
Sorry, I meant

rm -rf ${pkgdir}/usr/lib/python2.6/site-packages/mercurial/*.pyc
Comment by Giovanni Scafora (giovanni) - Wednesday, 02 December 2009, 19:55 GMT
If mercurial-1.4.1-2 works fine without the byte-compiled *.pyc files, I just leave it as is.
Comment by Thomas Dahms (thomasd) - Wednesday, 02 December 2009, 20:05 GMT
But you should fix it for the next release. There is no point in removing the pyc files.
Comment by Giovanni Scafora (giovanni) - Wednesday, 02 December 2009, 20:57 GMT
Fixed in mercurial-1.4.1-3
Can I close this bug report?
Comment by Evangelos Foutras (foutrelis) - Wednesday, 02 December 2009, 21:05 GMT
No. :P

Optimized versions (.pyo) of the compiled python modules should be created as well, for tracking purposes (according to [1], [2]).

The two `python setup.py' lines can be replaced by the single line in [1]. If they will be kept separate, I think the --optimize=1 option goes to the second line (which does the installation).

Cheers.

----
[1] http://wiki.archlinux.org/index.php/Python_Package_Guidelines
[2] http://wiki.archlinux.org/index.php/User:Allan/Python_Packaging_Policy
Comment by Evangelos Foutras (foutrelis) - Wednesday, 02 December 2009, 21:17 GMT
Actually, if building isn't done in a separate step, locale files are installed under /usr/lib/python2.6/site-packages/mercurial/locale (and seem to work). O.o
Comment by Ismael Carnales (void) - Wednesday, 02 December 2009, 21:20 GMT
The package work as spected, this can be closed now.
Comment by Giovanni Scafora (giovanni) - Wednesday, 02 December 2009, 21:21 GMT
Done!
Fixed in mercurial-1.4.1-4
Now, can I close this bug report?
Comment by Evangelos Foutras (foutrelis) - Wednesday, 02 December 2009, 21:22 GMT
1.4.1-4 looks good to me. :)
Comment by Giovanni Scafora (giovanni) - Wednesday, 02 December 2009, 21:26 GMT
hgk GUI works to you?
Or do you use hg view?
Yet I cannot find a solution for hgk.
Comment by Ismael Carnales (void) - Wednesday, 02 December 2009, 21:34 GMT
I use hg view as hgk trows this error (was the same in old versions):

Error in startup script: no such variable
(read trace on "env(HG)")
invoked from within
"exec $env(HG) debug-config"
(procedure "getconfig" line 4)
invoked from within
"getconfig"
invoked from within
"array set config [getconfig]"
(file "/usr/bin/hgk" line 3994)

Comment by Giovanni Scafora (giovanni) - Wednesday, 02 December 2009, 21:37 GMT
Yes, I know...but I cannot solve it yet.
Do you have any solution?
Comment by Ismael Carnales (void) - Wednesday, 02 December 2009, 21:47 GMT
Was testing a little, and I suceeded in making it work. It seems like hgk looks for the environment variable HG to be set to the hg bin so exporting HG=/usr/bin/hg does the trick :)
Comment by Giovanni Scafora (giovanni) - Wednesday, 02 December 2009, 22:09 GMT
Thank you, it works fine here.
I close this bug report.
Comment by Ramana Kumar (xrchz) - Tuesday, 09 February 2010, 10:53 GMT
  • Field changed: Percent Complete (100% → 0%)
The latest mercurial package (1.4.3-1) doesn't export the environment variable HG, so hgk doesn't work by default. Shouldn't the export be done by some /etc/profile.d/mercurial.sh ?
Comment by Ramana Kumar (xrchz) - Tuesday, 09 February 2010, 11:16 GMT
I should also add that even when I manually export the HG environment variable, hgk still fails, because it tries to run "exec $env(HG) debug-config", but debug-config isn't one of the recognized commands by hg. (Maybe a missing extension?)
Comment by Ramana Kumar (xrchz) - Thursday, 11 February 2010, 11:21 GMT
The debug-config issue still prevents hgk from working, so this bug is still not fully resolved. Thank you for exporting the HG environment variable.
Comment by Giovanni Scafora (giovanni) - Thursday, 11 February 2010, 11:30 GMT
hgk works great for me.
Can you provide a solution?
If not, I close again this bug report.
Comment by Ramana Kumar (xrchz) - Thursday, 11 February 2010, 12:26 GMT
The solution is to add hgext.hgk = to your ~/.hgrc file. That is probably the user's responsibility, but the error message if you don't do it is completely uninformative. Maybe the package could mention it when it says the optional dependency on tk? Otherwise I guess people will just have to refer to this bug report (also gentoo and arch forums have the solution after some googling)
Comment by Giovanni Scafora (giovanni) - Thursday, 11 February 2010, 23:14 GMT
I will do that for the next release.

Loading...