Page MenuHomeSoftware Heritage

Unstuck swh.loader.mercurial debian build
Closed, MigratedEdits Locked

Event Timeline

ardumont triaged this task as Normal priority.Feb 3 2021, 5:02 PM
ardumont created this task.

I took a stab at it but i came up moot so far. So i'm opening this to not forget about it.

I took a stab at it but i came up moot so far.

Well, tbf, the build failed on multiple errors which got fixed.
Up until that one.


Anyway, the status is the current stable build fails due to import mercurial.ui [1]

apt-file search says, it belongs to:

$ apt-file search mercurial/ui
mercurial-common: /usr/lib/python2.7/dist-packages/mercurial/ui.py

(Note that unstable build was fine without mercurial-common, so it's only for stable that this is needed).

So, half-convinced, I tried to add that dependency to unstuck the build but it failed nonetheless.

Failing stable build has [2]:

16:50:27  Get: 113 http://deb.debian.org/debian buster/main amd64 mercurial-common all 4.8.2-1+deb10u1 [2523 kB]

Successful build has [3]:

16:49:08  Get:84 http://deb.debian.org/debian unstable/main amd64 mercurial-common all 5.6.1-2 [2725 kB]

Not that I'm really convinced it will help anyway as it's a python2.7 namespace...

[1]

16:50:53   ERROR collecting .pybuild/cpython3_3.7_swh.loader.mercurial/build/swh/loader/mercurial/tests/test_from_disk.py
16:50:53  ImportError while importing test module '/<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_swh.loader.mercurial/build/swh/loader/mercurial/tests/test_from_disk.py'.
16:50:53  Hint: make sure your test modules/packages have valid Python names.
16:50:53  Traceback:
16:50:53  swh/loader/mercurial/tests/test_from_disk.py:21: in <module>
16:50:53      from ..from_disk import HgDirectory, HgLoaderFromDisk
16:50:53  swh/loader/mercurial/from_disk.py:35: in <module>
16:50:53      from . import hgutil
16:50:53  swh/loader/mercurial/hgutil.py:7: in <module>
16:50:53      import mercurial.ui  # type: ignore
16:50:53  E   ModuleNotFoundError: No module named 'mercurial'
16:50:53   ERROR collecting .pybuild/cpython3_3.7_swh.loader.mercurial/build/swh/loader/mercurial/tests/test_hgutil.py
16:50:53  ImportError while importing test module '/<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_swh.loader.mercurial/build/swh/loader/mercurial/tests/test_hgutil.py'.
16:50:53  Hint: make sure your test modules/packages have valid Python names.
16:50:53  Traceback:
16:50:53  swh/loader/mercurial/tests/test_hgutil.py:10: in <module>
16:50:53      from mercurial import hg  # type: ignore
16:50:53  E   ModuleNotFoundError: No module named 'mercurial'

[2] https://jenkins.softwareheritage.org/job/debian/job/packages/job/DLDHG/job/gbp-buildpackage/52/console

[3] https://jenkins.softwareheritage.org/job/debian/job/packages/job/DLDHG/job/gbp-buildpackage/51/consoleFull

It seems new code recently introduced in the loader now directly uses the mercurial internal Python modules.

Debian buster packages mercurial 4.8.2 which does not offer Python 3 support.

I guess the only way to fix the build will be to backport mercurial bullseye package to buster.

I guess the only way to fix the build will be to backport mercurial bullseye package to buster.

yes, thanks. That was my conclusion as well (which i forgot to mention here ¯\_(ツ)_/¯)

But i'm not that fluent in what actual backport actions mean. So i need to document
myself on that.

Note: I have something like "dget" the package and try to upload that in our debian
repository but i'm not sure (also that ^ in the optimal case where nothing else in this
package deps needs backporting...)

Status: package mercurial needed to be backported for buster-swh [1]
Done pairing with olasd (as tutor ;) and vsellier.

[1]

ardumont@pergamon:/srv/softwareheritage/repository% reprepro ls mercurial
mercurial | 5.6.1-2~bpo10~swh+1 | buster-swh | amd64, source
ardumont changed the task status from Open to Work in Progress.Feb 15 2021, 4:17 PM
ardumont moved this task from Weekly backlog to in-progress on the System administration board.
ardumont claimed this task.
ardumont moved this task from deployed/landed/monitoring to done on the System administration board.