[poky] [PATCH] rpm: Move postinsts to /var
Mark Hatle
mark.hatle at windriver.com
Wed Jan 4 07:55:46 PST 2012
On 1/3/12 8:17 PM, Colin Walters wrote:
> On Tue, 2012-01-03 at 16:54 -0800, Saul Wold wrote:
>> On 01/03/2012 10:48 AM, Colin Walters wrote:
>>> My OS has read-only bind mounts over most directories (including
>>> /etc), with the exception of /var. Since these scripts need to
>>> be run once and then deleted, it's better for me if these are in
>>> /var, and won't hurt anyone else for them to be there.
>>>
>>> You fixed this for RPM, does it exist for deb and ipkg also?
>
> From a glance, no:
>
> rootfs_deb.bbclass
> # Attempt to run postinsts
> # Mark packages with postinst failures as unpacked
> for i in ${IMAGE_ROOTFS}/var/lib/dpkg/info/*.postinst; do
> if [ -f $i ]&& ! sh $i configure; then
> _flag unpacked `basename $i .postinst`
> fi
> done
>
> rootfs_ipk.bbclass:
> for i in ${IMAGE_ROOTFS}${opkglibdir}/info/*.postinst; do
> if [ -f $i ]&& ! sh $i configure; then
> runtime_script_required=1
> opkg-cl ${IPKG_ARGS} flag unpacked `basename $i .postinst`
> fi
> done
Based on the above, I would then suggest you use /var/lib/rpm/info/*.postinst
That way the files are contained within the rpm directory of database and
associated files. Otherwise, I agree, this is a bug in the current
implementation. It shouldn't be using etc for things that can change.
--Mark
>
> _______________________________________________
> poky mailing list
> poky at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/poky
More information about the poky
mailing list