ipkg主页: http://handhelds.org/moin/moin.cgi/Ipkg
1.
ipkg的软件包管理信息存储在/usr/lib/ipkg目录。
ipkg
--alternatives
--info
--lists
--status
2.关于"Post Install Scripts"
To add a post-installation script to a package, add a pkg_postinst_PACKAGENAME()
function to the .bb file where PACKAGENAME is the name of the package to attach the postinst script to. A post-installation function has the following structure:
The script defined in the post installation function gets called when the rootfs is made. If the script succeeds, the package is marked as installed. If the script fails, the package is marked as unpacked and the script will be executed again on the first boot of the image.
Sometimes it is necessary that the execution of a post-installation script is delayed until the first boot, because the script needs to be executed on the device itself. To delay script execution until boot time, the post-installation function should have the following structure:
The structure above delays execution until first boot because the D variable points to the 'image' directory when the rootfs is being made at build time but is unset when executed on the first boot.
同时,在"/etc/rcS.d/S98configure"文件中有这么几行:
参考usage: ipkg [options...] sub-command [arguments...]
where sub-command is one of:
configure [<pkg>] Configure unpacked packages --重新执行post-installation script
综上,在ipkg软件包管理目录的status文件中会记录每个软件包的状态,由此可实现两阶段的"Post Install Scripts"。