| Summary: | opkg install reads all files on rootfs? | ||
|---|---|---|---|
| Product: | [Yocto Project Subprojects] opkg | Reporter: | Robert Berger <pokylinux> |
| Component: | opkg | Assignee: | Alejandro del Castillo <alejandro.delcastillo> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | Undecided | CC: | michael.j.hansen, stephano |
| Version: | 0.3.5 | ||
| Target Milestone: | 0.4.0 | ||
| Hardware: | All | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | Don't know | |
|
Description
Robert Berger
2018-04-04 05:14:42 UTC
Today, I took a look at this and your right, this is a regression from 0.3.4. On commit 492dd1, the file mode (returned by lstat) was added to the list of things to track on a file. However, the mode information is not persisted, so opkg calls lstat on every installed file every time it runs, which is causing the performance slowdown. Michael: I think we talked about possibly persisting the mode in the *.list file at some point? I remember there were concerns about backwards compatibility. Since the performance hit is too big, we might need to add a check to use the new format if present, the old if not. The drawback would be that tools that read the *.list file might break if we change the format...but I think I am OK with that since the *.list files are a detail implementation of opkg, with no guarantees of it staying the same. @Alejandro del Castillo: I don't quite understand what the reading of every file is needed for. Does it build some database? Also I was wondering if this could be done when we build the image on the host and not on identical targets once on every target. The following patchset can give you context: https://groups.google.com/forum/#!topic/opkg-devel/afrFJrAva-I. The file mode for every file is a piece of metadata that is now needed, but is not being persisted. We should persist that information to avoid the expensive lstat call on every installed file. fixed on commit 99c89c64665670a5547294e826bc709e218b1bd3 (Michael Hansen) fixed |