summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2012-12-06 12:53:14 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-12-11 15:54:36 +0000
commit348897358736c28240c084affaca5b4e2fbe499a (patch)
treed4dc114802e6237f1937af799ab7f4e871228e35 /meta
parentec17940f7236a47983f2f1dc0208652a0b550c82 (diff)
downloadpoky-348897358736c28240c084affaca5b4e2fbe499a.tar.gz
package.bbclass: make do_split_packages handle non-existent root directories
This function has different behaviour if the split directory doesn't exist depending on the recursive argument: non-recursive uses os.listdirs which throws an exception, recursive uses os.walk which doesn't. do_split_packages should silently handle non-existent directories because it's mainly used for plugin directories, which may end up being empty though changing the distro configuration (for example, connman without wifi distro feature). So, add an early exit if the split root doesn't exist. (From OE-Core rev: 937101e3fdd6afd00f6f8a8be411a67110c4ae78) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/package.bbclass8
1 files changed, 7 insertions, 1 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 993ce98782..8a94e30aed 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -116,6 +116,13 @@ def do_split_packages(d, root, file_regex, output_pattern, description, postinst
116 116
117 """ 117 """
118 118
119 dvar = d.getVar('PKGD', True)
120
121 # If the root directory doesn't exist, don't error out later but silently do
122 # no splitting.
123 if not os.path.exists(dvar + root):
124 return
125
119 ml = d.getVar("MLPREFIX", True) 126 ml = d.getVar("MLPREFIX", True)
120 if ml: 127 if ml:
121 if not output_pattern.startswith(ml): 128 if not output_pattern.startswith(ml):
@@ -130,7 +137,6 @@ def do_split_packages(d, root, file_regex, output_pattern, description, postinst
130 if newdeps: 137 if newdeps:
131 extra_depends = " ".join(newdeps) 138 extra_depends = " ".join(newdeps)
132 139
133 dvar = d.getVar('PKGD', True)
134 140
135 packages = d.getVar('PACKAGES', True).split() 141 packages = d.getVar('PACKAGES', True).split()
136 142