Article View: linux.debian.bugs.dist
Article #5149Bug#1154507: mercurial: autopkgtest runs against the unbuilt source tree instead of the installed package
From: Nadzeya Hutsko
Date: Thu, 19 Nov 2026 21:10
Date: Thu, 19 Nov 2026 21:10
77 lines
4435 bytes
4435 bytes
Source: mercurial
Version: 7.2.4-2
Severity: important
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Dear Maintainer,
Since 7.2.4-2 the autopkgtest uses pybuild-autopkgtest. debian/pybuild.testfiles
copies the hgext/ and mercurial/ source directories into the test directory, and
the tests run with PYTHONPATH pointing at that directory. As a result, both
run-tests.py and /usr/bin/hg import the copied, unbuilt mercurial source instead
of the installed package from /usr/lib/python3/dist-packages.
That copy has no C extensions and no compiled translation catalogs, so hg falls
back to the pure-Python modules and runs untranslated. For example, from
test-install.t:
```
cannot import name 'base85' from 'mercurial.cext'
(/tmp/autopkgtest.XXXXXX/autopkgtest_tmp/build/mercurial/cext/__init__.py)
17 tests fail on amd64:
Missing .mo translations:
test-gendoc.t, test-gendoc-de.t, test-gendoc-ja.t, test-gendoc-ro.t,
test-i18n.t, test-log.t, test-commit-interactive.t, test-extension.t
Missing C extensions (pure-Python fallback):
test-hashutil.py, test-install.t, test-parseindex.t,
test-persistent-nodemap.t, test-persistent-nodemap-stream-clone.t
(stream-v2, stream-v3), test-revlog-mmapindex.t, test-annotate.t,
test-fastannotate-hg.t
# Ran 1002 tests, 72 skipped, 17 failed.
```
The same suite passes during the build (980 tests, 0 failed with both python3.14
and python3.15), because there PYTHONPATH points at the built tree.
This matches the current debci status for mercurial (failing in unstable and
testing)
You can consider stop copying the mercurial and hgext source trees, so the
tests exercise the installed package:
```
- --- a/debian/pybuild.testfiles
+++ b/debian/pybuild.testfiles
@@ -3,6 +3,4 @@
contrib
i18n
doc
- -hgext
- -mercurial
mercurial/thirdparty/cbor mercurial/thirdparty/
```
Regards,
Nadzeya
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEEuVOE/FJ0HcdfWSw//lAdKwFeZPsFAmr/Y2EACgkQ/lAdKwFe
ZPsO1w//T1cUWVZ5FF662yJz1J9HoGBC83bEH7XLVV1Nn9rgje/PChWTU+YbARrU
9ex0oyqknQ3TLQVwFLWJ4iF1lrzDpO/N7DyGVNTN9SQ3bDWZO282LNYK4uEp/7BP
ewUOsBPTJ03yqKcTvMSJnsN0ZddbVVYr0xOHYfpNVfN/xz9fXD2BqxVfu4MA9/GX
l73y0+riOF/VCur248HuEvfKqw7frRksAsbufZ/Saa8fw8ZN+cyIVCtJO9pKZqf7
FfryfXysFqJD3RUFtP6EA9DK6ZrO1Ylkm6qYM/r1BbYjcrOIm1Pv6MFnr3n4PAGa
DD7nTkDkb7f0YxrpJulLG2O7bCibTKHOyu49bgsNpCvvsVLw7iruoGfvW1Yx1At8
A5NQjET0PB+vKmF9L6I3gwthVfRjTfL4aSSLJ0mFCMCmPLlxbwLQeNrzF3ycA8OJ
iJsg2PF+1D8PVlIzDAwdfGGLD4GRqt5SSBR+Q7mY+fFZEEw+QetqJSW/FnrlNrgb
w5yY/XyPUY49FfwqVWjtk6Qmyls0x+poSLYgx7d1fISxvg7y84ShcjqpECJ/21xM
PFduYfjTmuch/oFPnA974d1645UlEt0OQWGFLN74acwAIC/25s0XQWByHNFCzU23
Qvnn3l3aQmDOMB2DYuWkFYtUV+XLqez2dd8MzM/YMKZ5Y3Ny4xQ=
=kBGp
-----END PGP SIGNATURE-----
Technical Details
Message-ID:
<O1hyi-cXvg-21@gated-at.bofh.it>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!news-lon.pugleaf.net!news-fra.pugleaf.net!news.tcpreset.net!newsfeed.bofh.team!weretis.net!feeder8.news.weretis.net!3.eu.feeder.erje.net!feeder.erje.net!news.samoylyk.net!gothmog.csi.it!news.servidellagleba.it!bofh.it!news.nic.it!robomodShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!news-lon.pugleaf.net!news-fra.pugleaf.net!news.tcpreset.net!newsfeed.bofh.team!weretis.net!feeder8.news.weretis.net!3.eu.feeder.erje.net!feeder.erje.net!news.samoylyk.net!gothmog.csi.it!news.servidellagleba.it!bofh.it!news.nic.it!robomod From: Nadzeya Hutsko <nadzeya@debian.org> Newsgroups: linux.debian.bugs.dist Subject: Bug#1154507: mercurial: autopkgtest runs against the unbuilt source tree instead of the installed package Date: Thu, 19 Nov 2026 22:10:02 +0100 Message-ID: <O1hyi-cXvg-21@gated-at.bofh.it> X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org Thu Nov 19 21:03:08 2026 Old-Return-Path: <debbugs@buxtehude.debian.org> X-Spam-Flag: NO X-Spam-Score: -1.9 Reply-To: Nadzeya Hutsko <nadzeya@debian.org>, 1154507@bugs.debian.org Resent-To: debian-bugs-dist@lists.debian.org Resent-Cc: team+python@tracker.debian.org X-Debian-Pr-Message: report 1154507 X-Debian-Pr-Package: src:mercurial X-Debian-Pr-Source: mercurial Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Mailer: reportbug 13.2.0 X-Debian-Message: from BTS X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/2003620 List-ID: <debian-bugs-dist.lists.debian.org> List-URL: <https://lists.debian.org/debian-bugs-dist/> Approved: robomod@news.nic.it Lines: 77 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Date: Thu, 19 Nov 2026 22:00:18 +0100 X-Original-Message-ID: <179512201817.716332.12455715630199144370.reportbug@debian>