Skip to contentSkip to conversation

Per-ANGSTROM_MODE caches for Angstrom

RFC Paul Sokolovsky 3 participants 5 messages Feb 16, 2008 – Feb 20, 2008

lore
Share & tools
lore
#0 lore raw

Hello,

It's pretty annoying to wait for cache rebuild each time ANGSTROM_MODE is swicthed, especially if that happens often. Following patch stores bitbake cache for each mode separately:

#

# old_revision [1821f6eadefc14ad7ce51d5ab026da139608f557]
#
# patch "conf/distro/include/angstrom.inc"
#  from [b86b952c90304d1fd39f1415f6af7f71d02e00df]
#    to [e7921869d30b7e5df3fd39fbd4bec5d2495b5d31]
#
============================================================
--- conf/distro/include/angstrom.inc	b86b952c90304d1fd39f1415f6af7f71d02e00df
+++ conf/distro/include/angstrom.inc	e7921869d30b7e5df3fd39fbd4bec5d2495b5d31
@@ -12,6 +12,7 @@ ANGSTROM_MODE ?= "glibc"
 # Can be "glibc", "eglibc" or "uclibc"
 ANGSTROM_MODE ?= "glibc"

+CACHE = "${TMPDIR}/cache${@['', '/' + str(bb.data.getVar('ANGSTROM_MODE', d, 1))][bool(bb.data.getVar('ANGSTROM_MODE', d, 1))]}${@['', '/' + str(bb.data.getVar('MACHINE', d, 1))][bool(bb.data.getVar('MACHINE', d, 1))]}"
DEPLOY_DIR = "${TMPDIR}/deploy/${ANGSTROM_MODE}"
require conf/distro/include/angstrom-${ANGSTROM_MODE}.inc

Signature · 2 lines
Best regards,
 Paul                          mailto:[email protected]
#1 lore raw
Quoted 17 lines · Paul Sokolovsky

Hello,

It's pretty annoying to wait for cache rebuild each time ANGSTROM_MODE is swicthed, especially if that happens often. Following patch stores bitbake cache for each mode separately:

#

# old_revision [1821f6eadefc14ad7ce51d5ab026da139608f557]
#
# patch "conf/distro/include/angstrom.inc"
#  from [b86b952c90304d1fd39f1415f6af7f71d02e00df]
#    to [e7921869d30b7e5df3fd39fbd4bec5d2495b5d31]
#
============================================================

distro/include/angstrom.inc e7921869d30b7e5df3fd39fbd4bec5d2495b5d31 ANGSTROM_MODE ?= "glibc" · line 17

Quoted 6 lines
distro/include/angstrom.inc e7921869d30b7e5df3fd39fbd4bec5d2495b5d31 renamed from distro/include/angstrom.inc b86b952c90304d1fd39f1415f6af7f71d02e00df +1 -0
@@ -12,6 +12,7 @@ ANGSTROM_MODE ?= "glibc"
 # Can be "glibc", "eglibc" or "uclibc"
 ANGSTROM_MODE ?= "glibc"
 
+CACHE = "${TMPDIR}/cache${@['', '/' + str(bb.data.getVar('ANGSTROM_MODE', d, 1))][bool(bb.data.getVar('ANGSTROM_MODE', d, 1))]}${@['', '/' + str(bb.data.getVar('MACHINE', d, 1))][bool(bb.data.getVar('MACHINE', d, 1))]}"
 DEPLOY_DIR = "${TMPDIR}/deploy/${ANGSTROM_MODE}"
 require conf/distro/include/angstrom-${ANGSTROM_MODE}.inc

+1, for the idea, but why not just ${TMPDIR}/cache/${ANGSTROM_MODE} ? And I don't understand why you need to include MACHINE there. I've never needed to rebuild caches when switching MACHINE, and I shouldn't have to.

regards
Philipp

#2 lore raw

Hello,

Quoted 30 lines · On Sat, 16 Feb 2008 16:39:42 +0100 "pHilipp Zabel" <[email protected]>…
Quoted 21 lines · Paul Sokolovsky

Hello,

It's pretty annoying to wait for cache rebuild each time ANGSTROM_MODE is swicthed, especially if that happens often. Following patch stores bitbake cache for each mode separately:

#

# old_revision [1821f6eadefc14ad7ce51d5ab026da139608f557]
#
# patch "conf/distro/include/angstrom.inc"
#  from [b86b952c90304d1fd39f1415f6af7f71d02e00df]
#    to [e7921869d30b7e5df3fd39fbd4bec5d2495b5d31]
#
============================================================
--- conf/distro/include/angstrom.inc
b86b952c90304d1fd39f1415f6af7f71d02e00df +++
conf/distro/include/angstrom.inc
e7921869d30b7e5df3fd39fbd4bec5d2495b5d31 @@ -12,6 +12,7 @@
ANGSTROM_MODE ?= "glibc" # Can be "glibc", "eglibc" or "uclibc"
ANGSTROM_MODE ?= "glibc"
Quoted 7 lines

+CACHE = "${TMPDIR}/cache${@['', '/' + str(bb.data.getVar('ANGSTROM_MODE', d, 1))][bool(bb.data.getVar('ANGSTROM_MODE', d, 1))]}${@['', '/' + str(bb.data.getVar('MACHINE', d, 1))][bool(bb.data.getVar('MACHINE', d, 1))]}" DEPLOY_DIR = "${TMPDIR}/deploy/${ANGSTROM_MODE}" require conf/distro/include/angstrom-${ANGSTROM_MODE}.inc

Quoted 1 line

+1, for the idea, but why not just ${TMPDIR}/cache/${ANGSTROM_MODE} ?

Well, nice question ;-). To be generic and putable even in bitbake.conf ;-)

Quoted 3 lines

And I don't understand why you need to include MACHINE there. I've never needed to rebuild caches when switching MACHINE, and I shouldn't have to.

Heh, multimachine puts it there ;-)

Quoted 3 lines

regards
Philipp

Signature · 2 lines
Best regards,
 Paul                          mailto:[email protected]
#3 lore raw

Hello,

So, no objections? I'll add it then, and RFC adding to stable branch too. I'd like to keep that extra check for ANGSTROM_MODE being set - it at least consistent with existing MACHINE check.

On Sat, 16 Feb 2008 17:52:42 +0200
Paul Sokolovsky <[email protected]> wrote:

[]

Quoted 47 lines
Quoted 27 lines
Quoted 19 lines

It's pretty annoying to wait for cache rebuild each time ANGSTROM_MODE is swicthed, especially if that happens often. Following patch stores bitbake cache for each mode separately:

#

# old_revision [1821f6eadefc14ad7ce51d5ab026da139608f557]
#
# patch "conf/distro/include/angstrom.inc"
#  from [b86b952c90304d1fd39f1415f6af7f71d02e00df]
#    to [e7921869d30b7e5df3fd39fbd4bec5d2495b5d31]
#
============================================================
--- conf/distro/include/angstrom.inc
b86b952c90304d1fd39f1415f6af7f71d02e00df +++
conf/distro/include/angstrom.inc
e7921869d30b7e5df3fd39fbd4bec5d2495b5d31 @@ -12,6 +12,7 @@
ANGSTROM_MODE ?= "glibc" # Can be "glibc", "eglibc" or "uclibc"
ANGSTROM_MODE ?= "glibc"
Quoted 7 lines

+CACHE = "${TMPDIR}/cache${@['', '/' + str(bb.data.getVar('ANGSTROM_MODE', d, 1))][bool(bb.data.getVar('ANGSTROM_MODE', d, 1))]}${@['', '/' + str(bb.data.getVar('MACHINE', d, 1))][bool(bb.data.getVar('MACHINE', d, 1))]}" DEPLOY_DIR = "${TMPDIR}/deploy/${ANGSTROM_MODE}" require conf/distro/include/angstrom-${ANGSTROM_MODE}.inc

Quoted 2 lines

+1, for the idea, but why not just
${TMPDIR}/cache/${ANGSTROM_MODE} ?

Well, nice question ;-). To be generic and putable even in bitbake.conf ;-)

Quoted 3 lines

And I don't understand why you need to include MACHINE there. I've never needed to rebuild caches when switching MACHINE, and I shouldn't have to.

Heh, multimachine puts it there ;-)

Quoted 3 lines

regards
Philipp

Signature · 2 lines
Best regards,
 Paul                          mailto:[email protected]
Signature · 2 lines
Best regards,
 Paul                          mailto:[email protected]
#4 lore raw
Quoted 3 lines · Paul Sokolovsky

So, no objections? I'll add it then, and RFC adding to stable branch too. I'd like to keep that extra check for ANGSTROM_MODE being set - it at least consistent with existing MACHINE check.

See below.

Quoted 18 lines
Quoted 15 lines · On Sat, 16 Feb 2008 17:52:42 +0200 Paul Sokolovsky <[email protected]> wrote:
Quoted 15 lines
Quoted 14 lines

--- conf/distro/include/angstrom.inc b86b952c90304d1fd39f1415f6af7f71d02e00df +++ conf/distro/include/angstrom.inc e7921869d30b7e5df3fd39fbd4bec5d2495b5d31 @@ -12,6 +12,7 @@ ANGSTROM_MODE ?= "glibc" # Can be "glibc", "eglibc" or "uclibc" ANGSTROM_MODE ?= "glibc"

+CACHE = "${TMPDIR}/cache${@['', '/' + str(bb.data.getVar('ANGSTROM_MODE', d, 1))][bool(bb.data.getVar('ANGSTROM_MODE', d, 1))]}${@['', '/' + str(bb.data.getVar('MACHINE', d, 1))][bool(bb.data.getVar('MACHINE', d, 1))]}" DEPLOY_DIR = "${TMPDIR}/deploy/${ANGSTROM_MODE}" require conf/distro/include/angstrom-${ANGSTROM_MODE}.inc

Quoted 5 lines
Quoted 5 lines
Quoted 2 lines

+1, for the idea, but why not just
${TMPDIR}/cache/${ANGSTROM_MODE} ?

Well, nice question ;-). To be generic and putable even in bitbake.conf ;-)

Please use the latter form, not the one with all the python in it. You also need MACHINE in there.

Quoted 5 lines
Quoted 5 lines
Quoted 3 lines

And I don't understand why you need to include MACHINE there. I've never needed to rebuild caches when switching MACHINE, and I shouldn't have to.

Heh, multimachine puts it there ;-)

In order to set MACHINE on the commandline, you need MACHINE in CACHE and bitbake.conf does that for exactly this reason.

Cheers,

Richard