[OE-core] [PATCH] package_rpm.bbclass: support packaging of symlinks to directories
Christopher Larson
clarson at kergoth.com
Tue Feb 17 15:55:16 UTC 2015
On Tue, Feb 17, 2015 at 6:42 AM, Patrick Ohly <patrick.ohly at intel.com>
wrote:
> + # Treat all symlinks to directories as normal files.
> + # os.walk() lists them as directories.
> + for i, entry in enumerate(dirs):
> + if os.path.islink(os.path.join(rootpath, entry)):
> + del dirs[i]
> + files.append(entry)
> +
>
You're deleting elements of a list while you're iterating over it. I'm
fairly certain that will lead to pain, unless you explicitly ensure you're
operating against a copy: for i, entry in enumerate(list(dirs)):
--
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20150217/da715b2b/attachment-0002.html>
More information about the Openembedded-core
mailing list