[yocto] How to force bitbake to install a package

Matt Schuckmann Matt.Schuckmann at planar.com
Thu Dec 4 19:07:27 PST 2014


Ok I'm trying to really dig into this to understand it and I've discovered that for my current problem the pkg_postinst_${PN}() is not getting run. I fact what I keep seeing is the remnants of an older version of pkg_postinst_${PN}() function. 

I have yet to figure out how to debug or see the execution of pkg_postinst functions, they seem to be different from the do_install(), do_compile() functions but I'm having trouble finding documentation on them.

Here is my current pkg_postinst function
pkg_postinst () {
	touch $D${sysconfdir}/foo.bar.conf
	if [ -f $D${sysconfdir}/lighttpd.conf ] ; then
		cat $D${sysconfdir}/lighttpd.conf.web-api >> $D${sysconfdir}/lighttpd.conf
else
	echo "No lighttpd.conf found, aborting"
	exit 1
fi
}

Any suggestions as to why this isn't getting run? 

Thanks, 
Matt S. 

> -----Original Message-----
> From: yocto-bounces at yoctoproject.org [mailto:yocto-
> bounces at yoctoproject.org] On Behalf Of Matt Schuckmann
> Sent: Thursday, December 04, 2014 6:24 PM
> To: yocto at yoctoproject.org
> Subject: [yocto] How to force bitbake to install a package
> 
> I'm going nuts on this, I can't figure what magic incantation is to
> ensure that my changes to a recipe getting applied to the image I'm
> building.
> 
> I'm working off the Dylan branch (IT amsdk 7.0)
> 
> Here is my current work flow,
> 
> Make some small edit to a file in a recipe in my layer, say a
> lighttpd.conf file.
> ~/oe-build/build $ bitbake web-ui
> 
> I can see that it rebuilt and repackaged, so I go ahead and build the
> image.
> ~/oe-build/build & bitbake my-base-image
> 
> I can see that it performs do_rootfs, looks good, I can also go to my
> tmp/deploy/image directory and see a new image.tar.gz file has been
> created.
> 
> I unpack the tar file to my NFS shared rootfs directory (or a new
> rootfs dir) and my change isn't there. I don't always see this problem
> but it definitely crops up and once I see it I haven't figured out how
> to fix it.
> 
> I've tried all sorts of combinations of:
> bitbake -c clean web-ui
> bitbake -c cleansstate web-ui
> bitbake -c clean my-base-image
> bitbake -c cleansstate my-base-image
> bitbake -c rootfs -f my-base-image
> 
> Invariably the only way I can reliably see my change take effect is to
> blow away my entire tmp directory and start over which is painful.
> 
> So what am I missing?
> 
> Thanks,
> Matt S.
> 
> 
> --
> _______________________________________________
> yocto mailing list
> yocto at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto




More information about the yocto mailing list