Skip to content

Conversation

@SorYoshino
Copy link
Contributor

@SorYoshino SorYoshino commented Jan 11, 2026

Summary

Refactors the opera-gx manifest to improve installation reliability and enhance the version detection logic.

Related issues or pull requests

Changes

  • Improve installer script:
    • Replace implicit extraction with Expand-7zipArchive for better control.
  • Improve checkver script:
    • Improve the scraper to use Invoke-WebRequest with -ErrorAction Stop for better error handling.
    • Update regex to Opera_GX_([\d.]+)_Setup for more precise version capturing from the filename.
    • Refine the iteration logic to target the Windows-specific setup path more accurately.

Testing

The test results are as follows:
┏[ D:\Software\Scoop\Local\apps\scoop\current\bin][ master ≡]
└─> .\checkver.ps1 -App opera-gx -Dir 'D:\Temporary\Software\Microsoft\Windows Sandbox\Repositories\Scoop\Buckets\Extras\bucket' -f
opera-gx: 125.0.5729.58 (scoop version is 125.0.5729.58)
Forcing autoupdate!
Autoupdating opera-gx
DEBUG[1768171415] [$updatedProperties] = [hash url] -> D:\Software\Scoop\Local\apps\scoop\current\lib\autoupdate.ps1:491:5
DEBUG[1768171415] $substitutions (hashtable) -> D:\Software\Scoop\Local\apps\scoop\current\lib\autoupdate.ps1:221:5
DEBUG[1768171415] $substitutions.$matchTail                     .58
DEBUG[1768171415] $substitutions.$baseurl                       https://get.opera.com/pub/opera_gx/125.0.5729.58/win
DEBUG[1768171415] $substitutions.$urlNoExt                      https://get.opera.com/pub/opera_gx/125.0.5729.58/win/Opera_GX_125.0.5729.58_Setup
DEBUG[1768171415] $substitutions.$cleanVersion                  1250572958
DEBUG[1768171415] $substitutions.$underscoreVersion             125_0_5729_58
DEBUG[1768171415] $substitutions.$matchHead                     125.0.5729
DEBUG[1768171415] $substitutions.$basename                      Opera_GX_125.0.5729.58_Setup.exe
DEBUG[1768171415] $substitutions.$url                           https://get.opera.com/pub/opera_gx/125.0.5729.58/win/Opera_GX_125.0.5729.58_Setup.exe
DEBUG[1768171415] $substitutions.$match1                        125.0.5729.58
DEBUG[1768171415] $substitutions.$minorVersion                  0
DEBUG[1768171415] $substitutions.$basenameNoExt                 Opera_GX_125.0.5729.58_Setup
DEBUG[1768171415] $substitutions.$buildVersion                  58
DEBUG[1768171415] $substitutions.$majorVersion                  125
DEBUG[1768171415] $substitutions.$patchVersion                  5729
DEBUG[1768171415] $substitutions.$dashVersion                   125-0-5729-58
DEBUG[1768171415] $substitutions.$preReleaseVersion             125.0.5729.58
DEBUG[1768171415] $substitutions.$version                       125.0.5729.58
DEBUG[1768171415] $substitutions.$dotVersion                    125.0.5729.58
DEBUG[1768171415] $hashfile_url = https://get.opera.com/pub/opera_gx/125.0.5729.58/win/Opera_GX_125.0.5729.58_Setup.exe.sha256sum -> D:\Software\Scoop\Local\apps\scoop\current\lib\autoupdate.ps1:224:5
Searching hash for Opera_GX_125.0.5729.58_Setup.exe in https://get.opera.com/pub/opera_gx/125.0.5729.58/win/Opera_GX_125.0.5729.58_Setup.exe.sha256sum
DEBUG[1768171415] $regex = ^\s*([a-fA-F0-9]+)\s*$ -> D:\Software\Scoop\Local\apps\scoop\current\lib\autoupdate.ps1:78:9
Found: bb281e91708e86ec91c0f5a35c357e570423b3eb40fc457a8767b8742dad1c68 using Extract Mode
DEBUG[1768171415] $substitutions (hashtable) -> D:\Software\Scoop\Local\apps\scoop\current\lib\autoupdate.ps1:221:5
DEBUG[1768171415] $substitutions.$matchTail                     .58
DEBUG[1768171415] $substitutions.$baseurl                       https://get.opera.com/pub/opera_gx/125.0.5729.58/win
DEBUG[1768171415] $substitutions.$urlNoExt                      https://get.opera.com/pub/opera_gx/125.0.5729.58/win/Opera_GX_125.0.5729.58_Setup_x64
DEBUG[1768171415] $substitutions.$cleanVersion                  1250572958
DEBUG[1768171415] $substitutions.$underscoreVersion             125_0_5729_58
DEBUG[1768171415] $substitutions.$matchHead                     125.0.5729
DEBUG[1768171415] $substitutions.$basename                      Opera_GX_125.0.5729.58_Setup_x64.exe
DEBUG[1768171415] $substitutions.$url                           https://get.opera.com/pub/opera_gx/125.0.5729.58/win/Opera_GX_125.0.5729.58_Setup_x64.exe
DEBUG[1768171415] $substitutions.$match1                        125.0.5729.58
DEBUG[1768171415] $substitutions.$minorVersion                  0
DEBUG[1768171415] $substitutions.$basenameNoExt                 Opera_GX_125.0.5729.58_Setup_x64
DEBUG[1768171415] $substitutions.$buildVersion                  58
DEBUG[1768171415] $substitutions.$majorVersion                  125
DEBUG[1768171415] $substitutions.$patchVersion                  5729
DEBUG[1768171415] $substitutions.$dashVersion                   125-0-5729-58
DEBUG[1768171415] $substitutions.$preReleaseVersion             125.0.5729.58
DEBUG[1768171415] $substitutions.$version                       125.0.5729.58
DEBUG[1768171415] $substitutions.$dotVersion                    125.0.5729.58
DEBUG[1768171415] $hashfile_url = https://get.opera.com/pub/opera_gx/125.0.5729.58/win/Opera_GX_125.0.5729.58_Setup_x64.exe.sha256sum -> D:\Software\Scoop\Local\apps\scoop\current\lib\autoupdate.ps1:224:5
Searching hash for Opera_GX_125.0.5729.58_Setup_x64.exe in https://get.opera.com/pub/opera_gx/125.0.5729.58/win/Opera_GX_125.0.5729.58_Setup_x64.exe.sha256sum
DEBUG[1768171416] $regex = ^\s*([a-fA-F0-9]+)\s*$ -> D:\Software\Scoop\Local\apps\scoop\current\lib\autoupdate.ps1:78:9
Found: 22b4528b07dfc1dec2833b1f081128f83ab9f49128c030a35370cc95c36ff00e using Extract Mode
Writing updated opera-gx manifest

┏[ D:\Software\Scoop\Local\apps\scoop\current\bin][ master ≡]
└─> scoop install Unofficial/opera-gx
Installing 'opera-gx' (125.0.5729.58) [64bit] from 'Unofficial' bucket
Loading Opera_GX_125.0.5729.58_Setup_x64.exe from cache.
Checking hash of Opera_GX_125.0.5729.58_Setup_x64.exe ... ok.
Running installer script...done.
Linking D:\Software\Scoop\Local\apps\opera-gx\current => D:\Software\Scoop\Local\apps\opera-gx\125.0.5729.58
Creating shortcut for Opera GX (opera.exe)
Persisting profile
'opera-gx' (125.0.5729.58) was installed successfully!
  • Use conventional PR title: <manifest-name[@version]|chore>: <general summary of the pull request>
  • I have read the Contributing Guide

Summary by CodeRabbit

  • Improvements
    • Streamlined Opera GX installation process with direct setup executable downloads, eliminating archive extraction steps
    • Enhanced installer file organization and configuration handling for improved reliability
    • Refined version detection mechanism for more robust automatic updates

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 11, 2026

Walkthrough

Updated the Opera GX package manifest to refactor installer logic and download URLs. Changes include removing archive fragment identifiers from setup URLs, rewriting version discovery regex and iteration logic, restructuring file organization paths, and modifying JSON output generation with updated encoding specifications.

Changes

Cohort / File(s) Summary
Opera GX Manifest Updates
bucket/opera-gx.json
Revised 64-bit and 32-bit download URLs to use direct .exe setup files instead of .7z archives. Rewrote checkver logic to fetch releases page and parse installer names via regex iteration. Enhanced installer script to expand archives, remove list items, reorganize files under versioned paths, and generate JSON config with deeper structure and ASCII encoding.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Suggested labels

review-needed

Suggested reviewers

  • z-Fng

Poem

🐰 A manifest refreshed, with URLs made new,
Archive fragments vanished, setup direct and true,
Version discovery gleams with regex precision,
Opera GX flows smooth through this revision,
Hopping toward excellence, one commit through! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main changes to the opera-gx manifest, specifically mentioning the update to the installer script and checkver components.
Description check ✅ Passed The PR description is comprehensive and follows the repository template, including a clear summary, related issues, detailed changes, and comprehensive testing results.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 62c7244 and b2272b7.

📒 Files selected for processing (1)
  • bucket/opera-gx.json
🧰 Additional context used
🧠 Learnings (6)
📓 Common learnings
Learnt from: o-l-a-v
Repo: ScoopInstaller/Extras PR: 16378
File: bucket/compactgui.json:20-22
Timestamp: 2025-10-19T13:58:23.389Z
Learning: In the ScoopInstaller/Extras repository, the CompactGUI manifest removed hash verification from the autoupdate block because the hash verification mechanism (scraping SHA-256 from release page HTML) is no longer available in newer CompactGUI releases. GitHub asset digests exist in beta releases but not in v3.8.0, and Scoop doesn't have built-in support for extracting from GitHub API asset digests.
Learnt from: Gitoffthelawn
Repo: ScoopInstaller/Extras PR: 16106
File: bucket/czkawka-gui.json:25-25
Timestamp: 2025-09-05T09:41:52.653Z
Learning: For czkawka-gui manifests in Scoop Extras, the correct upstream filename pattern for Windows GUI builds in recent versions uses "gtk46" (without underscore), not "gtk_46" (with underscore). The autoupdate URL should use "windows_czkawka_gui_gtk46.zip" format. This was confirmed by a working 10.0.0 update with valid hash.
📚 Learning: 2025-12-21T13:49:44.001Z
Learnt from: haussmann
Repo: ScoopInstaller/Extras PR: 16863
File: bucket/browseros.json:15-17
Timestamp: 2025-12-21T13:49:44.001Z
Learning: In Scoop manifests, when a URL uses a fragment like `#/dl.7z`, Scoop automatically extracts the archive after download. For nested archives (like BrowserOS), the downloaded installer may contain another archive (e.g., `chrome.7z`) that requires explicit extraction via the installer script using `Expand-7zipArchive`. The installer script should reference the inner archive name, not the outer `dl.7z`.

Applied to files:

  • bucket/opera-gx.json
📚 Learning: 2025-10-19T13:58:23.389Z
Learnt from: o-l-a-v
Repo: ScoopInstaller/Extras PR: 16378
File: bucket/compactgui.json:20-22
Timestamp: 2025-10-19T13:58:23.389Z
Learning: In the ScoopInstaller/Extras repository, the CompactGUI manifest removed hash verification from the autoupdate block because the hash verification mechanism (scraping SHA-256 from release page HTML) is no longer available in newer CompactGUI releases. GitHub asset digests exist in beta releases but not in v3.8.0, and Scoop doesn't have built-in support for extracting from GitHub API asset digests.

Applied to files:

  • bucket/opera-gx.json
📚 Learning: 2025-10-15T11:54:31.320Z
Learnt from: o-l-a-v
Repo: ScoopInstaller/Extras PR: 16341
File: bucket/foxit-pdf-reader.json:47-50
Timestamp: 2025-10-15T11:54:31.320Z
Learning: In bucket/foxit-pdf-reader.json and bucket/foxit-reader.json, the checkver script uses MaximumRedirection 1 (not 0) for Invoke-WebRequest to properly handle Foxit's backend redirect behavior when parsing the Location header for version detection.

Applied to files:

  • bucket/opera-gx.json
📚 Learning: 2025-10-16T15:59:21.258Z
Learnt from: o-l-a-v
Repo: ScoopInstaller/Extras PR: 16349
File: bucket/fvim.json:45-49
Timestamp: 2025-10-16T15:59:21.258Z
Learning: In Scoop manifests, the `autoupdate.url` and `autoupdate.architecture.<arch>.url` fields must be valid URIs according to the JSON schema (defined with `"format": "uri"`). Variables like `$matchUrlx64` that contain only path segments must be combined with a base URL (e.g., `https://github.com/.../releases/download/`) to form a complete valid URI.

Applied to files:

  • bucket/opera-gx.json
📚 Learning: 2025-09-05T09:41:52.653Z
Learnt from: Gitoffthelawn
Repo: ScoopInstaller/Extras PR: 16106
File: bucket/czkawka-gui.json:25-25
Timestamp: 2025-09-05T09:41:52.653Z
Learning: For czkawka-gui manifests in Scoop Extras, the correct upstream filename pattern for Windows GUI builds in recent versions uses "gtk46" (without underscore), not "gtk_46" (with underscore). The autoupdate URL should use "windows_czkawka_gui_gtk46.zip" format. This was confirmed by a working 10.0.0 update with valid hash.

Applied to files:

  • bucket/opera-gx.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: WindowsPowerShell
🔇 Additional comments (4)
bucket/opera-gx.json (4)

10-17: LGTM on URL changes.

Removing the #/dl.7z fragment and handling extraction explicitly in the installer script provides better control over the extraction process. Based on learnings, this is the preferred approach for more complex extraction scenarios.


19-32: LGTM on installer script.

The explicit Expand-7zipArchive with -Removal flag correctly handles the self-extracting archive. The file organization logic properly moves components to the version subdirectory while preserving the required files at the root level.


52-54: Regex only matches 64-bit installer filename.

The lookbehind pattern (?<=Setup\w+)\.exe$ requires at least one word character between "Setup" and ".exe". This matches Setup_x64.exe but will not match Setup.exe (the 32-bit installer) since there's no word character suffix.

While this works for version detection (the version is extracted the same from either filename), it's fragile if Opera ever stops providing 64-bit builds or changes the naming convention.

Consider using a more inclusive pattern:

Suggested fix
-    $installer_name = $download_page.Links | Where-Object { $_.href -match '(?<=Setup\\w+)\\.exe$' } |
+    $installer_name = $download_page.Links | Where-Object { $_.href -match 'Setup(_x64)?\\.exe$' } |

59-71: LGTM on autoupdate configuration.

The URL templates correctly use $version substitution and are consistent with the direct .exe format used in the architecture URLs. Hash verification via .sha256sum files is the standard approach.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Contributor

All changes look good.

Wait for review from human collaborators.

opera-gx

  • Lint
  • Description
  • License
  • Hashes
  • Checkver
  • Autoupdate
  • Autoupdate Hash Extraction

Check the full log for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant