2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-22 09:32:21 +00:00

Tweak architecture override on import

This commit is contained in:
Jarrod Johnson 2023-01-31 15:57:41 -05:00
parent 340ccc422c
commit c687da4d5f

View File

@ -773,13 +773,15 @@ def generate_stock_profiles(defprofile, distpath, targpath, osname,
yout.write('# This manifest enables rebase to know original source of profile data and if any customizations have been done\n')
manifestdata = {'distdir': srcname, 'disthashes': hmap}
yout.write(yaml.dump(manifestdata, default_flow_style=False))
initrds = os.listdir('{0}/initramfs'.format(defprofile))
initrds = ['{0}/initramfs/{1}'.format(defprofile, initrd) for initrd in os.listdir('{0}/initramfs'.format(defprofile))]
if os.path.exists('{0}/initramfs/{1}'.format(defprofile, arch)):
initrds.extend(os.listdir('{0}/initramfs/{1}'.format(defprofile, arch)))
for initrd in initrds:
fullpath = '{0}/initramfs/{1}'.format(defprofile, initrd)
initrds.extend(['{0}/initramfs/{1}/{2}'.format(defprofile, arch, initrd) for initrd in os.listdir('{0}/initramfs/{1}'.format(defprofile, arch))])
for fullpath in initrds:
initrd = os.path.basename(fullpath)
if os.path.isdir(fullpath):
continue
if os.path.exists('{0}/boot/initramfs/{1}'.format(dirname, initrd)):
os.remove('{0}/boot/initramfs/{1}'.format(dirname, initrd))
os.symlink(fullpath,
'{0}/boot/initramfs/{1}'.format(dirname, initrd))
os.symlink(