<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>6127</bug_id>
          
          <creation_ts>2014-04-08 02:24:44 +0000</creation_ts>
          <short_desc>Problem with globs in SRC_URI</short_desc>
          <delta_ts>2014-04-09 14:33:21 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>BitBake</product>
          <component>bitbake</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Undecided</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jacob Kroon">jacob.kroon</reporter>
          <assigned_to name="Paul Eggleton">bluelightning</assigned_to>
          <cc>bluelightning</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>42353</commentid>
    <comment_count>0</comment_count>
    <who name="Jacob Kroon">jacob.kroon</who>
    <bug_when>2014-04-08 02:24:44 +0000</bug_when>
    <thetext>I&apos;ve run into a strange problem on master. I have a recipe:

test-bug.bb
===========
LICENSE = &quot;CLOSED&quot;

SRC_URI = &quot;\
    file://a \
    file://dir/* \
&quot;
============

The accompaning test-bug/ folder looks like:
test-bug/a
test-bug/b
test-bug/dir
test-bug/dir/c

Note the extra file &quot;b&quot;, which is not specified in the SRC_URI.

Adding debug prints according to the patch at the bottom of this report gives me the following output:

WARNING: #1 /home/jkroon/Projects/oe-devel/meta-monkey/recipes/test-bug/a /home/jkroon/Projects/oe-devel/meta-monkey/recipes/test-bug/.
WARNING: #2 /home/jkroon/Projects/oe-devel/meta-monkey/recipes/test-bug/a
WARNING: #5 /home/jkroon/Projects/oe-devel/meta-monkey/recipes/test-bug/a
WARNING: #2 /home/jkroon/Projects/oe-devel/meta-monkey/recipes/test-bug/.
WARNING: #4 /home/jkroon/Projects/oe-devel/meta-monkey/recipes/test-bug/./a
WARNING: #4 /home/jkroon/Projects/oe-devel/meta-monkey/recipes/test-bug/./b
WARNING: #4 /home/jkroon/Projects/oe-devel/meta-monkey/recipes/test-bug/./dir/c

and running bitbake-diffsigs on the resulting test-bug:do_fetch signature gives me:

This task depends on the checksums of files: [
(&apos;a&apos;, &apos;b026324c6904b2a9cb4b88d6d61c81d1&apos;),
(&apos;a&apos;, &apos;b026324c6904b2a9cb4b88d6d61c81d1&apos;),
(&apos;b&apos;, &apos;26ab0db90d72e28ad0ba1e22ee510510&apos;),
(&apos;c&apos;, &apos;6d7fce9fee471194aa8b5b6e47267f03&apos;)
]

&apos;a&apos; is duplicated, and &apos;b&apos; is included although I assume it shouldn&apos;t be.

The debug prints I&apos;ve added are:

diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
index 8e5342f..15f4081 100644
--- a/lib/bb/fetch2/__init__.py
+++ b/lib/bb/fetch2/__init__.py
@@ -961,13 +961,16 @@ def get_file_checksums(filelist, pn):
         return checksum
 
     checksums = []
+    bb.warn(&quot;#1 &quot; + filelist)
     for pth in filelist.split():
         checksum = None
+        bb.warn(&quot;#2 &quot; + pth)
         if &apos;*&apos; in pth:
             # Handle globs
             for f in glob.glob(pth):
                 checksum = checksum_file(f)
                 if checksum:
+                    bb.warn(&quot;#3 &quot; + f)
                     checksums.append((f, checksum))
             continue
         elif os.path.isdir(pth):
@@ -977,12 +980,14 @@ def get_file_checksums(filelist, pn):
                     fullpth = os.path.join(root, name)
                     checksum = checksum_file(fullpth)
                     if checksum:
+                        bb.warn(&quot;#4 &quot; + fullpth)
                         checksums.append((fullpth, checksum))
             continue
         else:
             checksum = checksum_file(pth)
 
         if checksum:
+            bb.warn(&quot;#5 &quot; + pth)
             checksums.append((pth, checksum))
 
     checksums.sort(key=operator.itemgetter(1))

I&apos;ve tried tracing backwards trying to understand why the &apos;*&apos; gets replaced with a &apos;.&apos;, but I get lost in the cache code.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>42381</commentid>
    <comment_count>1</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2014-04-08 14:14:33 +0000</bug_when>
    <thetext>I&apos;ve sent a fix for this to the bitbake-devel list, however it seems like the checksum collection is not the only place where this problem is evident - see bug 6128 (and also bug 6129).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>42448</commentid>
    <comment_count>2</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2014-04-09 14:33:21 +0000</bug_when>
    <thetext>Fix merged to master:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=991af87183719bc3920e4edef38d5c75ac6824df</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>