[bitbake-devel] hg fetcher failures for SRCREV set to a tag

Jon Szymaniak jon.szymaniak at gmail.com
Thu Dec 6 00:17:29 UTC 2012


tl;dr: Doesn't the "update" in lines 142-147 of hg.py cause issues when
SRCREV is a tag?


Hi all,

I didn't have any luck with this post on the Yocto mailing list. Since it seems
more like a bitbake issue (I'm very hesitant to cry "bug" at this point),
I hope I'm in the right place.

I've been running into "Fetcher failures" for my recipes using
mercurial recently, which report that I'm asking for an unknown revision,
despite it being valid. A trimmed log is at the end of this post.

After looking at hg.py, it seems the issue is that the
'hg update -r MY_TAG' that follows the 'hg clone -r MY_TAG ...' is doomed to
fail because that tag isn't visible until the next rev, where the action of
tagging it is committed.

For example, if I clone v1.1.0, I won't see that tag because the tag is added
to .hgtags in commit 41:58b..

      tip                             41:58b8f368be68
      v1.1.0                        40:a925b596c163
      v1.0.4                        39:6bf84da2571e

Therefore once I've cloned with "-r v1.1.0", I can't do an update
specifying tag v1.1.0.

Does this sound right, or am I way off here?

I'm not sure if using a tag rather than the revision number is unorthodox or
abnormal for bb's, so below's my use case, for a my-app_0.1.2.bb

require my-app.inc
PR = "${INC_PR}.0"
SRCREV = "v${PV}"

Therefore to bring in a new version, I can simply copy this file to a
my-app_1.1.0.bb, and adjust PR back to 0 if needed.

We have a policy not to move version tags, so tag-->revision should be 1:1. Is
what I'm seeing a non-issue simply because one shouldn't use tags in SRCREV?


Thank you,
Jon


Snipped Yocto/Poky log:
---------------------------
DEBUG: Fetch: checking for module directory
'/export/home/jon/projects/yocto/poky/build/test/downloads/hg/host/some_dir/my_package'
NOTE: Fetch hg://hg@host/some_dir;module=my_package;protocol=ssh
DEBUG: Running /usr/bin/env hg clone -r v1.1.0
ssh://hg@host/some_dir/my_package my_package
DEBUG: Fetcher accessed the network with the command /usr/bin/env hg
clone -r v1.1.0 ssh://hg@host/some_dir/my_package my_package
DEBUG: Running export HOME="/export/home/jon"; export
SSH_AGENT_PID="1234"; export SSH_AUTH_SOCK="<snipped>"; export
GIT_CONFIG="<snipped>/gitconfig"; export PATH="<snipped>";
/usr/bin/env hg clone -r v1.1.0 ssh://hg@host/some_dir/my_package
my_package
DEBUG: Running /usr/bin/env hg update -C -r v1.1.0
DEBUG: Running export HOME="/export/home/jon"; export
SSH_AGENT_PID="1234"; export SSH_AUTH_SOCK="<snipped>"; export
GIT_CONFIG="<snipped>/gitconfig"; export PATH="<snipped>";
/usr/bin/env hg update -C -r v1.1.0
WARNING: Failed to fetch URL
hg://hg@host/some_dir;module=my_package;protocol=ssh, attempting
MIRRORS if available
DEBUG: Fetcher failure: Fetch command failed with exit code 255, output:
  abort: unknown revision 'v1.1.0'!

DEBUG: Python function base_do_fetch finished
DEBUG: Python function do_fetch finished
ERROR: Function failed: Fetcher failure for URL:
'hg://hg@host/some_dir;module=my_package;protocol=ssh'. Unable to
fetch URL from any source.




More information about the bitbake-devel mailing list