Skip to content

Conversation

@ExtremeFiretop
Copy link
Owner

@ExtremeFiretop ExtremeFiretop commented Jul 24, 2025

Fixing More Comparison Errors

  1. This rolls back changes from PR: Fix Gnuton Errors Since Overhaul #464
    And instead goes a different direction by using GetLatestFWUpdateVersionFromRouter 1 for long version of update firmware pulled down from the webs_update script instead of stripping it from the GetLatestFWUpdateVersionFromGitHub function
    This will not be a problem as now the offiline mode is truely offline and that conflict has been resolved a different way.

  2. Rolls back the changes from PR: Minor Fixes #423
    And instead goes a different direction by using GetLatestFWUpdateVersionFromRouter 1 within the CreateEMailContent function and no longer strips the -gnuton version for long comparison.

  3. This was done to address this issue where I manually (offline mode) flashed the latest beta version of gnuton firmware version: 3004.388.9_2-gnuton2_beta1 (aka a re-release)
    Found here: https://github.com/gnuton/asuswrt-merlin.ng/releases/tag/3004.388.9_2-gnuton2_beta1
    However overnight MerlinAU downgraded me back to the production version of: 3004.388.9_2-gnuton1
    Found here: https://github.com/gnuton/asuswrt-merlin.ng/releases/tag/3004.388.9_2-gnuton1

image

MerlinAU was incorrectly weighting the new beta as an older beta, because it didn't understand that gnuton1 is older than gnuton2-beta1

Essentially it was working like this:

Input version string        | USE_BETA_WEIGHT -- DISABLED | USE_BETA_WEIGHT -- ENABLED        |
3004.388.9.2-gnuton2_beta1  | 30043880902                 | 30043880802  (–100 beta penalty)  | 
3004.388.9.2-gnuton1        | 30043880902                 | 30043880902                       |  

So I could use the beta switch in the settings to stop it from auto-downgrading me, but that's not how the setting is suppose to work, it's suppose to stop me from being auto-upgraded lol.

The solution for this was to modify FWVersionStrToNum to capture and factor in the Gnuton(X) value and feed that long version into CheckNewUpdateFirmwareNotification along with the long version of: "$current_version" so both are long versions going in, and factored in correctly if theres a bump in the gnuton release version (aka a re-release)

Fixing More Comparison Errors
@ExtremeFiretop ExtremeFiretop marked this pull request as ready for review July 24, 2025 03:40
Missed one
@ExtremeFiretop
Copy link
Owner Author

Turns out we can't strip -gnuton1 or -gnuton2 as those actually mean something ;)
I had to pivot so we correctly weighted those suffixes, and then go back and redo the fixes for the 2 previous PRs and think real hard to make sure there's no backlash and I don't retrigger those problems

Committing Additional Logic Fixes
@ExtremeFiretop
Copy link
Owner Author

@Martinski4GitHub

Wait a tick.... This issue might run deeper than expected.
Even after the new changes, our script correctly doesn't notify me anymore or update our settings file (aka it doesn't think it's newer)

However, MerlinAU still displays a new firmware update in the main menu:

image

And settings file:
image

I think the issue now is with the webs_update script thinking there's an update available when there isn't? Is that possible that the gnutons_web_update script cannot correctly factor in gnuton1 vs gnuton2? https://github.com/ExtremeFiretop/MerlinAutoUpdate-Router/blob/main/gnuton_webs_update.sh

I'm heading off to bed but maybe you can poke at this more.

@Martinski4GitHub
Copy link
Collaborator

Fixing More Comparison Errors

1. This rolls back changes from PR: [Fix Gnuton Errors Since Overhaul #464](https://github.com/ExtremeFiretop/MerlinAutoUpdate-Router/pull/464)
   And instead goes a different direction by using _GetLatestFWUpdateVersionFromRouter_ 1 for long version of update firmware  pulled down from the webs_update script instead of stripping it from the _GetLatestFWUpdateVersionFromGitHub_ function
   This will not be a problem as now the offiline mode is truely offline and that conflict has been resolved a different way.

2. Rolls back the changes from PR: [Minor Fixes #423](https://github.com/ExtremeFiretop/MerlinAutoUpdate-Router/pull/423)
   And instead goes a different direction by using _GetLatestFWUpdateVersionFromRouter_ 1 within the _CreateEMailContent_ function and no longer strips the -gnuton version for long comparison.

3. This was done to address this issue where I manually (offline mode) flashed the latest beta version of gnuton firmware version: **3004.388.9_2-gnuton2_beta1** (aka a release)
   Found here: https://github.com/gnuton/asuswrt-merlin.ng/releases/tag/3004.388.9_2-gnuton2_beta1
   However overnight MerlinAU downgraded me back to the production version of: 3004.388.9_2-gnuton1
   Found here: https://github.com/gnuton/asuswrt-merlin.ng/releases/tag/3004.388.9_2-gnuton1
image

MerlinAU was incorrectly weighting the new beta as an older beta, because it didn't understand that gnuton1 is older than gnuton2-beta1

Essentially it was working like this:

Input version string        | USE_BETA_WEIGHT -- DISABLED | USE_BETA_WEIGHT -- ENABLED        |
3004.388.9.2-gnuton2_beta1  | 30043880902                 | 30043880802  (–100 beta penalty)  | 
3004.388.9.2-gnuton1        | 30043880902                 | 30043880902                       |  

So I could use the beta switch in the settings to stop it from auto-downgrading me, but that's not how the setting is suppose to work, it's suppose to stop me from being auto-upgraded lol.

The solution for this was to modify FWVersionStrToNum to capture and factor in the Gnuton(X) value and feed that long version into CheckNewUpdateFirmwareNotification along with the long version of: "$current_version" so both are long versions going in, and factored in correctly if theres a bump in the gnuton release version (aka a release)

Great catch!!

@Martinski4GitHub
Copy link
Collaborator

@Martinski4GitHub

Wait a tick.... This issue might run deeper than expected. Even after the new changes, our script correctly doesn't notify me anymore or update our settings file (aka it doesn't think it's newer)

However, MerlinAU still displays a new firmware update in the main menu:
image

And settings file: image

I think the issue now is with the webs_update script thinking there's an update available when there isn't? Is that possible that the gnutons_web_update script cannot correctly factor in gnuton1 vs gnuton2? https://github.com/ExtremeFiretop/MerlinAutoUpdate-Router/blob/main/gnuton_webs_update.sh

I'm heading off to bed but maybe you can poke at this more.

Sorry, bud. I'm going to bed after this reply. Today was a very long day, and I slept only a few hours between last night and this morning, so I'm really tired. Even though I don't have a router that is supported by Gnuton, I can take a look at the code.

Have a good night!!

@ExtremeFiretop
Copy link
Owner Author

@Martinski4GitHub
Wait a tick.... This issue might run deeper than expected. Even after the new changes, our script correctly doesn't notify me anymore or update our settings file (aka it doesn't think it's newer)
However, MerlinAU still displays a new firmware update in the main menu:
image
And settings file: image
I think the issue now is with the webs_update script thinking there's an update available when there isn't? Is that possible that the gnutons_web_update script cannot correctly factor in gnuton1 vs gnuton2? https://github.com/ExtremeFiretop/MerlinAutoUpdate-Router/blob/main/gnuton_webs_update.sh
I'm heading off to bed but maybe you can poke at this more.

Sorry, bud. I'm going to bed after this reply. Today was a very long day, and I slept only a few hours between last night and this morning, so I'm really tired. Even though I don't have a router that is supported by Gnuton, I can take a look at the code.

Have a good night!!

I'm gonna poke down the path of the webs_update script today . I was just sure I was on the right track. And I probably am because our script probably should be able to factory in Gnuton1 vs Gnuton2.

But even if it can, theres still some weirdness so I have a feeling my investigations aren't over yet.

Additional Patches to Webs_Updates
Reimplement the use of the $USE_BETA_WEIGHT
Allow Updates to Webs_Update Script
Navigate around the binded file for comparison
Workaround for Bound File
Cleanup
Fine-Tuning
@ExtremeFiretop
Copy link
Owner Author

@Martinski4GitHub

Seems to work as expected now :) Let me know if you have any questions

@ExtremeFiretop
Copy link
Owner Author

@Martinski4GitHub

In summary, it looks like I was on the right track.
Both MerlinAU and the webs_update script needed updating to be able to handle Gnuton1 vs Gnuton2

@Martinski4GitHub
Copy link
Collaborator

Martinski4GitHub commented Jul 28, 2025

@Martinski4GitHub

In summary, it looks like I was on the right track. Both MerlinAU and the webs_update script needed updating to be able to handle Gnuton1 vs Gnuton2

Yeah, it seems that you got this one in the bag as well, LOL!!!
I'll take a closer look at the code just to do a "sanity check," but it's looking good.

P.S.
My wife and I are now going for an "ice cream run" 😉😜 so I'll be back in an hour or so...

Removing unnecessary unmount
Was causing the webs_update file to always need to be remounted.
@Martinski4GitHub Martinski4GitHub merged commit 25051fa into dev Jul 29, 2025
1 check passed
@ExtremeFiretop ExtremeFiretop deleted the For-Testing branch August 1, 2025 14:35
@ExtremeFiretop ExtremeFiretop restored the For-Testing branch August 1, 2025 15:24
@ExtremeFiretop ExtremeFiretop deleted the For-Testing branch August 1, 2025 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants