Openembedded Bitbake Development
 help / color / mirror / Atom feed
* [PATCH 0/2] Fixes for the fetcher
@ 2013-06-20  9:35 Peter Kjellerstedt
  2013-06-20  9:35 ` [PATCH 1/2] Allow checksums to be used for files retrieved using SFTP Peter Kjellerstedt
  2013-06-20  9:35 ` [PATCH 2/2] Correct a typo Peter Kjellerstedt
  0 siblings, 2 replies; 3+ messages in thread
From: Peter Kjellerstedt @ 2013-06-20  9:35 UTC (permalink / raw)
  To: bitbake-devel

We need the SFTP fetcher for one of our recipes. As it turned out when I
wrote the recipe, the fetcher failed to retrieve the sources because it
wanted me to specify checksums for them. However, the checksums _were_
specified in the recipe.

After examining the code for the fetcher, it turned out that the list of
fetchers that expect a checksum is hardcoded in the constructor of
FetchData in lib/bb/fetch2/__init__.py, whereas verify_checksum() uses
ud.method.supports_checksum() and ud.method.recommends_checksum() to
determine if a checksum is needed. Needless to say, this of course
failed as the hardcoded values did not match reality.

This patch updates the list of hardcoded fetchers to include SFTP, but I
consider it more of a bandage, and someone with better Python skills
than mine should rewrite the constructor to not use a hardcoded list.

//Peter

The following changes since commit efb8a460d2a977dbd481a0650fba8eb637c65bec:

  package.bbclass: Fix sources contents (2013-05-14 08:52:47 +0300)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib pkj/fetch_sftp
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=pkj/fetch_sftp

Peter Kjellerstedt (2):
  Allow checksums to be used for files retrieved using SFTP
  Correct a typo

 bitbake/lib/bb/fetch2/__init__.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

-- 
1.8.2.1



^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/2] Allow checksums to be used for files retrieved using SFTP
  2013-06-20  9:35 [PATCH 0/2] Fixes for the fetcher Peter Kjellerstedt
@ 2013-06-20  9:35 ` Peter Kjellerstedt
  2013-06-20  9:35 ` [PATCH 2/2] Correct a typo Peter Kjellerstedt
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Kjellerstedt @ 2013-06-20  9:35 UTC (permalink / raw)
  To: bitbake-devel

---
 bitbake/lib/bb/fetch2/__init__.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index dd1cc93..bf0ec45 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -976,13 +976,13 @@ class FetchData(object):
             self.sha256_name = "sha256sum"
         if self.md5_name in self.parm:
             self.md5_expected = self.parm[self.md5_name]
-        elif self.type not in ["http", "https", "ftp", "ftps"]:
+        elif self.type not in ["http", "https", "ftp", "ftps", "sftp"]:
             self.md5_expected = None
         else:
             self.md5_expected = d.getVarFlag("SRC_URI", self.md5_name)
         if self.sha256_name in self.parm:
             self.sha256_expected = self.parm[self.sha256_name]
-        elif self.type not in ["http", "https", "ftp", "ftps"]:
+        elif self.type not in ["http", "https", "ftp", "ftps", "sftp"]:
             self.sha256_expected = None
         else:
             self.sha256_expected = d.getVarFlag("SRC_URI", self.sha256_name)
-- 
1.8.2.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] Correct a typo
  2013-06-20  9:35 [PATCH 0/2] Fixes for the fetcher Peter Kjellerstedt
  2013-06-20  9:35 ` [PATCH 1/2] Allow checksums to be used for files retrieved using SFTP Peter Kjellerstedt
@ 2013-06-20  9:35 ` Peter Kjellerstedt
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Kjellerstedt @ 2013-06-20  9:35 UTC (permalink / raw)
  To: bitbake-devel

---
 bitbake/lib/bb/fetch2/__init__.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index bf0ec45..ecd9b40 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -1091,7 +1091,7 @@ class FetchMethod(object):
     def recommends_checksum(self, urldata):
         """
         Is the backend on where checksumming is recommended (should warnings 
-        by displayed if there is no checksum)?
+        be displayed if there is no checksum)?
         """
         return False
 
-- 
1.8.2.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-06-20  9:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-20  9:35 [PATCH 0/2] Fixes for the fetcher Peter Kjellerstedt
2013-06-20  9:35 ` [PATCH 1/2] Allow checksums to be used for files retrieved using SFTP Peter Kjellerstedt
2013-06-20  9:35 ` [PATCH 2/2] Correct a typo Peter Kjellerstedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox