Bug 1676

Summary: package.bbclass does not handle files with wildcards in their names well
Product: [Build System, Metadata & Runtime] Meta-yocto Reporter: Paul Eggleton <bluelightning>
Component: meta-yoctoAssignee: Paul Eggleton <bluelightning>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: alexandrux.palalau, poky.bs.watcher, poky.watcher, sgw
Version: unspecified   
Target Milestone: 1.6 M1   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Paul Eggleton 2011-10-14 03:09:54 UTC
If a file to be packaged contains a wildcard (e.g. *) in its name, there is another file which would match the expression that the wildcarded filename produces, and that wildcarded filename ends up in a FILES_ variable (e.g. when do_split_packages() is used) then populate_packages() can end up looping forever.

Obviously the use of wildcards in actual filenames is extremely ill-advised, however I came across this problem when trying to write a recipe for Webmin (the issue being with the file logrotate/config-*-linux which also matches logrotate/config-open-linux) so there are packages out there in the wild that unfortunately have this issue. An obvious workaround would be to just rename the file to something more sensible, however there's no guarantee that more of these files won't be added in later versions, and stalling forever is not really a good failure mode.
Comment 1 Paul Eggleton 2012-03-30 15:02:31 UTC
I have a tentative fix for this but it's too risky to slip into 1.2, especially given how uncommon this issue will be. Moving to 1.3.
Comment 2 Saul Wold 2013-04-30 22:31:41 UTC
Is the fix available?  It has already slipped from 1.2 -> 1.3 -> 1.4 now -> 1.5!
Comment 3 Paul Eggleton 2013-10-01 16:20:16 UTC
You're right, this has slipped; I am now testing a much more straightforward fix and should be able to send it soon.
Comment 4 Paul Eggleton 2013-10-03 16:52:34 UTC
Patch sent for review, but I don't expect it to go into 1.5.
Comment 6 Alexandru Palalau 2014-01-08 15:06:30 UTC
Paul, I could not reproduce this behavior.
Used * in name for webmin file that should match logrotate files but nothing happened.
The same behavior before and after patch merge to master branch.
Could you please give me a hint on this matter.
Comment 7 Paul Eggleton 2014-01-08 15:40:18 UTC
What exactly did you do to test this?
Comment 8 Alexandru Palalau 2014-01-09 08:15:03 UTC
Just added a new config-*-linux file to sources and pointed the new location of the tar.gz in the webmin recipe.
Then bitbake webmin and logrotate.
I guess i'm missing a step or something...
Comment 9 Paul Eggleton 2014-01-09 09:55:48 UTC
Probably an easier test would be to just disable the workarounds in the webmin recipe for the problem and see if do_package completes.
Comment 10 Alexandru Palalau 2014-01-09 14:07:45 UTC
Switching to verified. 
Commit ID: 6ee5d95317de77c1cfb6db6f1ab2de77f5fa085e
@Paul: commenting the workaround reproduced the loop.