pungi/hack-ppc-yaboot.patch

34 lines
1.4 KiB
Diff
Raw Normal View History

blerg. yaboot freaks out if there's any slashes in its config, so we
can't boot anything with non-ascii characters in the volume name. So we
need to remove all non-ascii chars, and do it the same way lorax does
it.
This is why lorax and pungi shouldn't both be building bootable images.
---
src/pypungi/__init__.py | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/pypungi/__init__.py b/src/pypungi/__init__.py
index 1ef3b8d..dac76dd 100644
--- a/src/pypungi/__init__.py
+++ b/src/pypungi/__init__.py
@@ -1055,8 +1055,13 @@ class Pungi(pypungi.PungiBase):
# NOTE: if this doesn't match what's in the bootloader config, the
# image won't be bootable!
extraargs.append('-V')
- extraargs.append('%s %s %s' % (self.config.get('pungi', 'name'),
- self.config.get('pungi', 'version'), self.config.get('pungi', 'arch')))
+ cdlabel = '%s %s %s' % (self.config.get('pungi', 'name'),
+ self.config.get('pungi', 'version'),
+ self.config.get('pungi', 'arch'))
+ if self.config.get('pungi', 'arch').startswith('ppc'):
+ # special case for PPC, because yaboot is terrible
+ cdlabel = ''.join(ch if ch.isalnum() else '_' for ch in cdlabel)
+ extraargs.append(cdlabel)
extraargs.extend(['-o', isofile])
--
1.7.7.6