| Summary: | opkg upgrade script execute order | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Yocto Project Subprojects] opkg | Reporter: | betacentauri | ||||||||
| Component: | opkg | Assignee: | Alejandro del Castillo <alejandro.delcastillo> | ||||||||
| Status: | RESOLVED NOTABUG | QA Contact: | |||||||||
| Severity: | normal | ||||||||||
| Priority: | Undecided | ||||||||||
| Version: | 0.3.3 | ||||||||||
| Target Milestone: | --- | ||||||||||
| Hardware: | Other | ||||||||||
| OS: | Multiple | ||||||||||
| Whiteboard: | |||||||||||
| OS type for building Yocto: | --- | Type of Regression: | --- | ||||||||
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |||||||||
| Attachments: |
|
||||||||||
|
Description
betacentauri
2016-10-17 16:12:02 UTC
Created attachment 3488 [details]
Upgrade State Diagram
Created attachment 3489 [details]
Remove State Diagram
Created attachment 3490 [details]
Install State Diagram
The maintainer scripts execution order of opkg is the same one used by dpkg [1]. I attached the state diagrams used by opkg remove/install/upgrade operations, which is basically a simplified version of the dpkg states. The thing lacking on opkg is the failover states used in dpkg. On dpkg, if a "prerm upgrade" operation fails, then the new package prerm is called with 'failed-upgrade', which let's you potentially recover. However, none of those states are currently used by OE, so dpkg and opkg should fail in the same manner (not too familiar with rpm to know if that's the case there too). The caveat is that the dpkg backend completely disables prerm && postrm scripts during upgrades. So, in summary, I think opkg behavior is correct. For OE, we could either go with the nuclear option or make the scripts more robust (preferred). [1] https://wiki.debian.org/MaintainerScripts |