Release version appears as r0+26304

I build my own firmware with my own patches added in my own git branch. Usually the OpenWrt release version would appear as r24002+18-e3559fb445, where +18 would be the number of patches added on top of main branch.

At some point something changed. It now appears as r0+26304-0f861df34b. I looked at git log, but I see nothing wrong. Current HEAD is still based on main branch.

So, what causes this? How do I fix it?

The version marker is determined via;a=blob;f=scripts/;hb=HEAD.


I had this issue recently. Solved by re-cloning the repo. As @slh pointed out, you can test with the script:

% ./scripts/                                   
1 Like

It's a bug caused by the recent branch change from "master" to "main":

[ -n "$ORIGIN" ] || ORIGIN="$(git rev-parse --verify --symbolic-full-name master@{u} 2>/dev/null)"

should be

[ -n "$ORIGIN" ] || ORIGIN="$(git rev-parse --verify --symbolic-full-name main@{u} 2>/dev/null)"

I'm surprised no devs noticed.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.