Hi,
thanks for that hint!
I finally managed to install a "third party" deb package using the 
ROOTFS_POSTPROCESS_COMMAND [1] in my rootfs.bb recipe.
Although I not fully understand why the "--admindir" parameter is required when 
the "--root" parameter is given.

The ROOTFS_POSTPROCESS_COMMAND I'm using is:
ROOTFS_POSTPROCESS_COMMAND += "${STAGING_BINDIR_NATIVE}/dpkg 
--root=${IMAGE_ROOTFS}/ --admindir=${IMAGE_ROOTFS}/var/lib/dpkg/  -i 
/path/to/package.deb"

I think pretty the same command will work for rpm packages.

Can anybody of you explain to me why "--root" AND "--admindir" are required for 
dpkg to work correctly?

According to the dpkg manpage --admindir shouldn't be required when --root is 
given:
--admindir=dir
              Change default administrative directory,  which  contains
              many   files   that  give  information  about  status  of
              installed or uninstalled  packages,  etc.   (Defaults  to
              /var/lib/dpkg)

--root=dir
              Changing root changes instdir  to  dir  and  admindir  to
              dir/var/lib/dpkg.

best regards,
Richard

[1] 
http://www.yoctoproject.org/docs/current/mega-manual/mega-manual.html#var-ROOTFS_POSTPROCESS_COMMAND

> From: Gaurang Shastri [mailto:gmshas...@gmail.com] 
> Sent: Monday, April 28, 2014 11:45 AM
> To: Richard Leitner - SKIDATA
> Subject: Re: [yocto] Binary {deb,rpm} package install without repackaging
>
> Dear Richard,
> 
> Do you want to copy some of the RPM to final ROOTFS image before ROOTFS image 
> is created  or you want to install some of the RPM package before ROOTFS 
> image is created ??
> 
> ROOTFS_POSTPROCESS_COMMAND or ROOTFS_POSTINSTALL_COMMAND is the way to go.
> 
> I did however run into a problem when running my script. Using variable ${D} 
> in my ROOTFS_POSTINSTALL_COMMAND gives the “wrong” path - it points to 
> …/image and I’d expect it to contain the path to …/rootfs.
> It seem the variable isreplaced before my function is executed.
> 
> I solved this by using variable ${IMAGE_ROOTFS} instead.
> 
> //Gaurang Shastri
> 
> 
> 
> On Mon, Apr 28, 2014 at 1:29 PM, Richard Leitner - SKIDATA 
> <richard.leit...@skidata.com> wrote:
> > Hi everybody,
> > I've got a question regarding the binary deb/rpm packages in yocto.
> > 
> > Is there any possibility to install a binary deb/rpm package in the rootfs 
> > build without repackaging it?
> > Naively I'm for example thinking of an option in the image recipe like:
> > ADDITIONAL_PACKAGES += "/path/to/package.{deb,rpm}"
> > 
> > The point is that all possible solutions I found using recipes are 
> > extracting and then repackaging the package.
> > Due to the fact that during the repackaging all meta data and 
> > {pre,post}{rm,inst} scripts of the original package are lost this is a 
> > "no-go" for me.
> > 
> > I'd appreciate any help and hints!
> > 
> > Thanks!
> > 
> > best regards,
> > Richard
--
_______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto

-- 
_______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to