[bitbake-devel,1/2] fetch2: handle wildcards correctly when recording file checksums

Submitted by Paul Eggleton on April 8, 2014, 2:03 p.m. | Patch ID: 70295


Message ID 7e51acb042de9afc24a8d0001e67ce94d4cfb451.1396965331.git.paul.eggleton@linux.intel.com
State Accepted, archived
Headers show

Commit Message

Paul Eggleton April 8, 2014, 2:03 p.m.
The Local fetcher's localpath is returning the parent directory for a
wildcard match; we need to handle this and add the wildcard
specification so that we checksum the correct files.

Fixes [YOCTO #6127].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
 lib/bb/fetch2/__init__.py | 3 +++
 1 file changed, 3 insertions(+)

Patch hide | download patch | download mbox

diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
index 150f864..a9ab75e 100644
--- a/lib/bb/fetch2/__init__.py
+++ b/lib/bb/fetch2/__init__.py
@@ -932,6 +932,9 @@  def get_checksum_file_list(d):
         if ud and isinstance(ud.method, local.Local):
             f = ud.localpath
+            pth = ud.decodedurl
+            if '*' in pth:
+                f = os.path.join(os.path.abspath(f), pth)
             if f.startswith(dl_dir):
                 # The local fetcher's behaviour is to return a path under DL_DIR if it couldn't find the file anywhere else
                 if os.path.exists(f):