summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorIoan-Adrian Ratiu <adrian.ratiu@ni.com>2016-04-01 17:31:19 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-04-03 15:51:36 +0100
commit5cabf3b061fd7f3d17d734a1c9ffb831fff15587 (patch)
tree96f4d806c820747c540806db67a8b93ad5bbfc6f /scripts
parent5c60c3621487248920d7229b9a19848752af4480 (diff)
downloadpoky-5cabf3b061fd7f3d17d734a1c9ffb831fff15587.tar.gz
wic/isoimage-isohybrid.py: use glob to find initramfs location
Some filenames can omit 'initramfs', or use other names. This makes detection more flexible by using only the image name, machine arch and image type in a glob wildcard. (From OE-Core rev: ca516f5907a661606c35e1ca5c2ece9fc79c77ea) Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/wic/plugins/source/isoimage-isohybrid.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
index 31dc9b6ce6..de99ad8495 100644
--- a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
+++ b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
@@ -23,6 +23,7 @@
23import os 23import os
24import re 24import re
25import shutil 25import shutil
26import glob
26 27
27from wic import msger 28from wic import msger
28from wic.pluginbase import SourcePlugin 29from wic.pluginbase import SourcePlugin
@@ -150,8 +151,7 @@ class IsoImagePlugin(SourcePlugin):
150 if not machine_arch: 151 if not machine_arch:
151 msger.error("Couldn't find MACHINE_ARCH, exiting.\n") 152 msger.error("Couldn't find MACHINE_ARCH, exiting.\n")
152 153
153 initrd = "%s/%s-initramfs-%s.%s" \ 154 initrd = glob.glob('%s/%s*%s.%s' % (initrd_dir, image_name, machine_arch, image_type))[0]
154 % (initrd_dir, image_name, machine_arch, image_type)
155 155
156 if not os.path.exists(initrd): 156 if not os.path.exists(initrd):
157 # Create initrd from rootfs directory 157 # Create initrd from rootfs directory