Skip to content

g.extension: Skip official repo query when installing from other sources - #7746

Merged
petrasovaa merged 1 commit into
OSGeo:mainfrom
petrasovaa:fix-g.extension-multi
Jul 17, 2026
Merged

petrasovaa merged 1 commit into
OSGeo:mainfrom
petrasovaa:fix-g.extension-multi

Conversation

@petrasovaa

Copy link
Copy Markdown
Contributor

Without internet, multi-addons can't get installed locally:

g.extension ext=i.hyper url=~/dev/grass/grass-addons/src/imagery/i.hyper
Compiling...
Installing...
Updating extensions metadata file...
Updating extension modules metadata file...
ERROR: Failed to get branch from the Git repository
       <https://github.com/OSGeo/grass-addons/>.
       fatal: unable to access 'https://github.com/OSGeo/grass-addons/':
       Could not resolve host: github.com

The post-install metadata update queries the official grass-addons repository to identify multi-addon entries that only install an overview HTML page. That information is only meaningful (and only available) for installs from the official repository.

This passes the already-resolved source type down to both functions and skips the query unless the source is the official repository or a fork of it, mirroring the condition main() already uses before downloading. Installing a multi-addon (e.g. i.hyper) from a local directory now succeeds offline; its overview-page entry is reported by the existing "No metadata available" warning instead of being filtered out. Official-repo installs are unchanged.

Updating metadata after install consulted the official grass-addons
repository (git ls-remote and a clone) to identify multi-addon
overview pages, even when installing from a local directory, so
installs failed without internet access.
@petrasovaa petrasovaa added the bug Something isn't working label Jul 17, 2026
@petrasovaa
petrasovaa enabled auto-merge (squash) July 17, 2026 12:05
@github-actions github-actions Bot added Python Related code is in Python module general labels Jul 17, 2026
@petrasovaa
petrasovaa merged commit 740266b into OSGeo:main Jul 17, 2026
26 checks passed
@github-actions github-actions Bot added this to the 8.6.0 milestone Jul 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working general module Python Related code is in Python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants