Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 284237 - dev-util/gtk-doc-1.11 gtkdoc-mkhtml does not work with /usr/local/bin at the beginning of PATH
Summary: dev-util/gtk-doc-1.11 gtkdoc-mkhtml does not work with /usr/local/bin at the ...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-09 07:59 UTC by Dirk Gouders
Modified: 2009-09-09 18:46 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Gouders 2009-09-09 07:59:29 UTC
gtkdoc-mkhtml does not work if /usr/local/bin appears before /usr/bin in PATH.
The reason are these lines of code in /usr/bin/gtkdoc-mkhtml:

     32 # FIXME: this is a hack to detect uninstalled
     33 if test "x$0" = "x/usr/bin/gtkdoc-mkhtml" ; then
     34       #echo "installed"
     35       # the first two are needed to resolve datadir
     36       prefix=/usr
     37       datarootdir=${prefix}/share
     38       gtkdocdir=/usr/share/gtk-doc/data
     39 else
     40       #echo "uninstalled"
     41       gtkdocdir=`dirname $0`
     42 fi

Because, changing /etc/profile did not help, the only fix solution for me
was to change line 33 in /usr/bin/gtkdoc-mkhtml to read:

     33 if test "x$0" = "x/usr/local/bin/gtkdoc-mkhtml" ; then


Reproducible: Always

Steps to Reproduce:
1.If not already true position /usr/local/bin at the beginning of PATH in /etc/profile.
2. Try to emerge for example bluez with "doc" USE flag switched on.
3.

Actual Results:  
The ebuild fails.
Comment 1 Gilles Dartiguelongue (RETIRED) gentoo-dev 2009-09-09 08:27:57 UTC
works just fine here with this PATH:
PATH=/usr/lib/ccache/bin:/usr/lib/distcc:/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/4.4.1:/usr/games/bin:/home/eva/devel/bin

it's not clear what's your problem here.
Comment 2 Dirk Gouders 2009-09-09 09:02:21 UTC
Now, I tested it on another machine where it also works fine.

Probably, there is a symbolic link /usr/local/bin -> /usr/bin on the machine
where the problem occurs.  I have to verify that later when I am back home.
Comment 3 Romain Perier (RETIRED) gentoo-dev 2009-09-09 12:42:38 UTC
(In reply to comment #1)
> it's not clear what's your problem here.
> 

@Dirk: Can you be more clear about your problem please, it sounds like confusing...
Comment 4 Dirk Gouders 2009-09-09 16:35:47 UTC
OK, on one of my machines there exists a symbolic link /usr/local/bin -> /usr/bin.
If now, /usr/local/bin appears before /usr/bin in PATH and gtkdoc-mkhtml is
invoked it gets invoked as /usr/local/bin/gtkdoc-mkhtml.

In that case, the quoted code extract causes the variable `gtkdocdir' to be set to
/usr/local/bin (instead of /usr/share/gtk-doc/data) and
gtkdoc-mkhtml fails, because the stylesheet gtk-doc.xsl which is located in /usr/share/gtk-doc/data/ cannot be found.

So, the reported problem appears only on machines that have a symbolic link
/usr/local/bin -> /usr/bin.

@Romain: Please let me know if this explanation is still confusing.
Comment 5 Romain Perier (RETIRED) gentoo-dev 2009-09-09 17:05:13 UTC
(In reply to comment #4)
> OK, on one of my machines there exists a symbolic link /usr/local/bin ->
> /usr/bin.
> If now, /usr/local/bin appears before /usr/bin in PATH and gtkdoc-mkhtml is
> invoked it gets invoked as /usr/local/bin/gtkdoc-mkhtml.
> 
> In that case, the quoted code extract causes the variable `gtkdocdir' to be set
> to
> /usr/local/bin (instead of /usr/share/gtk-doc/data) and
> gtkdoc-mkhtml fails, because the stylesheet gtk-doc.xsl which is located in
> /usr/share/gtk-doc/data/ cannot be found.
> 
> So, the reported problem appears only on machines that have a symbolic link
> /usr/local/bin -> /usr/bin.
> 
> @Romain: Please let me know if this explanation is still confusing.
> 

it's absolutely clear now.

what's the purpose to create a symlink /usr/local/bin -> /usr/bin ?
it's could be very dangerous in case where you install a package from a tarball (assuming this package isn't in the main tree or for example your own personnal project), because it's the same thing than to install into /usr/bin directly.. which is very unrecommended, see some gentoo specs about that (mainly to avoid conflicts with existing binaries in /usr/bin already installed by portage, and so on)
Comment 6 Gilles Dartiguelongue (RETIRED) gentoo-dev 2009-09-09 18:46:18 UTC
this kind of setup is just not supported. If you can reproduce this issue with /usr/local/bin being a regular folder, please reopen this bug.