[GRASS-dev] [GRASS GIS] #1721: Man pages not created for addons

#1721: Man pages not created for addons
-------------------------+--------------------------------------------------
Reporter: micha | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.3
Component: Addons | Version: 6.4.2
Keywords: | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------
When compiling some extensions, the man pages were not created, even
though the extension binary was compiled successfully. It seems the
problem is in the Makefile: $GISBASE/include/Make/Man.make. The full path
to the g.html2man program is not defined correctly.

This patch fixes the issue:

{{{
diff -u Man.make.orig Man.make
--- Man.make.orig 2012-09-04 09:17:04.754169001 +0300
+++ Man.make 2012-09-04 09:17:22.748137256 +0300
@@ -2,7 +2,7 @@
  SECT = 1
  MANDIR = $(ARCH_DISTDIR)/man/man$(SECT)
  HTMLDIR = $(ARCH_DISTDIR)/docs/html
-HTML2MAN = GRASS_PERL=${PERL} VERSION_NUMBER=${GRASS_VERSION_NUMBER} sh
$(MODULE_TOPDIR)/tools/g.html2man
+HTML2MAN = GRASS_PERL=${PERL} VERSION_NUMBER=${GRASS_VERSION_NUMBER} sh
$(MODULE_TOPDIR)/tools/g.html2man/g.html2man

  # generic man rules for all commands
}}}

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1721&gt;
GRASS GIS <http://grass.osgeo.org>

#1721: Man pages not created for addons
---------------------------------+------------------------------------------
Reporter: micha | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.3
Component: Addons | Version: 6.4.2
Keywords: install, g.html2man | Platform: Unspecified
      Cpu: Unspecified |
---------------------------------+------------------------------------------
Changes (by hamish):

  * keywords: => install, g.html2man

Comment:

Hi,

I'm pretty sure this is invalid -- you need to run `make distclean` and/or
remove your previous version of GRASS before installing the new one over
the top of it.

the script used to be installed into tools/g.html2man/g.html2man, but is
now just installed as tools/g.html2man. If the old directory still exists
the install fails. I thought we'd added a check for that and removed the
directory if present, but maybe not.

Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1721#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#1721: Man pages not created for addons
---------------------------------+------------------------------------------
Reporter: micha | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.3
Component: Addons | Version: 6.4.2
Keywords: install, g.html2man | Platform: Unspecified
      Cpu: Unspecified |
---------------------------------+------------------------------------------

Comment(by micha):

MarkusN mentioned differently on the maillist:
[http://osgeo-org.1560.n6.nabble.com/r-stream-order-export-to-shapefile-
td4998297.html#a4999535]

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1721#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>

#1721: Man pages not created for addons
---------------------------------+------------------------------------------
Reporter: micha | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.3
Component: Addons | Version: 6.4.2
Keywords: install, g.html2man | Platform: Unspecified
      Cpu: Unspecified |
---------------------------------+------------------------------------------

Comment(by hamish):

How did you install GRASS? how are you running g.extension? (from the gui
or command line?) Was your GRASS install built from source or packaged?

when built and run from the grass source dir (ie uninstalled),
MODULE_TOPDIR should be the top dir in the source tree, and the g.html2man
script is in tools/g.html2man/, and it looks for it there.

when installed with 'make install', the Man.make file is modified to point
to $GISBASE/tools/ instead, since there is no source tree remaining. The
Debian/ubuntu packages don't fully use 'make install', so handle that
themselves in the package-building script.
If other install methods are not using 'make install', they'll have to be
adjusted to replicate what 'make install' does.

It should all work out of the box for the last 10 months. Please clean out
earlier installs and source trees and try afresh.

Looking at the code and installed results on a few machines here,
everything looks in order to me. The patch you suggest is already taken
care of on lines 145-146 of the 6.4.svn Makefile.

Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1721#comment:3&gt;
GRASS GIS <http://grass.osgeo.org>

#1721: Man pages not created for addons
---------------------------------+------------------------------------------
Reporter: micha | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.3
Component: Addons | Version: 6.4.2
Keywords: install, g.html2man | Platform: Unspecified
      Cpu: Unspecified |
---------------------------------+------------------------------------------

Comment(by hamish):

> The patch you suggest is already taken care of on lines
> 145-146 of the 6.4.svn Makefile.

or rather, you're unapplying that patch, since (I suspect) you installed
over an old copy which had a directory where it wants to put the script
now. You need to clean away the old version before installing the new
one.

Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1721#comment:4&gt;
GRASS GIS <http://grass.osgeo.org>

#1721: Man pages not created for addons
--------------------------+-------------------------------------------------
  Reporter: micha | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 6.4.3
Component: Addons | Version: 6.4.2
Resolution: fixed | Keywords: install, g.html2man
  Platform: Unspecified | Cpu: Unspecified
--------------------------+-------------------------------------------------
Changes (by micha):

  * status: new => closed
  * resolution: => fixed

Comment:

I see what my problem was. I (mis)read the instructions from
[http://grass.osgeo.org/wiki/Compile_and_Install#Addons] . I understood
that MODULE_TOPDIR should refer to the top of the grass installation. Now,
from you comments, I see it needs to be the directory where source is
located. When I changed the procedure to:
{{{
make MODULE_TOPDIR=~/Downloads/grass-6.4.2/
sudo make MODULE_TOPDIR=~/Downloads/grass-6.4.2/ install
}}}
it worked fine.

Maybe the compile and install wiki page should explicitly mention
"/path/to/unpacked/grass/source"?

Sorry for the noise, and thanks for the help.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1721#comment:5&gt;
GRASS GIS <http://grass.osgeo.org>

#1721: Man pages not created for addons
--------------------------+-------------------------------------------------
  Reporter: micha | Owner: grass-dev@…
      Type: defect | Status: reopened
  Priority: normal | Milestone: 6.4.3
Component: Addons | Version: 6.4.2
Resolution: | Keywords: install, g.html2man
  Platform: Unspecified | Cpu: Unspecified
--------------------------+-------------------------------------------------
Changes (by martinl):

  * status: closed => reopened
  * resolution: fixed =>

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1721#comment:6&gt;
GRASS GIS <http://grass.osgeo.org>

#1721: Man pages not created for addons
--------------------------+-------------------------------------------------
  Reporter: micha | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 6.4.3
Component: Addons | Version: 6.4.2
Resolution: invalid | Keywords: install, g.html2man
  Platform: Unspecified | Cpu: Unspecified
--------------------------+-------------------------------------------------
Changes (by martinl):

  * status: reopened => closed
  * resolution: => invalid

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1721#comment:7&gt;
GRASS GIS <http://grass.osgeo.org>