* [PATCH] lib/bb/fetch2: don't skip checksums when local mirror enabled
@ 2012-04-05 17:07 Paul Eggleton
2012-04-10 23:25 ` Richard Purdie
2012-04-10 23:39 ` Richard Purdie
0 siblings, 2 replies; 5+ messages in thread
From: Paul Eggleton @ 2012-04-05 17:07 UTC (permalink / raw)
To: bitbake-devel
If you have PREMIRRORS set up to point to a local directory, the local
download function does nothing and always succeeds and the mirror code
was writing a .done stamp regardless, thus the checksum verification was
being skipped even if the file wasn't actually copied from the mirror.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
lib/bb/fetch2/__init__.py | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
index e5c4b34..414cc2b 100644
--- a/lib/bb/fetch2/__init__.py
+++ b/lib/bb/fetch2/__init__.py
@@ -476,9 +476,10 @@ def try_mirrors(d, origud, mirrors, check = False):
if not os.path.exists(ud.donestamp) or ud.method.need_update(newuri, ud, ld):
ud.method.download(newuri, ud, ld)
- open(ud.donestamp, 'w').close()
- if hasattr(ud.method,"build_mirror_data"):
- ud.method.build_mirror_data(newuri, ud, ld)
+ if os.path.exists(ud.localpath):
+ open(ud.donestamp, 'w').close()
+ if hasattr(ud.method,"build_mirror_data"):
+ ud.method.build_mirror_data(newuri, ud, ld)
if not ud.localpath or not os.path.exists(ud.localpath):
continue
--
1.7.5.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] lib/bb/fetch2: don't skip checksums when local mirror enabled
2012-04-05 17:07 [PATCH] lib/bb/fetch2: don't skip checksums when local mirror enabled Paul Eggleton
@ 2012-04-10 23:25 ` Richard Purdie
2012-04-11 9:11 ` Paul Eggleton
2012-04-10 23:39 ` Richard Purdie
1 sibling, 1 reply; 5+ messages in thread
From: Richard Purdie @ 2012-04-10 23:25 UTC (permalink / raw)
To: Paul Eggleton; +Cc: bitbake-devel
On Thu, 2012-04-05 at 18:07 +0100, Paul Eggleton wrote:
> If you have PREMIRRORS set up to point to a local directory, the local
> download function does nothing and always succeeds and the mirror code
> was writing a .done stamp regardless, thus the checksum verification was
> being skipped even if the file wasn't actually copied from the mirror.
>
> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
> ---
> lib/bb/fetch2/__init__.py | 7 ++++---
> 1 files changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
> index e5c4b34..414cc2b 100644
> --- a/lib/bb/fetch2/__init__.py
> +++ b/lib/bb/fetch2/__init__.py
> @@ -476,9 +476,10 @@ def try_mirrors(d, origud, mirrors, check = False):
>
> if not os.path.exists(ud.donestamp) or ud.method.need_update(newuri, ud, ld):
> ud.method.download(newuri, ud, ld)
> - open(ud.donestamp, 'w').close()
> - if hasattr(ud.method,"build_mirror_data"):
> - ud.method.build_mirror_data(newuri, ud, ld)
> + if os.path.exists(ud.localpath):
> + open(ud.donestamp, 'w').close()
> + if hasattr(ud.method,"build_mirror_data"):
> + ud.method.build_mirror_data(newuri, ud, ld)
>
> if not ud.localpath or not os.path.exists(ud.localpath):
> continue
I messed up some commands and this ended up merged with the following
commit I manipulated:
http://git.openembedded.org/bitbake/commit/?id=c9eed04c6275ef2c694f89e047f85c7de76f89b6
Since its pushed at this point I'm not sure what options I have to undo
it. Sorry :(
Richard
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] lib/bb/fetch2: don't skip checksums when local mirror enabled
2012-04-05 17:07 [PATCH] lib/bb/fetch2: don't skip checksums when local mirror enabled Paul Eggleton
2012-04-10 23:25 ` Richard Purdie
@ 2012-04-10 23:39 ` Richard Purdie
1 sibling, 0 replies; 5+ messages in thread
From: Richard Purdie @ 2012-04-10 23:39 UTC (permalink / raw)
To: Paul Eggleton; +Cc: bitbake-devel
On Thu, 2012-04-05 at 18:07 +0100, Paul Eggleton wrote:
> If you have PREMIRRORS set up to point to a local directory, the local
> download function does nothing and always succeeds and the mirror code
> was writing a .done stamp regardless, thus the checksum verification was
> being skipped even if the file wasn't actually copied from the mirror.
>
> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
> ---
> lib/bb/fetch2/__init__.py | 7 ++++---
> 1 files changed, 4 insertions(+), 3 deletions(-)
Merged to master, thanks.
Richard
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] lib/bb/fetch2: don't skip checksums when local mirror enabled
2012-04-10 23:25 ` Richard Purdie
@ 2012-04-11 9:11 ` Paul Eggleton
2012-04-11 10:47 ` Gary Thomas
0 siblings, 1 reply; 5+ messages in thread
From: Paul Eggleton @ 2012-04-11 9:11 UTC (permalink / raw)
To: Richard Purdie; +Cc: bitbake-devel
On Wednesday 11 April 2012 00:25:24 Richard Purdie wrote:
> On Thu, 2012-04-05 at 18:07 +0100, Paul Eggleton wrote:
> > If you have PREMIRRORS set up to point to a local directory, the local
> > download function does nothing and always succeeds and the mirror code
> > was writing a .done stamp regardless, thus the checksum verification was
> > being skipped even if the file wasn't actually copied from the mirror.
> >
> > Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
> > ---
> >
> > lib/bb/fetch2/__init__.py | 7 ++++---
> > 1 files changed, 4 insertions(+), 3 deletions(-)
> >
> > diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
> > index e5c4b34..414cc2b 100644
> > --- a/lib/bb/fetch2/__init__.py
> > +++ b/lib/bb/fetch2/__init__.py
> >
> > @@ -476,9 +476,10 @@ def try_mirrors(d, origud, mirrors, check = False):
> > if not os.path.exists(ud.donestamp) or
ud.method.need_update(newuri, ud, ld):
> > ud.method.download(newuri, ud, ld)
> >
> > - open(ud.donestamp, 'w').close()
> > - if hasattr(ud.method,"build_mirror_data"):
> > - ud.method.build_mirror_data(newuri, ud, ld)
> > + if os.path.exists(ud.localpath):
> > + open(ud.donestamp, 'w').close()
> > + if hasattr(ud.method,"build_mirror_data"):
> > + ud.method.build_mirror_data(newuri, ud, ld)
> >
> > if not ud.localpath or not os.path.exists(ud.localpath):
> > continue
>
> I messed up some commands and this ended up merged with the following
> commit I manipulated:
>
> http://git.openembedded.org/bitbake/commit/?id=c9eed04c6275ef2c694f89e047f85
> c7de76f89b6
>
> Since its pushed at this point I'm not sure what options I have to undo
> it. Sorry :(
No worries - but does this fix in any way help with the problem Gary was
seeing?
Cheers,
Paul
--
Paul Eggleton
Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] lib/bb/fetch2: don't skip checksums when local mirror enabled
2012-04-11 9:11 ` Paul Eggleton
@ 2012-04-11 10:47 ` Gary Thomas
0 siblings, 0 replies; 5+ messages in thread
From: Gary Thomas @ 2012-04-11 10:47 UTC (permalink / raw)
To: Paul Eggleton; +Cc: bitbake-devel
On 2012-04-11 03:11, Paul Eggleton wrote:
> On Wednesday 11 April 2012 00:25:24 Richard Purdie wrote:
>> On Thu, 2012-04-05 at 18:07 +0100, Paul Eggleton wrote:
>>> If you have PREMIRRORS set up to point to a local directory, the local
>>> download function does nothing and always succeeds and the mirror code
>>> was writing a .done stamp regardless, thus the checksum verification was
>>> being skipped even if the file wasn't actually copied from the mirror.
>>>
>>> Signed-off-by: Paul Eggleton<paul.eggleton@linux.intel.com>
>>> ---
>>>
>>> lib/bb/fetch2/__init__.py | 7 ++++---
>>> 1 files changed, 4 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
>>> index e5c4b34..414cc2b 100644
>>> --- a/lib/bb/fetch2/__init__.py
>>> +++ b/lib/bb/fetch2/__init__.py
>>>
>>> @@ -476,9 +476,10 @@ def try_mirrors(d, origud, mirrors, check = False):
>>> if not os.path.exists(ud.donestamp) or
> ud.method.need_update(newuri, ud, ld):
>>> ud.method.download(newuri, ud, ld)
>>>
>>> - open(ud.donestamp, 'w').close()
>>> - if hasattr(ud.method,"build_mirror_data"):
>>> - ud.method.build_mirror_data(newuri, ud, ld)
>>> + if os.path.exists(ud.localpath):
>>> + open(ud.donestamp, 'w').close()
>>> + if hasattr(ud.method,"build_mirror_data"):
>>> + ud.method.build_mirror_data(newuri, ud, ld)
>>>
>>> if not ud.localpath or not os.path.exists(ud.localpath):
>>> continue
>>
>> I messed up some commands and this ended up merged with the following
>> commit I manipulated:
>>
>> http://git.openembedded.org/bitbake/commit/?id=c9eed04c6275ef2c694f89e047f85
>> c7de76f89b6
>>
>> Since its pushed at this point I'm not sure what options I have to undo
>> it. Sorry :(
>
> No worries - but does this fix in any way help with the problem Gary was
> seeing?
No, it does not. See https://lists.yoctoproject.org/pipermail/poky/2012-April/007752.html
--
------------------------------------------------------------
Gary Thomas | Consulting for the
MLB Associates | Embedded world
------------------------------------------------------------
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-04-11 10:56 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-05 17:07 [PATCH] lib/bb/fetch2: don't skip checksums when local mirror enabled Paul Eggleton
2012-04-10 23:25 ` Richard Purdie
2012-04-11 9:11 ` Paul Eggleton
2012-04-11 10:47 ` Gary Thomas
2012-04-10 23:39 ` Richard Purdie
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.