Update poky-feed-config-opkg to generate a useful package setup
PATCH 1/1 Update poky-feed-config-opkg to generate a useful package setup
The current poky-feed-config-opkg package only generates a skeleton for the opkg setups. In particular, the base configuration file /etc/opkg/base-files.conf is not filled in at all.
The attached patch fills this file in, using variables set by the user (local.conf, site.conf, etc). If left unset, the behaviour will be the same as current.
One thing I found is that opkg is very noisy if there are databases mentioned in base-files.conf that don't exist. For example, on ARM platforms, there are a large number of possibilities (arm, armv5, armv6, ...) that are never populated in .../tmp/deploy/ipk. The changes to this recipe will prune the file to only include those ipk databases which have actual files present.
Signature · 4 lines
------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------
From 5f2702b306f5595e6d66b756776a8c8bcc905149 Mon Sep 17 00:00:00 2001
From: Gary Thomas <[email protected]>
Date: Fri, 2 Sep 2011 10:40:43 -0600
Subject: [PATCH] Generate useful opkg setup
--- .../feed-config/poky-feed-config-opkg_1.0.bb | 20 ++++++++++++++------ 1 files changed, 14 insertions(+), 6 deletions(-)
meta/recipes-core/feed-config/poky-feed-config-opkg_1.0.bb +14 -6
@@ -1,12 +1,12 @@ DESCRIPTION = "Poky example feed configuration" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" -PR = "r1" +PR = "r2" PACKAGE_ARCH = "${MACHINE_ARCH}" INHIBIT_DEFAULT_DEPS = "1" -#FEEDNAMEPREFIX ?= "INVALID" -#FEEDURIPREFIX ?= "INVALID" +FEEDNAMEPREFIX ?= "INVALID" +FEEDURIPREFIX ?= "INVALID" do_compile() { mkdir -p ${S}/${sysconfdir}/opkg/
@@ -26,11 +26,19 @@ do_compile() { rm -f $basefeedconf touch $basefeedconf - #for arch in $ipkgarchs; do - # echo "src/gz ${FEEDNAMEPREFIX}-$arch http://pokylinux.org/${FEEDURIPREFIX}$arch" >> $basefeedconf - #done + if [ "${FEEDNAMEPREFIX}" != "INVALID" ]; then + for arch in $ipkgarchs; do + # Only export real directories + if [ -d "${DEPLOY_DIR}/ipk/${arch}" ]; then + echo "src/gz ${FEEDNAMEPREFIX}-$arch ${FEEDURIPREFIX}/$arch" >> $basefeedconf + fi + done + fi } +# This should ensure that all active architectures are represented above +do_compile[depends] += "base-files:do_package" +do_compile[depends] += "virtual/kernel:do_package" do_install () { install -d ${D}${sysconfdir}/opkg
Signature · 1 line
1.7.6
Quoted 8 lines · Gary Thomas
The current poky-feed-config-opkg package only generates a skeleton for the opkg setups. In particular, the base configuration file
/etc/opkg/base-files.confis not filled in at all.The attached patch fills this file in, using variables set by the user (local.conf, site.conf, etc). If left unset, the behaviour will be the same as current.
Quoted 6 lines
One thing I found is that opkg is very noisy if there are databases mentioned in base-files.conf that don't exist. For example, on ARM platforms, there are a large number of possibilities (arm, armv5, armv6, ...) that are never populated in .../tmp/deploy/ipk. The changes to this recipe will prune the file to only include those ipk databases which have actual files present.
Your code is one big race unfortunately since the actual file generated will depend on whether any packaging task has run before it or not (and what package type that was). I'm not sure how to fix that but it can't go in as it stands due to that...
Cheers,
Richard
Quoted 16 lines · Richard Purdie
Quoted 8 lines · Gary Thomas
The current poky-feed-config-opkg package only generates a skeleton for the opkg setups. In particular, the base configuration file
/etc/opkg/base-files.confis not filled in at all.The attached patch fills this file in, using variables set by the user (local.conf, site.conf, etc). If left unset, the behaviour will be the same as current.
Quoted 6 lines
One thing I found is that opkg is very noisy if there are databases mentioned in base-files.conf that don't exist. For example, on ARM platforms, there are a large number of possibilities (arm, armv5, armv6, ...) that are never populated in .../tmp/deploy/ipk. The changes to this recipe will prune the file to only include those ipk databases which have actual files present.
Quoted 4 lines
Your code is one big race unfortunately since the actual file generated will depend on whether any packaging task has run before it or not (and what package type that was). I'm not sure how to fix that but it can't go in as it stands due to that...
I agree :-) That's what these lines are for:
do_compile[depends] += "base-files:do_package" do_compile[depends] += "virtual/kernel:do_package"
They solve the problem for me, i.e. if I build an image which includes this recipe from scratch, then the do_compile step is held off until sufficient work has gone on to make the database useful.
Signature · 4 lines
------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------
Quoted 22 lines · Gary Thomas
Quoted 16 lines · Richard Purdie
Quoted 8 lines · Gary Thomas
The current poky-feed-config-opkg package only generates a skeleton for the opkg setups. In particular, the base configuration file
/etc/opkg/base-files.confis not filled in at all.The attached patch fills this file in, using variables set by the user (local.conf, site.conf, etc). If left unset, the behaviour will be the same as current.
Quoted 6 lines
One thing I found is that opkg is very noisy if there are databases mentioned in base-files.conf that don't exist. For example, on ARM platforms, there are a large number of possibilities (arm, armv5, armv6, ...) that are never populated in .../tmp/deploy/ipk. The changes to this recipe will prune the file to only include those ipk databases which have actual files present.
Quoted 4 lines
Your code is one big race unfortunately since the actual file generated will depend on whether any packaging task has run before it or not (and what package type that was). I'm not sure how to fix that but it can't go in as it stands due to that...
Quoted 7 lines
I agree :-) That's what these lines are for:
do_compile[depends] += "base-files:do_package" do_compile[depends] += "virtual/kernel:do_package"They solve the problem for me, i.e. if I build an image which includes this recipe from scratch, then the
do_compilestep is held off until sufficient work has gone on to make the database useful.
Sorry, I didn't see that on the bottom. I can't say I really like it. If you're going to do that you might as well just hardcode the list as:
"all ${TUNE_PKGARCH} ${MACHINE}"
?
Cheers,
Richard
Quoted 31 lines · Richard Purdie
Quoted 22 lines · Gary Thomas
Quoted 16 lines · Richard Purdie
Quoted 8 lines · Gary Thomas
The current poky-feed-config-opkg package only generates a skeleton for the opkg setups. In particular, the base configuration file
/etc/opkg/base-files.confis not filled in at all.The attached patch fills this file in, using variables set by the user (local.conf, site.conf, etc). If left unset, the behaviour will be the same as current.
Quoted 6 lines
One thing I found is that opkg is very noisy if there are databases mentioned in base-files.conf that don't exist. For example, on ARM platforms, there are a large number of possibilities (arm, armv5, armv6, ...) that are never populated in .../tmp/deploy/ipk. The changes to this recipe will prune the file to only include those ipk databases which have actual files present.
Quoted 4 lines
Your code is one big race unfortunately since the actual file generated will depend on whether any packaging task has run before it or not (and what package type that was). I'm not sure how to fix that but it can't go in as it stands due to that...
Quoted 7 lines
I agree :-) That's what these lines are for:
do_compile[depends] += "base-files:do_package" do_compile[depends] += "virtual/kernel:do_package"They solve the problem for me, i.e. if I build an image which includes this recipe from scratch, then the
do_compilestep is held off until sufficient work has gone on to make the database useful.
Quoted 6 lines
Sorry, I didn't see that on the bottom. I can't say I really like it. If you're going to do that you might as well just hardcode the list as:
"all ${TUNE_PKGARCH} ${MACHINE}"
?
Yes, that would probably be equivalent. Would that be an acceptable change?
Bottom line though is that the recipe currently does nothing for the end user and I was trying to make something that would work out of the box for "Joe Average User"
Signature · 4 lines
------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------