* Reexecuting do_fetch after do_unpack failed with reference is not a tree
@ 2013-04-24 8:46 Martin Jansa
2013-04-24 9:08 ` Paul Eggleton
2013-04-24 9:08 ` Richard Purdie
0 siblings, 2 replies; 3+ messages in thread
From: Martin Jansa @ 2013-04-24 8:46 UTC (permalink / raw)
To: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 1323 bytes --]
Hi,
I guess this will be hard to fix correctly, but please comment if I've
overlooked something:
1) update foo git repository with new commit ABCD, but forget to push it
2) bump SRCREV in foo.bb to ABCD
3) run bitbake foo, it will run do_fetch to catch new changes in remote
repo, but ABCD is not there, so do_unpack will fail like this:
NOTE: Running task 2289 of 4227 (ID: 1185, foo.bb, do_unpack)
NOTE: recipe foo-1.0+gitr2+ABCD: task do_unpack: Started
ERROR: Function failed: Fetcher failure: Fetch command failed with exit code 128, output:
fatal: reference is not a tree: ABCD
4) realize missing "git push" in step 1) and push it now
5) run bitbake foo again, but do_unpack is still failing, because
do_fetch checksums is the same (nothing changed in metadata) so stamp
is still valid.
6) fix it with "bitbake -c fetch -f foo", but that could be complicated
if bump SRCREV was pushed already and possibly many builders already
executed do_fetch, so maybe push PR bump or something like that.
Only better solution than 6) I can think of, is to detect
"fatal: reference is not a tree" in do_unpack and if it's git repository
then remove do_fetch stamp and hope it was fixed in remote git repo.
--
Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Reexecuting do_fetch after do_unpack failed with reference is not a tree
2013-04-24 8:46 Reexecuting do_fetch after do_unpack failed with reference is not a tree Martin Jansa
@ 2013-04-24 9:08 ` Paul Eggleton
2013-04-24 9:08 ` Richard Purdie
1 sibling, 0 replies; 3+ messages in thread
From: Paul Eggleton @ 2013-04-24 9:08 UTC (permalink / raw)
To: Martin Jansa; +Cc: openembedded-core
On Wednesday 24 April 2013 10:46:15 Martin Jansa wrote:
> I guess this will be hard to fix correctly, but please comment if I've
> overlooked something:
>
> 1) update foo git repository with new commit ABCD, but forget to push it
> 2) bump SRCREV in foo.bb to ABCD
> 3) run bitbake foo, it will run do_fetch to catch new changes in remote
> repo, but ABCD is not there, so do_unpack will fail like this:
>
> NOTE: Running task 2289 of 4227 (ID: 1185, foo.bb, do_unpack)
> NOTE: recipe foo-1.0+gitr2+ABCD: task do_unpack: Started
> ERROR: Function failed: Fetcher failure: Fetch command failed with exit
> code 128, output: fatal: reference is not a tree: ABCD
>
> 4) realize missing "git push" in step 1) and push it now
> 5) run bitbake foo again, but do_unpack is still failing, because
> do_fetch checksums is the same (nothing changed in metadata) so stamp
> is still valid.
>
> 6) fix it with "bitbake -c fetch -f foo", but that could be complicated
> if bump SRCREV was pushed already and possibly many builders already
> executed do_fetch, so maybe push PR bump or something like that.
>
> Only better solution than 6) I can think of, is to detect
> "fatal: reference is not a tree" in do_unpack and if it's git repository
> then remove do_fetch stamp and hope it was fixed in remote git repo.
I don't think this can work. The only way to fix this would be to check if the
specified SRCREV (and/or branch/tag if specified) is valid during do_fetch and
fail there if it isn't.
Cheers,
Paul
--
Paul Eggleton
Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Reexecuting do_fetch after do_unpack failed with reference is not a tree
2013-04-24 8:46 Reexecuting do_fetch after do_unpack failed with reference is not a tree Martin Jansa
2013-04-24 9:08 ` Paul Eggleton
@ 2013-04-24 9:08 ` Richard Purdie
1 sibling, 0 replies; 3+ messages in thread
From: Richard Purdie @ 2013-04-24 9:08 UTC (permalink / raw)
To: Martin Jansa; +Cc: openembedded-core
On Wed, 2013-04-24 at 10:46 +0200, Martin Jansa wrote:
> Hi,
>
> I guess this will be hard to fix correctly, but please comment if I've
> overlooked something:
>
> 1) update foo git repository with new commit ABCD, but forget to push it
> 2) bump SRCREV in foo.bb to ABCD
> 3) run bitbake foo, it will run do_fetch to catch new changes in remote
> repo, but ABCD is not there, so do_unpack will fail like this:
>
> NOTE: Running task 2289 of 4227 (ID: 1185, foo.bb, do_unpack)
> NOTE: recipe foo-1.0+gitr2+ABCD: task do_unpack: Started
> ERROR: Function failed: Fetcher failure: Fetch command failed with exit code 128, output:
> fatal: reference is not a tree: ABCD
>
> 4) realize missing "git push" in step 1) and push it now
> 5) run bitbake foo again, but do_unpack is still failing, because
> do_fetch checksums is the same (nothing changed in metadata) so stamp
> is still valid.
>
> 6) fix it with "bitbake -c fetch -f foo", but that could be complicated
> if bump SRCREV was pushed already and possibly many builders already
> executed do_fetch, so maybe push PR bump or something like that.
>
> Only better solution than 6) I can think of, is to detect
> "fatal: reference is not a tree" in do_unpack and if it's git repository
> then remove do_fetch stamp and hope it was fixed in remote git repo.
I'd say do_fetch should detect that the specified revision isn't present
and fail there and then in do_fetch.
Cheers,
Richard
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-04-24 9:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-24 8:46 Reexecuting do_fetch after do_unpack failed with reference is not a tree Martin Jansa
2013-04-24 9:08 ` Paul Eggleton
2013-04-24 9:08 ` Richard Purdie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox