When building core-image-minimal, with an additional package added that has a first-boot postinstall (mysql in this case), the postinstall scripts do not get run because the script does not find /var/lib/opkg/status (which was deleted because package-management is not enabled for this image).
This doesn't look like a bug... core-image-minimal does not have the package manager installed by default. However, in order to have opkg/dpkg postinstalls run at first boot, the package manger has to be installed on target. This is marked as a regression. I don't think this used to work, unless a solution similar to rpm's is used. I think this is an enhancement, not a bug. Changing status to NEEDINFO till I have the necessary info.
Patches sent on the ML for review.
I discovered that this is also a problem for the kernel labs, which use danny, so I think this patchset should also be pushed to danny. This is the bug affected: Bug 4423 - module autoload fails on danny when ipk is used So marking this as blocking that bug.
Patches merged to master: http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=b11f8183074857be5a5920f093b4298884eec805 http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=1ce182e79e6c588de4ca372587c0797bc0cb7e80 http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=98ce0b727baa359a1e6388dd570186099df3983a http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=76cd8a776b02385945ad13ce79bbe1c33d8bad9b http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=e4a136a6bd0a850284a3ab74e513c936c1641e78 http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=75070d70320dc6516acf53e4bb36e7a091459138 http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=d5f593c25f2a831fbdc97a0b864525e7409b587f
(In reply to comment #4) > Patches merged to master: > > http://git.yoctoproject.org/cgit.cgi/poky/commit/ > ?id=b11f8183074857be5a5920f093b4298884eec805 > http://git.yoctoproject.org/cgit.cgi/poky/commit/ > ?id=1ce182e79e6c588de4ca372587c0797bc0cb7e80 > http://git.yoctoproject.org/cgit.cgi/poky/commit/ > ?id=98ce0b727baa359a1e6388dd570186099df3983a > http://git.yoctoproject.org/cgit.cgi/poky/commit/ > ?id=76cd8a776b02385945ad13ce79bbe1c33d8bad9b > http://git.yoctoproject.org/cgit.cgi/poky/commit/ > ?id=e4a136a6bd0a850284a3ab74e513c936c1641e78 > http://git.yoctoproject.org/cgit.cgi/poky/commit/ > ?id=75070d70320dc6516acf53e4bb36e7a091459138 > http://git.yoctoproject.org/cgit.cgi/poky/commit/ > ?id=d5f593c25f2a831fbdc97a0b864525e7409b587f Are these planned for a danny merge as well? Or do we need to open a separate bug for danny?
Tom, are you sure this is the same bug? As far as I can tell the specific issue I reported is due to the postinstall rework that was done in the 1.4 cycle.
(In reply to comment #6) > Tom, are you sure this is the same bug? As far as I can tell the specific > issue I reported is due to the postinstall rework that was done in the 1.4 > cycle. Yeah, I hadn't noticed the details that this fix only applied to the reworked postinstall. Though the posted fix may or may not be the appropriate fix for the nonreworked postinstall, the problem seems to be the same e.g. a build of core-image-sato using the same metadata shows the postinstalls working fine and consequently the test module of 4423 being autoloaded as expected.
Reopening this because it's still a problem in danny and the same problem described here is blocking 4423. Rather than open a new bug with exactly the same description but with danny prepended, I just reopened this one and prepended danny instead. It seems that if there's already a patchset in master for this problem it should be applied to danny as well rather than wasting time on a different fix for danny. Comment 2 here seems to suggest that fixing this was an enhancement, since it wasn't a regression, so another alternative could be to just close 4423 as 'wontfix'.
The patchset for master is huge and highly dependent on other work that was done to refactor postinstalls, and could not be applied as-is to danny. This is why I think the danny issue is not the same one as this bug.
OK, fair enough. Do you have a sense of whether fixing this in danny would require a similar effort and do we care enough about it to spend the effort to fix it? If it's not fixing a regression, and is really therefore an enhancement, and we don't typically add enhancements to point releases, the question may answer itself, but I don't want to dispense with it that way if it's really an important thing to fix in danny.
Unfortunately, there's no easy fix for danny when ipk/dpkg package management is used. The rework I've done is necessary. The old run-postinsts package was useless because it was expecting that /var/lib/*pkg/ directory existed on the target. However, if the package manager is not deployed to target, this directory is removed at do_rootfs time. Hence, no delayed postinstalls will have a chance to run at first boot. So, this is not a fix for a problem introduced by the postinstall work in 1.4. ipk/dpkg had this problem and it was introduced a long time ago, when ROOTFS_POSTPROCESS_COMMAND += "remove_packaging_data_files ; " was put in core-image-minimal recipe. Without the metadata, the delayed postinstalls cannot run on target. So, one quick workaround for danny would be to remove this line from core-image-minimal recipe.
(In reply to comment #11) > Unfortunately, there's no easy fix for danny when ipk/dpkg package > management is used. The rework I've done is necessary. The old run-postinsts > package was useless because it was expecting that /var/lib/*pkg/ directory > existed on the target. However, if the package manager is not deployed to > target, this directory is removed at do_rootfs time. Hence, no delayed > postinstalls will have a chance to run at first boot. > > So, this is not a fix for a problem introduced by the postinstall work in > 1.4. ipk/dpkg had this problem and it was introduced a long time ago, when > ROOTFS_POSTPROCESS_COMMAND += "remove_packaging_data_files ; " was put in > core-image-minimal recipe. Without the metadata, the delayed postinstalls > cannot run on target. > > So, one quick workaround for danny would be to remove this line from > core-image-minimal recipe. OK, thanks for that info and your idea for a quick workaround. However, it sounds like a hack, and I already had a more direct hack to fix the original problem (changing modutils.sh to read /etc/modules-load.d). Neither sounds like something that would be accepted as a patch to danny, so I'm returning this bug to its original state. Since it seems this was never a problem for anyone until someone decided to run the kernel labs with ipk, it's probably not a priority to fix it in danny, especially as it's been fixed in master. If it really is a problem for anyone, we'll open a new bug specifically for danny with the same subject as this one.
OK, that sounds like the reasonable course for the moment. It's pretty surprising that this apparently went unnoticed for such a long time; FWIW I confirmed this morning that denzil suffered from the same problem.
This is still broken if opkg is installed into the image but package-management is disabled (not a particularly valid situation, but one that's easy to stumble into, and it seems to me it ought not to break running of postinstalls).
Fix for the 'package-management' disabled and opkg manually installed issue merged: http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=75a14923da1ba91eddde47f0907345c19c82d6f0
Switching to verified. Master branch. Commit ID: 5416b958be27fce1211af2e968df2779e730078d