aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-installer/anaconda/files/0050-tweak-search-location-of-new-kernel-pkg.patch
blob: 8968ea9cb7ccd5471eacfe59467d520de2994704 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
From 8359a3ebd9fcb5324a645fe147030482f35437b4 Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
Date: Sat, 29 Jun 2019 16:15:14 +0800
Subject: [PATCH] tweak search location of new-kernel-pkg

In OE, it locates /sbin rather than /usr/sbin

Upstream-Status: Inappropriate [oe specific]

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 pyanaconda/payload/__init__.py    | 2 +-
 pyanaconda/payload/livepayload.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/pyanaconda/payload/__init__.py b/pyanaconda/payload/__init__.py
index 4fb40cb..8b48625 100644
--- a/pyanaconda/payload/__init__.py
+++ b/pyanaconda/payload/__init__.py
@@ -563,7 +563,7 @@ class Payload(metaclass=ABCMeta):
 
         :returns: None
         """
-        if os.path.exists(util.getSysroot() + "/usr/sbin/new-kernel-pkg"):
+        if os.path.exists(util.getSysroot() + "/sbin/new-kernel-pkg"):
             use_dracut = False
         else:
             log.warning("new-kernel-pkg does not exist - grubby wasn't installed? "
diff --git a/pyanaconda/payload/livepayload.py b/pyanaconda/payload/livepayload.py
index 235a3b5..6a8d345 100644
--- a/pyanaconda/payload/livepayload.py
+++ b/pyanaconda/payload/livepayload.py
@@ -200,7 +200,7 @@ class LiveImagePayload(Payload):
             util.execInSysroot("systemd-machine-id-setup", [])
 
         for kernel in self.kernel_version_list:
-            if not os.path.exists(util.getSysroot() + "/usr/sbin/new-kernel-pkg"):
+            if not os.path.exists(util.getSysroot() + "/sbin/new-kernel-pkg"):
                 log.info("Regenerating BLS info for %s", kernel)
                 util.execInSysroot("kernel-install", ["add",
                                                       kernel,
-- 
2.7.4