[yocto] Mapping root filesystem files back into packages

Paul Eggleton paul.eggleton at linux.intel.com
Tue Jan 19 01:20:56 PST 2016


On Tue, 19 Jan 2016 08:31:09 Ulf Magnusson wrote:
> On Mon, Jan 18, 2016 at 9:15 PM, Paul Eggleton
> <paul.eggleton at linux.intel.com> wrote:
> > On Mon, 18 Jan 2016 10:56:41 Ulf Magnusson wrote:
> >> To support an in-house packaging format, we need to partition the root
> >> filesystem into a number of packages (called "internal packages" from
> >> here on to avoid confusion), where each internal package corresponds
> >> to a number of (e.g. IPK) packages.
> >> 
> >> The way this is currently done is by manually maintaining a database
> >> (implemented as a PACKAGE_CLASSES class) that maps files in the root
> >> filesystem back to packages, along with a list of what packages should
> >> go into each internal package. I suspect it is done this way so that
> >> post-processing steps on the root filesystem will be included in the
> >> internal packages.
> >> 
> >> To me this feels pretty roundabout, and I suspect that there are much
> >> nicer solutions (suggestions welcome!). What I'm mostly curious about
> >> at the moment though is whether there's some nicer way to map files
> >> from the root filesystem back to packages, without having to maintain
> >> a separate database. Having the method be independent of the package
> >> format (e.g., IPK) would be a bonus, though I'm not sure if it's a
> >> strict requirement.
> > 
> > So, aside from the "internal package" concept, there are two ways to do
> > this:
> > 
> > 1) oe-pkgdata-util find-path - this will tell you the build-time package
> > name that provided the specified path within the image (expects a full
> > path, wildcards allowed). It also provides some other lookup tools. Note
> > that this relies on pkgdata so it'll only work for a particular recipe
> > after that recipe has been packaged.
> > 
> > 2) Use the Toaster web UI - it allows you to browse through the image and
> > click through from any file back to the package that contained it.
> > 
> > Cheers,
> > Paul
> 
> Thanks for the hint!
> 
> Do you have any suggestions for the other direction as well, i.e.,
> mapping packages to files, preferably in a way that's independent of
> the packaging format?

You'd use the same mechanisms - both of the above options will let you look up 
a package and then its contents.

> I suspect this won't be a problem, but it shouldn't matter whether the
> package contents are fetched from the sstate cache or not.

Nope, that's not an issue.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre



More information about the yocto mailing list