OSGeo / grass

GRASS GIS - free and open-source geospatial processing engine
https://grass.osgeo.org
Other
852 stars 309 forks source link

g.extension failing in GRASS 7.8.5 #1798

Closed micha-silver closed 3 years ago

micha-silver commented 3 years ago

Describe the bug Running g.extension to add an add-on fails with:

micha@RMS:~$ g.extension v.surf.tps
Fetching <v.surf.tps> from GRASS GIS Addons repository (be patient)...
svn: E170000: URL 'https://github.com/OSGeo/grass-addons/trunk/grass7/vector/v.surf.tps' doesn't exist
ERROR: GRASS Addons <v.surf.tps> not found
micha@RMS:~$ g.version
GRASS 7.8.5 (2020)

See also: https://gis.stackexchange.com/questions/408345/installing-grass-extension-modules-on-macos-and-linux

To Reproduce Steps to reproduce the behavior:

  1. g.extension -l works as expected
  2. g.extension fails

Expected behavior Download addon script from the correct github path.

System description (please complete the following information):

Additional context Currently in the g.extension python script, the function: def resolve_source_code(url=None, name=None, branch=None): defaults to the git path grass-addons/trunk/:

   if not url and name:
        module_class = get_module_class_name(name)
        # note: 'trunk' is required to make URL usable for 'svn export' call
        git_url = 'https://github.com/OSGeo/grass-addons/trunk/' \
                   'grass{version}/{module_class}/{module_name}' \
                   .format(version=version[0],
                           module_class=module_class, module_name=name)
        # trac_url = 'https://trac.osgeo.org/grass/browser/grass-addons/' \
        #            'grass{version}/{module_class}/{module_name}?format=zip' \
        #            .format(version=version[0],
        #                    module_class=module_class, module_name=name)
        # return 'official', trac_url
        return 'official', git_url

Perhaps this is the cause of the error?

ninsbl commented 3 years ago

See: https://grass.osgeo.org/news/2021_08_01_g_extension_currently_not_working/

And: https://github.com/OSGeo/grass/pull/1762

The issue is addressed and updated binaries are hopefully available soon (the RC needs to be aprooved to be final).

micha-silver commented 3 years ago

Thanks!

metzm commented 3 years ago

That means users who installed GRASS through their distro's package manager have to wait until an updated version is available with their distro's package manager? Until then (can take a while) they are not able to install GRASS addons via g.extension any more? This can't be true, there must be a mechanism to support installation of GRASS addons at least with the latest minor version of GRASS (7.8.x)?!?

veroandreo commented 3 years ago

That means users who installed GRASS through their distro's package manager have to wait until an updated version is available with their distro's package manager? Until then (can take a while) they are not able to install GRASS addons via g.extension any more?

Well, to some, there's the option of downloading the zip file and installing that. Not sure though if this works for all addons and all OSs. But, basically yes.

We have now GRASS 7.8.6 RC2 available for testing but I'm not sure if RCs reach distro's package managers. We cannot create binaries for windows because osgeo4w changed from version 1 to 2. @ninsbl is tirelessly working on setting that up (#1683). For mac users, @cmbarton already uploaded the packages here: http://grassmac.wikidot.com/downloads

NikosAlexandris commented 3 years ago

I just recompiled GRASS GIS

→ g.version -r
GRASS 7.8.5dev (2020)
libgis revision: 744fcaefa
libgis date: 2020-10-16T16:00:53+00:00

Shouldn't this be enough to get a working g.extension as stated in https://grass.osgeo.org/news/2021_08_01_g_extension_currently_not_working/? However,

→ g.extension r.regression.series
Fetching <r.regression.series> from GRASS GIS Addons repository (be
patient)...
svn: E170000: URL 'https://github.com/OSGeo/grass-addons/trunk/grass7/raster/r.regression.series' doesn't exist
ERROR: GRASS Addons <r.regression.series> not found
veroandreo commented 3 years ago

The fix is already merged and backported to release branch 78 as mentioned here https://github.com/OSGeo/grass/issues/1798#issuecomment-899461754

Would you please try grass 7.8.6 RC 2 and report back? AFAIU you are using 7.8.5 and it does not work there

NikosAlexandris commented 3 years ago

7.8.6 RC 2

It won't compile without errors here. I need to go through my configurations... A simple configuration/compilation might not work here for me as I am on my workstation setup that needs custom configurations.

veroandreo commented 3 years ago

The fix to g.extension was applied, backported and g.extension works in releasebranch, can we close this one?

HuidaeCho commented 3 years ago

there must be a mechanism to support installation of GRASS addons at least with the latest minor version of GRASS (7.8.x)?!?

Totally agreed, but it can be tricky to support custom/distro installations because of DLL dependencies... I do have my own compiled binaries and cannot install addons :-(.

landam commented 3 years ago

With 7.8.6 release the issue is solved. Feel free to re-open if needed.