Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

g.extension.all: Fix reinstall of multi-addons #2082

Merged

Conversation

tmszi
Copy link
Member

@tmszi tmszi commented Jan 12, 2022

Describe the bug
Reinstall multi-addon e.g. wx.metadata (which contains multiple individual modules), doesn't work.

To Reproduce
Steps to reproduce the behavior:

  1. Install wx.metadata addon g.extension wx.metadata
  2. Reinstall all installed addons g.extension.all -f
  3. See error
------------------------------------------------------------
Reinstalling extension <v.info.iso>...
------------------------------------------------------------
WARNING: Extension <v.info.iso> already installed. Re-installing...
Fetching <v.info.iso> from GRASS GIS Addons repository (be patient)...
svn: E170000: URL 'https://github.com/OSGeo/grass-addons/branches/grass8/src/vector/v.info.iso' doesn't exist
ERROR: GRASS Addons <v.info.iso> not found
ERROR: Unable to process extension:v.info.iso
------------------------------------------------------------
Reinstalling extension <t.info.iso>...
------------------------------------------------------------
WARNING: Extension <t.info.iso> already installed. Re-installing...
Fetching <t.info.iso> from GRASS GIS Addons repository (be patient)...
svn: E170000: URL 'https://github.com/OSGeo/grass-addons/branches/grass8/src/temporal/t.info.iso' doesn't exist
ERROR: GRASS Addons <t.info.iso> not found
ERROR: Unable to process extension:t.info.iso
------------------------------------------------------------
Reinstalling extension <r.info.iso>...
------------------------------------------------------------
WARNING: Extension <r.info.iso> already installed. Re-installing...
Fetching <r.info.iso> from GRASS GIS Addons repository (be patient)...
svn: E170000: URL 'https://github.com/OSGeo/grass-addons/branches/grass8/src/raster/r.info.iso' doesn't exist
ERROR: GRASS Addons <r.info.iso> not found
ERROR: Unable to process extension:r.info.iso
------------------------------------------------------------
Reinstalling extension <m.csw.update>...
------------------------------------------------------------
WARNING: Extension <m.csw.update> already installed. Re-installing...
Fetching <m.csw.update> from GRASS GIS Addons repository (be patient)...
svn: E170000: URL 'https://github.com/OSGeo/grass-addons/branches/grass8/src/misc/m.csw.update' doesn't exist
ERROR: GRASS Addons <m.csw.update> not found
ERROR: Unable to process extension:m.csw.update
------------------------------------------------------------
Reinstalling extension <g.gui.metadata>...
------------------------------------------------------------
WARNING: Extension <g.gui.metadata> already installed. Re-installing...
Fetching <g.gui.metadata> from GRASS GIS Addons repository (be patient)...
svn: E170000: URL 'https://github.com/OSGeo/grass-addons/branches/grass8/src/general/g.gui.metadata' doesn't exist
ERROR: GRASS Addons <g.gui.metadata> not found
ERROR: Unable to process extension:g.gui.metadata
------------------------------------------------------------
Reinstalling extension <g.gui.cswbrowser>...
------------------------------------------------------------
WARNING: Extension <g.gui.cswbrowser> already installed. Re-installing...
Fetching <g.gui.cswbrowser> from GRASS GIS Addons repository (be
patient)...
svn: E170000: URL 'https://github.com/OSGeo/grass-addons/branches/grass8/src/general/g.gui.cswbrowser' doesn't exist
ERROR: GRASS Addons <g.gui.cswbrowser> not found
ERROR: Unable to process extension:g.gui.cswbrowser
------------------------------------------------------------
Reinstalling extension <db.csw.run>...
------------------------------------------------------------
WARNING: Extension <db.csw.run> already installed. Re-installing...
Fetching <db.csw.run> from GRASS GIS Addons repository (be patient)...
svn: E170000: URL 'https://github.com/OSGeo/grass-addons/branches/grass8/src/db/db.csw.run' doesn't exist
ERROR: GRASS Addons <db.csw.run> not found
ERROR: Unable to process extension:db.csw.run
------------------------------------------------------------
Reinstalling extension <db.csw.harvest>...
------------------------------------------------------------
WARNING: Extension <db.csw.harvest> already installed. Re-installing...
Fetching <db.csw.harvest> from GRASS GIS Addons repository (be patient)...
svn: E170000: URL 'https://github.com/OSGeo/grass-addons/branches/grass8/src/db/db.csw.harvest' doesn't exist
ERROR: GRASS Addons <db.csw.harvest> not found
ERROR: Unable to process extension:db.csw.harvest
------------------------------------------------------------
Reinstalling extension <db.csw.admin>...
------------------------------------------------------------
WARNING: Extension <db.csw.admin> already installed. Re-installing...
Fetching <db.csw.admin> from GRASS GIS Addons repository (be patient)...
svn: E170000: URL 'https://github.com/OSGeo/grass-addons/branches/grass8/src/db/db.csw.admin' doesn't exist
ERROR: GRASS Addons <db.csw.admin> not found
ERROR: Unable to process extension:db.csw.admin

Expected behavior
Reinstall multi-addon e.g. wx.metadata (which contains multiple individual modules), should be work.

System description:

  • GRASS GIS version main, realeasebranch_8_0, releasebranch_7_8

Additional context
Affected is reinstallation of the multi-addons (which contains multiple individual modules) e.g. wx.metadata, r.connectivity etc.

@tmszi tmszi added bug Something isn't working backport_needed labels Jan 12, 2022
@tmszi tmszi added this to the 8.0.0 milestone Jan 12, 2022
@tmszi tmszi requested a review from neteler January 12, 2022 09:58
@tmszi tmszi changed the title scripts/g.extension.all: fix reinstall complex type addons scripts/g.extension.all: fix reinstall multi-addons Jan 12, 2022
@neteler
Copy link
Member

neteler commented Jan 12, 2022

There is still an (unrelated) glitch in the OSGeo4W CI:

Run .github/workflows/test_simple.bat 'C:\OSGeo4W\opt\grass\grass80.bat'
'C:\OSGeo4W\opt\grass\grass80.bat' is not recognized as an internal or external command,

D:\a\grass\grass>set grass=C:\OSGeo4W\opt\grass\grass80.bat 
operable program or batch file.

'C:\OSGeo4W\opt\grass\grass80.bat' is not recognized as an internal or external command,
D:\a\grass\grass>rem Test execution of binary command 
operable program or batch file.

'C:\OSGeo4W\opt\grass\grass80.bat' is not recognized as an internal or external command,
D:\a\grass\grass>call C:\OSGeo4W\opt\grass\grass80.bat --tmp-location EPSG:4326 --exec g.region res=0.1 -p 
operable program or batch file.

I wonder (since it worked elsewhere; after merge of #2074 yesterday) if this PR simply needs a rebase?

When reinstalled addon is complex type addon e.g. wx.metadata which have
multiple modules e.g. g.gui.cswbrowser and etc. for every single
module is return wx.metadata addon name to avoid install individual
modules which isn't possible and causes an error.

For finding correct addon name is using modules.xml file, which
have to exists on the osgeo server for download.
@tmszi tmszi force-pushed the g_extension_all-fix-reinstallation-of-complex-addons branch from 6b2ecb5 to 2b38397 Compare January 12, 2022 17:10
@tmszi
Copy link
Member Author

tmszi commented Jan 12, 2022

Rebase 2b38397.

Copy link
Contributor

@veroandreo veroandreo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some minor suggestions in messages

scripts/g.extension.all/g.extension.all.py Outdated Show resolved Hide resolved
scripts/g.extension.all/g.extension.all.py Outdated Show resolved Hide resolved
@tmszi
Copy link
Member Author

tmszi commented Jan 12, 2022

There is still an (unrelated) glitch in the OSGeo4W CI:

Run .github/workflows/test_simple.bat 'C:\OSGeo4W\opt\grass\grass80.bat'
'C:\OSGeo4W\opt\grass\grass80.bat' is not recognized as an internal or external command,

D:\a\grass\grass>set grass=C:\OSGeo4W\opt\grass\grass80.bat 
operable program or batch file.

'C:\OSGeo4W\opt\grass\grass80.bat' is not recognized as an internal or external command,
D:\a\grass\grass>rem Test execution of binary command 
operable program or batch file.

'C:\OSGeo4W\opt\grass\grass80.bat' is not recognized as an internal or external command,
D:\a\grass\grass>call C:\OSGeo4W\opt\grass\grass80.bat --tmp-location EPSG:4326 --exec g.region res=0.1 -p 
operable program or batch file.

I wonder (since it worked elsewhere; after merge of #2074 yesterday) if this PR simply needs a rebase?

This commit 029cd8e has led to a change C:\OSGeo4W\opt\grass\grass80.bat -> C:\OSGeo4W\opt\grass\grass81.bat.

Seems this line and this line need change.

@neteler
Copy link
Member

neteler commented Jan 13, 2022

I have tested it with the freshly compiled G81, g.extension.all -f runs (on Linux).

An (unrelated?) slighlty confusing message occurs with the multi-addons:

GRASS nc_spm_08_grass7/user1:grass_main > g.extension.all -f

...
Fetching <i.sentinel> from GRASS GIS Addons repository (be patient)...
Compiling...
Installing...
Updating extensions metadata file...
Updating extension modules metadata file...
WARNING: No metadata available for module 'i.sentinel': Unable to fetch
         interface description for command '<i.sentinel>'.

         Details: <[Errno 2] No such file or directory: 'i.sentinel'>
Installation of <i.sentinel> successfully finished
...

But perhaps that's for a separate PR.

@tmszi
Copy link
Member Author

tmszi commented Jan 13, 2022

I have tested it with the freshly compiled G81, g.extension.all -f runs (on Linux).

An (unrelated?) slighlty confusing message occurs with the multi-addons:

GRASS nc_spm_08_grass7/user1:grass_main > g.extension.all -f

...
Fetching <i.sentinel> from GRASS GIS Addons repository (be patient)...
Compiling...
Installing...
Updating extensions metadata file...
Updating extension modules metadata file...
WARNING: No metadata available for module 'i.sentinel': Unable to fetch
         interface description for command '<i.sentinel>'.

         Details: <[Errno 2] No such file or directory: 'i.sentinel'>
Installation of <i.sentinel> successfully finished
...

But perhaps that's for a separate PR.

It is just a warning message not bug in this case (I will try to explain below, which is justified there) and it is not related to this PR.

Multi-addons e.g. i.sentinel contains multiple individual addons. Every individual addons i.sentinel.coverage, i.sentinel.download,
i.sentinel.import, i.sentinel.mask, i.sentinel.parallel.download, i.sentinel.preproc has source Python/C file (module in GRASS GIS terminology) and metadata is returned via this function in g.extension module.

But root addon directory i.sentinel doesn't have Python/C source file (module), contain only root addon manual html page, which is installed and therefore users will see this warning message.

@tmszi tmszi merged commit cf067d2 into OSGeo:main Jan 14, 2022
tmszi added a commit to tmszi/grass that referenced this pull request Jan 14, 2022
When reinstalled addon is multi-addon e.g. wx.metadata which contains
multiple individual addons e.g. g.gui.cswbrowser and etc. for every single
addons is returned wx.metadata multi-addon name, to avoid install individual
addons which isn't possible and causes an error.

For finding correct muli-addon name is using modules.xml file, which
have to exists on the osgeo server for download.
tmszi added a commit to tmszi/grass that referenced this pull request Jan 14, 2022
When reinstalled addon is multi-addon e.g. wx.metadata which contains
multiple individual addons e.g. g.gui.cswbrowser and etc. for every single
addons is returned wx.metadata multi-addon name, to avoid install individual
addons which isn't possible and causes an error.

For finding correct muli-addon name is using modules.xml file, which
have to exists on the osgeo server for download.
@tmszi tmszi deleted the g_extension_all-fix-reinstallation-of-complex-addons branch January 14, 2022 07:47
@wenzeslaus wenzeslaus changed the title scripts/g.extension.all: fix reinstall multi-addons g.extension.all: Fix reinstall of multi-addons Apr 27, 2022
ninsbl pushed a commit to ninsbl/grass that referenced this pull request Oct 26, 2022
When reinstalled addon is multi-addon e.g. wx.metadata which contains
multiple individual addons e.g. g.gui.cswbrowser and etc. for every single
addons is returned wx.metadata multi-addon name, to avoid install individual
addons which isn't possible and causes an error.

For finding correct muli-addon name is using modules.xml file, which
have to exists on the osgeo server for download.
ninsbl pushed a commit to ninsbl/grass that referenced this pull request Feb 17, 2023
When reinstalled addon is multi-addon e.g. wx.metadata which contains
multiple individual addons e.g. g.gui.cswbrowser and etc. for every single
addons is returned wx.metadata multi-addon name, to avoid install individual
addons which isn't possible and causes an error.

For finding correct muli-addon name is using modules.xml file, which
have to exists on the osgeo server for download.
neteler pushed a commit to nilason/grass that referenced this pull request Nov 7, 2023
When reinstalled addon is multi-addon e.g. wx.metadata which contains
multiple individual addons e.g. g.gui.cswbrowser and etc. for every single
addons is returned wx.metadata multi-addon name, to avoid install individual
addons which isn't possible and causes an error.

For finding correct muli-addon name is using modules.xml file, which
have to exists on the osgeo server for download.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants