Skip to contentSkip to conversation

Some native packages reference build tree

DISCUSSION Gary Thomas 2 participants 2 messages Jun 3, 2011 – Jun 6, 2011

lore
Share & tools
lore
#0 lore raw

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

Signature · 4 lines
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------
#1 lore raw
Quoted 11 lines · Gary Thomas

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.

It's not uncommon to have this sort of relocation issue. I know we had to fix quite a few of them for our use of packaged-staging. Generally you have to tackle them individually, at least for the cases where the automatic sed bits don't cover it.

Signature · 5 lines
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics