grub2/0197-gentpl-add-disable-support.patch
Javier Martinez Canillas 1f092caba7
Drop two efinet patches that were causing issues and a bunch of other fixes
Add comments and revert logic changes in 01_fallback_counting
Remove quotes when reading ID value from /etc/os-release
  Related: rhbz#1650706
blscfg: expand grub_users before passing to grub_normal_add_menu_entry()
  Resolves: rhbz#1650706
Drop buggy downstream patch "efinet: retransmit if our device is busy"
  Resolves: rhbz#1649048
Make the menu entry users option argument to be optional
  Related: rhbz#1652434
10_linux_bls: add missing menu entries options
  Resolves: rhbz#1652434
Drop "Be more aggro about actually using the *configured* network device."
  Resolves: rhbz#1654388
Fix menu entry selection based on title
  Resolves: rhbz#1654936

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2018-12-01 03:28:36 +01:00

47 lines
1.5 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Wed, 11 Jul 2018 13:43:15 -0400
Subject: [PATCH] gentpl: add 'disable = ' support
Signed-off-by: Peter Jones <pjones@redhat.com>
---
gentpl.py | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/gentpl.py b/gentpl.py
index bf8439fa743..a8cd540550f 100644
--- a/gentpl.py
+++ b/gentpl.py
@@ -589,11 +589,21 @@ def platform_conditional(platform, closure):
# };
#
def foreach_enabled_platform(defn, closure):
+ enabled = False
+ disabled = False
if 'enable' in defn:
+ enabled = True
for platform in GRUB_PLATFORMS:
if platform_tagged(defn, platform, "enable"):
platform_conditional(platform, closure)
- else:
+
+ if 'disable' in defn:
+ disabled = True
+ for platform in GRUB_PLATFORMS:
+ if not platform_tagged(defn, platform, "disable"):
+ platform_conditional(platform, closure)
+
+ if not enabled and not disabled:
for platform in GRUB_PLATFORMS:
platform_conditional(platform, closure)
@@ -652,6 +662,8 @@ def first_time(defn, snippet):
def is_platform_independent(defn):
if 'enable' in defn:
return False
+ if 'disable' in defn:
+ return False
for suffix in [ "", "_nodist" ]:
template = platform_values(defn, GRUB_PLATFORMS[0], suffix)
for platform in GRUB_PLATFORMS[1:]: