Source: asciidoc
Version: 10.0.1-1
Severity: grave
Justification: Causes builds of packages using asciidoc to build documentation 
to fail
Tags: patch
X-Debbugs-Cc: su...@debian.org

/usr/bin/asciidoc and /usr/bin/a2x rely on python distribution info to
locate the entry point. These files are deleted by d/rules, however, so
the CLI tools are unable to run:

$ asciidoc
Traceback (most recent call last):
  File "/usr/bin/asciidoc", line 33, in <module>
    sys.exit(load_entry_point('asciidoc==10.0.1', 'console_scripts', 
'asciidoc')())
  File "/usr/bin/asciidoc", line 22, in importlib_load_entry_point
    for entry_point in distribution(dist_name).entry_points
  File "/usr/lib/python3.9/importlib/metadata.py", line 524, in distribution
    return Distribution.from_name(distribution_name)
  File "/usr/lib/python3.9/importlib/metadata.py", line 187, in from_name
    raise PackageNotFoundError(name)
importlib.metadata.PackageNotFoundError: asciidoc

I did a local rebuild with the attached patch applied which resulted in
a working asciidoc CLI tool.

Given the package-contains-python-dot-directory lintian tag it results
in, I am unsure if that's the correct fix as I'm no python expert.

-- 
ceterum censeo microsoftem esse delendam.
diff -Nru asciidoc-10.0.1/debian/rules asciidoc-10.0.1/debian/rules
--- asciidoc-10.0.1/debian/rules	2021-10-29 16:29:00.000000000 +0000
+++ asciidoc-10.0.1/debian/rules	2021-10-30 13:00:52.000000000 +0000
@@ -11,7 +11,6 @@
 	mv debian/asciidoc-tests/usr/bin/testasciidoc.py debian/asciidoc-tests/usr/bin/testasciidoc
 	find debian -type d -name __pycache__ -prune -exec rm -rf {} \;
 	rm -rf debian/asciidoc-base/usr/lib/python*/dist-packages/asciidoc/resources
-	rm -rf debian/asciidoc-base/usr/lib/python*/dist-packages/asciidoc-*.egg-info
 	rm -rf debian/asciidoc-common/etc/asciidoc/dblatex
 	rm -rf debian/asciidoc-common/etc/asciidoc/icons
 	rm -rf debian/asciidoc-common/etc/asciidoc/javascripts

Attachment: pgphiarRo67Bt.pgp
Description: OpenPGP digital signature

Reply via email to