Skip to contentSkip to conversation

bash: Provide /bin/{sh, bash} when usrmerge is used

PATCH In review Peter Kjellerstedt 2 participants 2 messages Apr 21, 2018 – Apr 23, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bash: Provide /bin/{sh, bash} when usrmerge is used

Most shell scripts have '#!/bin/{sh,bash}' on the first line of the script, which triggers RPM to automatically add a runtime dependency on that path for any package that contains shell scripts. However, when the usrmerge feature is enabled, the path will actually be /usr/bin/{sh,bash}.

So, to satisfy the runtime dependencies, add '/bin/{sh,bash}' to what the bash package provides.

---
 recipes-extended/bash/bash.inc | 2 ++
 1 file changed, 2 insertions(+)
recipes-extended/bash/bash.inc +2 -0
index a05b987..0f0d679 100644
@@ -65,3 +65,5 @@ pkg_postinst_${PN} () {
 pkg_postrm_${PN} () {
 	printf "$(grep -v "^${base_bindir}/bash$" $D${sysconfdir}/shells)\n" > $D${sysconfdir}/shells
 }
+
+RPROVIDES_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', '/bin/sh /bin/bash', '', d)}"
Signature · 1 line
2.12.0
#1 lore raw

Pushed, thanks.

Ross

Quoted 32 lines · Peter Kjellerstedt

Most shell scripts have '#!/bin/{sh,bash}' on the first line of the script, which triggers RPM to automatically add a runtime dependency on that path for any package that contains shell scripts. However, when the usrmerge feature is enabled, the path will actually be /usr/bin/{sh,bash}.

So, to satisfy the runtime dependencies, add '/bin/{sh,bash}' to what the bash package provides.

---
 recipes-extended/bash/bash.inc | 2 ++
 1 file changed, 2 insertions(+)
recipes-extended/bash/bash.inc +2 -1
index a05b987..0f0d679 100644
@@ -65,3 +65,5 @@ pkg_postinst_${PN} () {
 pkg_postrm_${PN} () {
        printf "$(grep -v "^${base_bindir}/bash$" $D${sysconfdir}/shells)\n" > $D${sysconfdir}/shells
 }
+
+RPROVIDES_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', '/bin/sh /bin/bash', '', d)}"
--

2.12.0

--
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto