Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bitbake recipe to fetch from Mercurial repo

I'm facing problems fetch HG/Mercurial repo in Bitbake recipe.

  • can't fetch the source URL reported in logs
  • tested with env hg clone repo_url works fine
  • testet with hg:// and http:// headers
like image 715
Topper Avatar asked Nov 17 '25 04:11

Topper


1 Answers

The right format of SRC_URI is:

SRCREV = "tip"
SRCMODULE = "myapp"
SRC_URI = "hg://hg_server_url;rev=${SRCREV};protocol=http;branch=${SRCBRANCH};module=${SRCMODULE}"

The key is that hg_server_url shouldn't include target repo subname, but include it as SRCMODULE ! Also you could pull latest commit not with AUTOREV as per git repo but SRCREV = "tip"

Edit: Working 100% tip

Due to logic of bitbake classes and nature of Mercurial repo above statement should work but just once. It's that way cause when bitbake checks for cached files it finds "tip" already in cache instead git's HEAD wich is translatet to uniq hash. To avoid that behaviour we should avoid completly (Mercurial repo) cache when fetch hg repo. This is simple as put in recipe:

do_install[nostamp] = "1"

That way bitbake always think the recipe is executed for the first time. We not useing cache but always get latest repo commit.

like image 67
Topper Avatar answered Nov 18 '25 20:11

Topper



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!