From: Paul Eggleton <paul.eggleton@linux.intel.com>
To: bitbake-devel@lists.openembedded.org
Subject: [PATCH] lib/bb/fetch2: don't skip checksums when local mirror enabled
Date: Thu, 5 Apr 2012 18:07:18 +0100 [thread overview]
Message-ID: <1333645638-9195-1-git-send-email-paul.eggleton@linux.intel.com> (raw)
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
next reply other threads:[~2012-04-05 17:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-05 17:07 Paul Eggleton [this message]
2012-04-10 23:25 ` [PATCH] lib/bb/fetch2: don't skip checksums when local mirror enabled Richard Purdie
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=1333645638-9195-1-git-send-email-paul.eggleton@linux.intel.com \
--to=paul.eggleton@linux.intel.com \
--cc=bitbake-devel@lists.openembedded.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox