summaryrefslogtreecommitdiff
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:08 +0100
commitca516f5907a661606c35e1ca5c2ece9fc79c77ea (patch)
tree5023d7045b41079f130bafa5ff4e927f92caa3b5 /scripts
parent70d8cb61b03aa9214fe0e1990ab9500888d9f565 (diff)
downloadopenembedded-core-ca516f5907a661606c35e1ca5c2ece9fc79c77ea.tar.gz
openembedded-core-ca516f5907a661606c35e1ca5c2ece9fc79c77ea.tar.bz2
openembedded-core-ca516f5907a661606c35e1ca5c2ece9fc79c77ea.zip
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. 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 @@
import os
import re
import shutil
+import glob
from wic import msger
from wic.pluginbase import SourcePlugin
@@ -150,8 +151,7 @@ class IsoImagePlugin(SourcePlugin):
if not machine_arch:
msger.error("Couldn't find MACHINE_ARCH, exiting.\n")
- initrd = "%s/%s-initramfs-%s.%s" \
- % (initrd_dir, image_name, machine_arch, image_type)
+ initrd = glob.glob('%s/%s*%s.%s' % (initrd_dir, image_name, machine_arch, image_type))[0]
if not os.path.exists(initrd):
# Create initrd from rootfs directory