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?
Thanks.

The version marker is determined via https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=scripts/getver.sh;hb=HEAD.

3 Likes

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

% ./scripts/getver.sh                                   
r26358-ba245d6bca
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.