Skip to content

Commit

Permalink
allow value of GRUB_TERMINAL to be empty
Browse files Browse the repository at this point in the history
  • Loading branch information
leifliddy committed Aug 7, 2023
1 parent 493a11e commit af03a13
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
6 changes: 4 additions & 2 deletions kiwi/bootloader/config/grub2.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,10 @@ def post_init(self, custom_args):
if self.custom_args and 'config_options' in self.custom_args:
self.config_options = self.custom_args['config_options']

self.terminal = self.xml_state.get_build_type_bootloader_console() \
or 'gfxterm'
self.terminal = self.xml_state.get_build_type_bootloader_console()
if self.terminal is None:
self.terminal = 'gfxterm'

self.gfxmode = self.get_gfxmode('grub2')
self.theme = self.get_boot_theme()
self.timeout = self.get_boot_timeout_seconds()
Expand Down
2 changes: 1 addition & 1 deletion kiwi/schema/kiwi.rnc
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ vhd-tag-type = xsd:token {pattern = "[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}"}
groups-list = xsd:token {pattern = "[a-zA-Z0-9_\-\.:]+(,[a-zA-Z0-9_\-\.:]+)*"}
arch-name = xsd:token {pattern = "(x86_64|i586|i686|ix86|aarch64|arm64|armv5el|armv5tel|armv6hl|armv6l|armv7hl|armv7l|ppc|ppc64|ppc64le|s390|s390x|riscv64)(,(x86_64|i586|i686|ix86|aarch64|arm64|armv5el|armv5tel|armv6hl|armv6l|armv7hl|armv7l|ppc|ppc64|ppc64le|s390|s390x|riscv64))*"}
portnum-type = xsd:token {pattern = "(\d+|\d+/(udp|tcp))"}
grub_console = xsd:token {pattern = "(console|gfxterm|serial)( (console|gfxterm|serial))*"}
grub_console = xsd:token {pattern = "(\s*|console|gfxterm|serial)( (console|gfxterm|serial))*"}
fs_attributes = xsd:token {pattern = "(no-copy-on-write|synchronous-updates)(,(no-copy-on-write|synchronous-updates))*"}
package-version-type = xsd:token {pattern = "(0|[1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])(\.(0|[1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])){3}"}
simple-uri-type = xsd:token {pattern = "(file:|https:|http:|ftp:).*"}
Expand Down
2 changes: 1 addition & 1 deletion kiwi/schema/kiwi.rng
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
</define>
<define name="grub_console">
<data type="token">
<param name="pattern">(console|gfxterm|serial)( (console|gfxterm|serial))*</param>
<param name="pattern">(\s*|console|gfxterm|serial)( (console|gfxterm|serial))*</param>
</data>
</define>
<define name="fs_attributes">
Expand Down
6 changes: 3 additions & 3 deletions kiwi/xml_parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def parsexmlstring_(instring, parser=None, **kwargs):
try:
from generatedssuper import GeneratedsSuper
except ImportError as exp:

class GeneratedsSuper(object):
tzoff_pattern = re_.compile(r'(\+|-)((0\d|1[0-3]):[0-5]\d|14:00)$')
class _FixedOffsetTZ(datetime_.tzinfo):
Expand Down Expand Up @@ -426,7 +426,7 @@ def __eq__(self, other):
return self.__dict__ == other.__dict__
def __ne__(self, other):
return not self.__eq__(other)

def getSubclassFromModule_(module, class_):
'''Get the subclass of a class from a specific module.'''
name = class_.__name__ + 'Sub'
Expand Down Expand Up @@ -5606,7 +5606,7 @@ def validate_grub_console(self, value):
if not self.gds_validate_simple_patterns(
self.validate_grub_console_patterns_, value):
warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_grub_console_patterns_, ))
validate_grub_console_patterns_ = [['^(console|gfxterm|serial)( (console|gfxterm|serial))*$']]
validate_grub_console_patterns_ = [['^(\s*|console|gfxterm|serial)( (console|gfxterm|serial))*$']]
def hasContent_(self):
if (
self.bootloadersettings is not None
Expand Down

0 comments on commit af03a13

Please sign in to comment.