[poky] Some native packages reference build tree

Gary Thomas gary at mlbassoc.com
Fri Jun 3 11:07:35 PDT 2011


Maybe I'm confused, but it would seem to me that the contents of
SSTATE (cache, etc) should be usable even if the tmp working
directory that was used to create it no longer exists.  At least
my thinking is that I could build the SSTATE cache files and pass
them to my customers, along with the basic Poky tree, in a bundle
which they could then use to speed up Poky builds.

This doesn't seem to work, at least for git-native (one of the
problems I've been tracing for a couple of days).  Here's how
I found this problem.

* step 1 - build Poky baseline
   % . /local/poky-base/oe-init-build-env /local/poky_build1
   % bitbake git-native

* step 2 - rebuild, using baseline for SSTATE_MIRRORS
   % . /local/poky-base/oe-init-build-env /local/poky_build2
   -- adjust conf/local.conf to contain these lines:
     # Reusable state information
     SSTATE_MIRRORS ?= "\
     file://.* file:///local/poky_build1/sstate-cache/"
   % bitbake git-native

In this case, 'git-native' only comes from the SSTATE packaging
and will just be installed into tmp/sysroots.
   % /local/poky_build2/tmp/sysroots/i686-linux/usr/bin/git repack
   fatal: Not a git repository (or any of the parent directories): .git
so it works fine.  Now, to break it:
   % mv /local/poky_build1/tmp{,.ORIG}
   % /local/poky_build2/tmp/sysroots/i686-linux/usr/bin/git repack
   git: 'repack' is not a git command. See 'git --help'.

Bottom line, at least some packages within the sstate tree (probably
only -native ones), contain references to the working tree in which
they were built, hence making them unsuitable for sharing.  I don't
know how pervasive this is, but at least this one sent me in circles
for a couple of days now.  I think this was also the source of my
problem with RPM yesterday.

Filed as bug #1137

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------



More information about the poky mailing list