failure to write a recipe to a git+ssh repository

Hello,

    I'm trying to write a recipe for a project that's still in
development, and when I start a fresh setup-tools run, it fails saying :

--------8<----------------8<----------------8<---------------8<--------
ERROR: Unable to parse /home/angstrom/setup-scripts/sources/meta-hackabledevices/recipes-hackabledevices/myl33tproject/myl33tproject_v0.bb
Traceback (most recent call last):
  File "<string>", line 10, in <module>
  File "__anon_80__home_angstrom_setup_scripts_sources_meta_openembedded_meta_oe_classes_gitver_bbclass", line 2, in __anon_80__home_angstrom_setup_scripts_sources_meta_openembedded_meta_oe_classes_gitver_bbclass(d=<bb.data_smart.DataSmart object at 0x77dab50>)
  File "gitver.bbclass", line 8, in mark_recipe_dependencies(path='/home/angstrom/setup-scripts/build/tmp-angstrom_v2012_05-eglibc/work/armv7a-angstrom-linux-gnueabi/myl33tproject-r0/myrepository', d=<bb.data_smart.DataSmart object at 0x77dab50>)
  File "/home/angstrom/setup-scripts/sources/bitbake/lib/bb/parse/__init__.py", line 77, in mark_dependency(d=<bb.data_smart.DataSmart object at 0x77dab50>, f='/home/angstrom/setup-scripts/build/tmp-angstrom_v2012_05-eglibc/work/armv7a-angstrom-linux-gnueabi/myl33tproject-r0/myrepository/.git/HEAD'):
         deps = d.getVar('__depends') or set()
    > deps.update([(f, cached_mtime(f))])
         d.setVar('__depends', deps)
  File "/home/angstrom/setup-scripts/sources/bitbake/lib/bb/parse/__init__.py", line 58, in cached_mtime(f='/home/angstrom/setup-scripts/build/tmp-angstrom_v2012_05-eglibc/work/armv7a-angstrom-linux-gnueabi/myl33tproject-r0/myrepository/.git/HEAD'):
         if f not in __mtime_cache:
    > __mtime_cache[f] = os.stat(f)[stat.ST_MTIME]
         return __mtime_cache[f]
OSError: [Errno 2] No such file or directory: '/home/angstrom/setup-scripts/build/tmp-angstrom_v2012_05-eglibc/work/armv7a-angstrom-linux-gnueabi/myl33tproject-r0/myrepository/.git/HEAD'
-------->8---------------->8---------------->8--------------->8--------

    I then have to manually clone my git repository where it is looking
for it, and rerun bitbake, which works it out perfectly:

--------8<----------------8<----------------8<---------------8<--------
cd /home/angstrom/setup-scripts/build/tmp-angstrom_v2012_05-eglibc/work/armv7a-angstrom-linux-gnueabi/myl33tproject-r0/
git clone guyzmo@myrepositoryserver.com:myrepository.git myrepository
cd -
bitbake myl33tproject_v0.bb
-------->8---------------->8---------------->8--------------->8--------

    So there's definitely something wrong with my recipe, but reading 50
times each bit of documentation I could find on the web, I can't find
what's wrong. I did not dug into the sources of bitbake or gitver,
though.

--------8<----------------8<----------------8<---------------8<--------
DESCRIPTION = "My l33t project"
HOMEPAGE = "http://hackable-devices.org"
LICENSE = "GPLv3"
SECTION = "console/utils"
DEPENDS = "curl libjson libgcrypt python-nativesdk"
RDEPENDS = "python-nativesdk-core python-nativesdk-lang"
PROVIDES = "myl33tproject"
SRC_URI = "git://myrepositoryserver.com/myrepository.git;branch=master;protocol=ssh;user=guyzmo"
SRCREV = "HEAD"

LIC_FILES_CHKSUM = "file://LICENSE;md5=d41d8cd98f00b204e9800998ecf8427e"

inherit systemd gitver

PR = "r0"

# For tarball packages (as opposed to git / svn which include the commit in the URI)
SRC_URI[md5sum] = ""
SRC_URI[sha256sum] = ""
S = "${WORKDIR}/"

do_configure() {
    # ...
}

do_compile () {
    oe_runmake all
}
do_install () {
    oe_runmake install
}

SYSTEMD_PACKAGES = "${PN}-systemd"
SYSTEMD_SERVICE = "${PN}.service"
-------->8---------------->8---------------->8--------------->8--------

cheers,

Hello,

    I posted the mail I'm replying back in June and got no answer, but
finally, and thanks to a few peoples on the #oe channel on freenode, I
finally worked around it. I'm posting the answer here for people that
may encounter the same problem, and are looking for an answer.

Excerpts from Guyzmo's message of 2012-06-28 17:13:42 +0200:
[...]

    So there's definitely something wrong with my recipe, but reading 50
times each bit of documentation I could find on the web, I can't find
what's wrong. I did not dug into the sources of bitbake or gitver,
though.

--------8<----------------8<----------------8<---------------8<--------

[...]

inherit systemd gitver

[...]

-------->8---------------->8---------------->8--------------->8--------

    Well that's in that line that the problem is. Indeed, it seems like
the gitver module tries to access the workspace's cloned tree before
actually cloning it. I wrongly thought that 'gitver' was about importing
the git module, whereas it was the reason it did not work. Simply
removing "gitver" made the whole working.

    So now it's fixed and I'm building my own home made image baked with
love :slight_smile: Thank you guys for your work and help.

Cheers,