[OE-core] [RFC] opkg: avoid running postinst scripts twice when using systemd

Stefan Agner stefan at agner.ch
Thu Dec 14 14:57:47 UTC 2017


On 2017-12-14 15:55, Alexander Kanavin wrote:
> On 12/14/2017 04:41 PM, Stefan Agner wrote:
> 
>> I think removing the Opkg first boot systemd service (as the initial
>> patch does) is the correct first step.
>>
>> However, it currently still leads to a second copy of the postinst
>> scripts in /etc if package management is enabled.
>> I am pretty sure that adding if delayed_postinsts and not
>> runtime_pkgmanage: should resolve the problem for ipk/deb fully: With
>> that run-postinsts will run "opkg configure"/"dpkg --configure -a"
>> respectively when package management is installed, and those command
>> will run all postinst correctly.
> 
> Why is the second copy a problem? Can you elaborate? Don't describe
> the fix, describe the issue.
> 
> From what I can see, run-postinsts will execute opkg configure if opkg
> is available, or run the scripts directly if opkg is not available -
> which is fine. Why do you need to avoid saving the scripts in /etc if
> opkg is installed?

No, it will call the scripts in /etc/*-postinsts (it bails out of the
for loop if the post inst dir is there...)

Then opkg status file still shows the packages as just "unpacked". When
running the package manager (e.g. to install an unrelated package) opkg
starts to handle the postinst again...

Rather than updating the package managers database etc I rather feel we
should just not do the OE specific postinst if package management can
handle it.

--
Stefan



More information about the Openembedded-core mailing list