summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2025-01-25 00:21:47 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-01-27 15:47:09 +0000
commitbc5d66e793b0750e540e9dac4608b8eb9644590e (patch)
tree4fd072a3ba50c07635d9872de5254b1640e85b3e
parentd456553ca3f44d6767ff871effed39f2c48bfbae (diff)
downloadpoky-bc5d66e793b0750e540e9dac4608b8eb9644590e.tar.gz
base-files: Drop /bin/sh dependency
Remove /bin/sh from bash RPROVIDES as this has a side-effect which confuses rpm package manager when also busybox provides /bin/sh and base-files depend on /bin/sh . The problem is broken down below. First, bash depends on base-files and bash pkg_postinst must run after base-files was installed, because it requires /etc/shells provided by base-files to be in place. Second, base-files depends on /bin/sh, which is provided by either bash or busybox in this case. This is the actual problem here, if bash is selected as /bin/sh provider, then there is cyclic dependency between bash and base-files, and that confuses dnf which may install the packages in the wrong order, bash first and base-files second . To make this worse, if busybox is also /bin/sh provider, it can and does happen that some systems pick busybox as the /bin/sh provider, while others pick bash as the /bin/sh provider, and that cyclic dependency does not always appear. Attempt to break this dependency, remove pre-inst script from the base-files recipe, which removes its dependency on /bin/sh and allows it to be installed very early, and always before bash. (From OE-Core rev: e71b64a9b22c7db316e92e78a4bce8b9f994a4ae) Signed-off-by: Marek Vasut <marex@denx.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-core/base-files/base-files_3.0.14.bb23
1 files changed, 0 insertions, 23 deletions
diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb b/meta/recipes-core/base-files/base-files_3.0.14.bb
index 8bcd91e699..60253fcd42 100644
--- a/meta/recipes-core/base-files/base-files_3.0.14.bb
+++ b/meta/recipes-core/base-files/base-files_3.0.14.bb
@@ -72,29 +72,6 @@ hostname = "${MACHINE}"
72 72
73BASEFILESISSUEINSTALL ?= "do_install_basefilesissue" 73BASEFILESISSUEINSTALL ?= "do_install_basefilesissue"
74 74
75# In previous versions of base-files, /run was a softlink to /var/run and the
76# directory was located in /var/volatlie/run. Also, /var/lock was a softlink
77# to /var/volatile/lock which is where the real directory was located. Now,
78# /run and /run/lock are the real directories. If we are upgrading, we may
79# need to remove the symbolic links first before we create the directories.
80# Otherwise the directory creation will fail and we will have circular symbolic
81# links.
82#
83pkg_preinst:${PN} () {
84 #!/bin/sh -e
85 if [ x"$D" = "x" ]; then
86 if [ -h "/var/lock" ]; then
87 # Remove the symbolic link
88 rm -f /var/lock
89 fi
90
91 if [ -h "/run" ]; then
92 # Remove the symbolic link
93 rm -f /run
94 fi
95 fi
96}
97
98do_install () { 75do_install () {
99 for d in ${dirs555}; do 76 for d in ${dirs555}; do
100 install -m 0555 -d ${D}$d 77 install -m 0555 -d ${D}$d