Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 318963 - dev-java/dbus-java-2.7-r1 uses the deprecated htlatex command
Summary: dev-java/dbus-java-2.7-r1 uses the deprecated htlatex command
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Highest normal (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 316143
  Show dependency tree
 
Reported: 2010-05-08 12:12 UTC by Andreas Schürch
Modified: 2010-05-10 06:00 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
dbus-java-htlatex.patch (dbus-java-htlatex.patch,668 bytes, patch)
2010-05-08 14:27 UTC, Pacho Ramos
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Schürch gentoo-dev 2010-05-08 12:12:36 UTC
dev-java/dbus-java-2.7-r1 depends on dev-tex/tex4ht, where in newer versions the htlatex command isn't avaiable anymore. The newer tex4ht is needed for gnome-2.28...


(cd doc/dbus-java; TEX4HTENV=/etc/tex4ht/tex4ht.env htlatex ../../dbus-java.tex
"xhtml,2" "" "-cvalidate")
/bin/sh: htlatex: command not found                                             
make: *** [doc/dbus-java/index.html] Error 127
Comment 1 Pacho Ramos gentoo-dev 2010-05-08 14:27:07 UTC
Created attachment 230801 [details, diff]
dbus-java-htlatex.patch

Please check if attached file works for you

Good luck!
Comment 2 Pacho Ramos gentoo-dev 2010-05-08 14:44:42 UTC
(In reply to comment #1)
> Created an attachment (id=230801) [details]
> dbus-java-htlatex.patch
> 
> Please check if attached file works for you
> 
> Good luck!
> 

Works fine for me, I plan to commit this if nobody (jave team neither reporter) replies tomorrow since it's important to solve this soon due Gnome 2.28 stabilization

Thanks
Comment 3 Petteri Räty (RETIRED) gentoo-dev 2010-05-08 16:44:09 UTC
(In reply to comment #2)
> 
> Works fine for me, I plan to commit this if nobody (jave team neither reporter)
> replies tomorrow since it's important to solve this soon due Gnome 2.28
> stabilization
> 

ok (haven't tested or looked into the issue myself)
Comment 4 Pacho Ramos gentoo-dev 2010-05-09 09:55:23 UTC
Fixed finally in the following way without a bump, if you disagree, please let me know (for learning more), thanks:

 java_prepare() {
 	epatch "${FILESDIR}/${PN}-2.5.1-jarfixes.patch"
+
+	# dev-tex/tex4ht changed htlatex path, see bug #318963
+	if use doc; then
+		if has_version ">=dev-tex/tex4ht-20090611_p1038-r1" ; then
+			sed -i -e 's:htlatex:/usr/share/texmf/tex/generic/tex4ht/htlatex:' Makefile || die
+		fi
+	fi
 }

1. I apply the change only when "doc" USE flag is set since htlatex will only be used in that situation. With USE="-doc", it's possible that even tex4ht is not installed at all and, then, there is no need to run that sed command.
2. I use "has_version way" instead of revision bumping it requiring latest tex4ht to prevent a new stabilization pass and, also, because it's only a buildtime failure that doesn't affect to runtime.
3. I change it with "sed" instead of applying the patch since I don't think it will go to upstream ever (since our htlatex provided by tex4ht doesn't seem to be the general way for suppling it as seen in different distributions). This is also a more future proof since, maybe, Makefile could be modified a bit by upstream in newer versions and, then, the patch could stop applying.
Comment 5 Petteri Räty (RETIRED) gentoo-dev 2010-05-09 10:46:21 UTC
(In reply to comment #4)
> 3. I change it with "sed" instead of applying the patch since I don't think it
> will go to upstream ever (since our htlatex provided by tex4ht doesn't seem to
> be the general way for suppling it as seen in different distributions). This is
> also a more future proof since, maybe, Makefile could be modified a bit by
> upstream in newer versions and, then, the patch could stop applying.
> 

In general sed is not more future proof because it can also stop doing the necessary changes without any notice.
Comment 6 Pacho Ramos gentoo-dev 2010-05-09 11:04:15 UTC
Umm, yeah, it's also true :-|, maybe I should use patch instead, or better leave this as is?

I should have read http://www.mail-archive.com/gentoo-dev@lists.gentoo.org/msg25756.html before :-S
Comment 7 Alexis Ballier gentoo-dev 2010-05-09 14:01:29 UTC
(In reply to comment #4)
>         epatch "${FILESDIR}/${PN}-2.5.1-jarfixes.patch"
> +
> +       # dev-tex/tex4ht changed htlatex path, see bug #318963
> +       if use doc; then
> +               if has_version ">=dev-tex/tex4ht-20090611_p1038-r1" ; then
> +                       sed -i -e
> 's:htlatex:/usr/share/texmf/tex/generic/tex4ht/htlatex:' Makefile || die
> +               fi
> +       fi
>  }

you shouldnt hardcode the path or it'll fail the same way when it'll change again; the standard way, as described in tex4ht's postinst message, is to use 'mk4ht htlatex'; this works with any version of tex4ht so you dont need the has_version conditional

that htlatex was in PATH was a mistake that we've been carrying over for years.
Comment 8 Pacho Ramos gentoo-dev 2010-05-09 14:41:03 UTC
OK, just fixed (and now using patch instead of "sed")
Comment 9 Andreas Schürch gentoo-dev 2010-05-10 06:00:19 UTC
Thanks, it works great! :-)