FS#44140 - [python-html2text] Name conflict: /usr/bin/html2text from both python-html2text & gcc-libs version

Attached to Project: Community Packages
Opened by David C. Rankin (drankinatty) - Wednesday, 11 March 2015, 05:17 GMT
Last edited by Jaroslav Lichtblau (Dragonlord) - Sunday, 15 March 2015, 17:13 GMT
Task Type Feature Request
Category Packages
Status Closed
Assigned To Jaroslav Lichtblau (Dragonlord)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

Moving a project from my laptop (openSuSE) to my servers (Arch), the project broke because /usr/bin/html2text on Arch failed to behave like the standard html2text found in most distibutions. Investigation disclosed Arch packages python-html2text as /usr/bin/html2text, while openSuSE (and most distros) package the gcc-libs version of html2text as /usr/bin/html2text. see: https://aur.archlinux.org/packages/html2text-with-utf8

The gcc-libs version has been standard on Linux distibutions for many years. See: http://www.mbayer.de/html2text/

The gcc-libs version is a bit more robust and comes with a man page. The python version has several shortcomings, one big one is that you cannot control the word wrap (--body-width) and prevent double line-breaks after block elements. e.g. (--single-line-break requires --body-width=0).

In order to deal with this direct naming conflict of the executable, the executable from python-html2text should be renamed. In fact, after posting to the list Troy Engel, did a quick survery and found that in addition to openSuSE, Fedora, RHEL/Centos, Ubuntu and Debian alread rename the python-html2text executable in order to avoid the conflict.

My initial thought was that the python executable should be renamed (html2text -> pyhtml2text). However, while it is standard among distros to rename the python executable, what to rename it to. The name varies in other distributions from from python-html2text to html2markdown.py2 according to T.E.'s quick survey.

For my purposes, the html2text -> pyhtml2text, change works well and limits typing compared to some of the alternatives. A quick patch to the current Arch PKGBUILD I used was:

$ diff -uNb --label PKGBUILD PKGBUILD.orig PKGBUILD
--- PKGBUILD
+++ PKGBUILD 2015-03-10 09:25:43.906168003 -0500
@@ -11,8 +11,8 @@
url="https://pypi.python.org/pypi/html2text/"
license=('GPL3')
depends=('python-setuptools')
-provides=('html2text')
-replaces=('html2text')
+provides=('pyhtml2text')
+replaces=('pyhtml2text')

source=(https://pypi.python.org/packages/source/h/html2text/html2text-$pkgver.tar.gz)
sha256sums=('c3977dfe6fd1ba0d4091f85963306488b3e9e236cfe60d8821158ce5a7fcb619')

@@ -29,5 +29,6 @@
package() {
cd "${srcdir}"/html2text-${pkgver}
python setup.py install --root="${pkgdir}"
+ mv "${pkgdir}"/usr/bin/html2text "${pkgdir}"/usr/bin/pyhtml2text
}

The bottom line was it was quite trouble to find an html2text on Arch that did not behave like the html2text provide by most other distributions. If the devs are inclined to fix this direct executable name conflict, decide among yourselves what the new name should be. Whatever it is, it will be much better than a direct conflict.
This task depends upon

Closed by  Jaroslav Lichtblau (Dragonlord)
Sunday, 15 March 2015, 17:13 GMT
Reason for closing:  Won't implement
Comment by Doug Newgard (Scimmia) - Wednesday, 11 March 2015, 07:11 GMT
when you have to patch something downstream for basic things like UTF-8 or building on 64-bit systems, it's a bad sign. There's nothing specifically wrong with dead software, but once it begins to bitrot and nobody take up maintainership, it's often time to move on.
Comment by Jaroslav Lichtblau (Dragonlord) - Sunday, 15 March 2015, 17:13 GMT
I'm sorry, I won't be providing this change.

Loading...