All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Paul Eggleton <paul.eggleton@linux.intel.com>
Cc: bitbake-devel@lists.openembedded.org
Subject: Re: [PATCH] lib/bb/fetch2: don't skip checksums when local mirror enabled
Date: Wed, 11 Apr 2012 00:25:24 +0100	[thread overview]
Message-ID: <1334100324.10826.97.camel@ted> (raw)
In-Reply-To: <1333645638-9195-1-git-send-email-paul.eggleton@linux.intel.com>

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




  reply	other threads:[~2012-04-10 23:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2012-04-11  9:11   ` Paul Eggleton
2012-04-11 10:47     ` Gary Thomas
2012-04-10 23:39 ` Richard Purdie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1334100324.10826.97.camel@ted \
    --to=richard.purdie@linuxfoundation.org \
    --cc=bitbake-devel@lists.openembedded.org \
    --cc=paul.eggleton@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.