On 1/24/25 1:43 PM, Alexander Kanavin wrote:
On Thu, 23 Jan 2025 at 21:12, Marek Vasut via lists.openembedded.org
<[email protected]> wrote:

  # Limit the RPROVIDES here to class target so that if usrmerge is enabled for 
nativesdk, it does not
  # include host system paths in /bin/
-RPROVIDES:${PN}:append:class-target = " ${@bb.utils.contains('DISTRO_FEATURES', 
'usrmerge', '/bin/sh /bin/bash', '', d)}"
+RPROVIDES:${PN}:append:class-target = " ${@bb.utils.contains('DISTRO_FEATURES', 
'usrmerge', '/bin/bash', '', d)}"

This was added for a reason (that you can find in git history), if we
partially remove it, then the reason will come back and bite us.

That's why there is [RFC] tag in subject.

What I'd like to understand is how bash's postinst is actually failing
when /etc/shells is not there yet:

grep -q "^${base_bindir}/bash$" $D${sysconfdir}/shells || echo
${base_bindir}/bash >> $D${sysconfdir}/shells

Grep will complain about the missing file /etc/shells .

I can totally imagine we can take the easy way out here for all the postinst scripts and do something like :

"
# Make sure $D${sysconfdir}/shells exists
touch $D${sysconfdir}/shells
# Remove previous bash entry (if any)
sed -i '/^${base_bindir}/bash$/ d' $D${sysconfdir}/shells
# Add new bash entry , now surely a singular one
echo ${base_bindir}/bash >> $D${sysconfdir}/shells
"

But I have the bad feeling that this would be hiding some deeper issue.

Basically you either need to show me how to reproduce the issue

I cannot, because so far this only happens in internal CI.
I am not able to reproduce it on multiple local build machines.

, or
show an error message you're getting

The grep -q fails on missing /etc/shells , because base-files which was supposed to add it was not installed yet.

, or an incorrect outcome on the
rootfs.
That incorrect rootfs will only contain /etc/shells from base-files , the base-files which were installed AFTER bash was installed already , which will be missing the bash entry because that was never added because the bash postinst ran before base-files was installed .

(and I still plan to reply to Khem and also got some hint from Martin Jansa, which I have yet to explore)
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#210222): 
https://lists.openembedded.org/g/openembedded-core/message/210222
Mute This Topic: https://lists.openembedded.org/mt/110778651/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to