mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 21:09:03 +02:00
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>
This commit is contained in:
parent
5c60c36214
commit
5cabf3b061
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user