3 examples below: Example 1: If you import a layer that has the same git url as an existing layer source layer, setting the revision to a specific commit sha, the build request fails with this error command: git fetch --all && git checkout "57c8e6bffbbef9b2331551093c3436303eb18386" && git rebase "origin/57c8e6bffbbef9b2331551093c3436303eb18386" From git://git.yoctoproject.org/meta-raspberrypi * [new branch] ag-dev -> origin/ag-dev * [new branch] daisy -> origin/daisy * [new branch] danny -> origin/danny * [new branch] denzil -> origin/denzil * [new branch] dizzy -> origin/dizzy * [new branch] dora -> origin/dora * [new branch] dylan -> origin/dylan * [new branch] master -> origin/master Note: checking out '57c8e6bffbbef9b2331551093c3436303eb18386'. You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by performing another checkout. If you want to create a new branch to retain commits you create, you may do so (now or later) by using -b with the checkout command again. Example: git checkout -b new_branch_name HEAD is now at 57c8e6b... rpi-base.inc: Include the RPI2 DTB fatal: Needed a single revision invalid upstream origin/57c8e6bffbbef9b2331551093c3436303eb18386 ***************************** Example 2: If you import a layer with a git url that doesn't match any existing layers in Toaster, and set the revision to a specific commit sha, you get this error command: git clone "https://github.com/agherzan/meta-raspberrypi" --single-branch --branch "b896a7da70dd7a16ba7ffd664f7747cb37e1d142" "/home/yocto/_meta-raspberrypi_b896a7da70dd7a16ba7ffd664f7747cb37e1d142.toaster_cloned" Cloning into '/home/yocto/_meta-raspberrypi_b896a7da70dd7a16ba7ffd664f7747cb37e1d142.toaster_cloned'... warning: Could not find remote branch b896a7da70dd7a16ba7ffd664f7747cb37e1d142 to clone. fatal: Remote branch b896a7da70dd7a16ba7ffd664f7747cb37e1d142 not found in upstream origin Unexpected end of command stream ***************************** Example 3: If you import a layer, and the checkout directory that Toaster creates happens to exist already but with a different origin, you get this error (if you delete the directory, the build works): Existing git repository at /home/yocto/_meta-raspberrypi_master.toaster_cloned, but with different remotes ('origin git://git.yoctoproject.org/meta-raspberrypi (fetch), origin git://git.yoctoproject.org/meta-raspberrypi (push), ', expected 'https://github.com/agherzan/meta-raspberrypi'). Toaster will not continue out of fear of damaging something. ***************************** The fact that you can not build a layer when you set the revision to a certain commit sounds a bit worrying to me, but I could be totally wrong (maybe nobody would ever want to do something like that).
Possible fix hint, add git url/hash to make the clone directory unique
Started to work on this.
Example 3 is covered by bug 8101 To reproduce the other 2 examples, you can do the following. Example 1: 1) create a project with the master release 2) import a layer with name: 'meta-raspberrypi-test' git url: git://git.yoctoproject.org/meta-raspberrypi revision: 17dad9328b100beda1cf870c9075e509b5cbfa90 3) start a build for rpi-basic-image Example 2: 1) delete the _meta-raspberrypi_17dad9328b100beda1cf870c9075e509b5cbfa90.toaster_cloned directory that was created during the previous build 2) delete the meta-raspberrypi-test layer from the list of project layers in your configuration 3) import a new layer with name: meta-raspberrypi-test2 git url: https://github.com/agherzan/meta-raspberrypi.git revision: 17dad9328b100beda1cf870c9075e509b5cbfa90 4) start a build for rpi-basic-image
Pushed fixes for first 2 examples to ed/toaster/7505. Please, review. Example 3 is covered in bug 8101 and will be fixed there.
merged to bitbake master: http://cgit.openembedded.org/bitbake/commit/?id=f3641a8422e67890410594453b8baf362c27df2b
Verified on master: fc45deac89ef63ca1c44e763c38ced7dfd72cbe1