diff options
author | Mike Looijmans <mike.looijmans@topic.nl> | 2015-09-15 11:50:39 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-09-23 09:53:10 +0100 |
commit | 9241ec579309e9d27e9391815a167911d20b38c1 (patch) | |
tree | fb9dcf8f482caaad99511cbacfa299cb981db48f | |
parent | 266e417bb8a73167b1fdef24f5ae6184f1d48e73 (diff) | |
download | poky-9241ec579309e9d27e9391815a167911d20b38c1.tar.gz |
image_types.bbclass: Don't try to create ubi symlink twice
Fixes b6e64de541b37 "Restore compatibility with previous UBI filesystems"
The multivolume UBI code creates symlinks for each volume. If the volume name
is empty, it will create a symlink that the rootfs code will attempt to
create again later, resulting in a crash like this (unless IMAGE_LINK_NAME
is blank):
ERROR: Error executing a python function in .../recipes-core/images/my-image.bb:
File: '.../oe-core/meta/lib/oe/image.py', lineno: 203, function: _create_symlinks
*** 0203: os.symlink(src, dst)
Exception: OSError: [Errno 17] File exists
To prevent this from happening, only create symlinks to volumes that have
a name, and let the rootfs script create the default symlink later.
(From OE-Core rev: fce257892488b9ef537526ccf412e9deda37c439)
Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/image_types.bbclass | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass index 306403e310..afa2e8eb8f 100644 --- a/meta/classes/image_types.bbclass +++ b/meta/classes/image_types.bbclass | |||
@@ -139,17 +139,19 @@ multiubi_mkfs() { | |||
139 | # Cleanup cfg file | 139 | # Cleanup cfg file |
140 | mv ubinize${vname}.cfg ${DEPLOY_DIR_IMAGE}/ | 140 | mv ubinize${vname}.cfg ${DEPLOY_DIR_IMAGE}/ |
141 | 141 | ||
142 | # Create own symlink | 142 | # Create own symlinks for 'named' volumes |
143 | cd ${DEPLOY_DIR_IMAGE} | 143 | if [ -n "$vname" ]; then |
144 | if [ -e ${IMAGE_NAME}${vname}.rootfs.ubifs ]; then | 144 | cd ${DEPLOY_DIR_IMAGE} |
145 | ln -sf ${IMAGE_NAME}${vname}.rootfs.ubifs \ | 145 | if [ -e ${IMAGE_NAME}${vname}.rootfs.ubifs ]; then |
146 | ${IMAGE_LINK_NAME}${vname}.ubifs | 146 | ln -sf ${IMAGE_NAME}${vname}.rootfs.ubifs \ |
147 | fi | 147 | ${IMAGE_LINK_NAME}${vname}.ubifs |
148 | if [ -e ${IMAGE_NAME}${vname}.rootfs.ubi ]; then | 148 | fi |
149 | ln -sf ${IMAGE_NAME}${vname}.rootfs.ubi \ | 149 | if [ -e ${IMAGE_NAME}${vname}.rootfs.ubi ]; then |
150 | ${IMAGE_LINK_NAME}${vname}.ubi | 150 | ln -sf ${IMAGE_NAME}${vname}.rootfs.ubi \ |
151 | ${IMAGE_LINK_NAME}${vname}.ubi | ||
152 | fi | ||
153 | cd - | ||
151 | fi | 154 | fi |
152 | cd - | ||
153 | } | 155 | } |
154 | 156 | ||
155 | IMAGE_CMD_multiubi () { | 157 | IMAGE_CMD_multiubi () { |