From: Saul Wold <sgw@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 09/12] package-index.bb: add support for deb and rpm.
Date: Fri, 20 May 2011 00:06:59 -0700 [thread overview]
Message-ID: <c8a189f315eeafee196f213bdb45a6eea8ab258b.1305874831.git.sgw@linux.intel.com> (raw)
In-Reply-To: <cover.1305874831.git.sgw@linux.intel.com>
In-Reply-To: <cover.1305874831.git.sgw@linux.intel.com>
From: Dexuan Cui <dexuan.cui@intel.com>
[YOCTO #1024]
Currently package-index.bb only supports ipk. This commit adds the support
for rpm and deb, too.
------------------------------
How to generate and use repos:
1) run "bitbake package-index" after building some target,
e.g., core-image-sato-sdk;
2) export ${DEPLOY_DIR_RPM}, ${DEPLOY_DIR_IPK} and ${DEPLOY_DIR_DEB} by a
webserver on the host, assuming the host IP is 192.168.7.1, at
http://192.168.7.1/rpm
http://192.168.7.1/ipk
http://192.168.7.1/deb
3) inside the target, according to the packaging system (rpm, ipk or deb) used
when we generate the target image, we can use different ways to manage
packages:
3.1) RPM
run "zypper addrepo http://192.168.7.1/rpm main; zypper refresh"
to retrieve info about the repo; next, we can use "zypper install/remove"
to manage packages.
3.2) IPK
add the repo info into opkg config file, i.e., in
/etc/opkg/arch.conf, we can add something like
"src i586 http://192.168.7.1/ipk/i586", and next, we run "opkg update" to
make opkg update the list of available packages. And later, we can use
"opkg install/remove" to manage packages.
3.3) DEB
Currently in target, some important config files, like
/var/lib/dpkg/status and /etc/apt/sources.list, for deb/apt are missing. So
we can't install/remove package in target at present.
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
---
meta/classes/package_deb.bbclass | 4 ++++
meta/classes/package_ipk.bbclass | 4 ++++
meta/classes/package_rpm.bbclass | 3 +++
meta/recipes-core/meta/package-index.bb | 6 ++----
4 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/meta/classes/package_deb.bbclass b/meta/classes/package_deb.bbclass
index 4faeb4a..000d9ee 100644
--- a/meta/classes/package_deb.bbclass
+++ b/meta/classes/package_deb.bbclass
@@ -431,3 +431,7 @@ python do_package_write_deb () {
do_package_write_deb[dirs] = "${PKGWRITEDIRDEB}"
addtask package_write_deb before do_package_write after do_package
+
+PACKAGEINDEXES += "package_update_index_deb;"
+PACKAGEINDEXDEPS += "dpkg-native:do_populate_sysroot"
+PACKAGEINDEXDEPS += "apt-native:do_populate_sysroot"
diff --git a/meta/classes/package_ipk.bbclass b/meta/classes/package_ipk.bbclass
index 3c2472b..a3dfc73 100644
--- a/meta/classes/package_ipk.bbclass
+++ b/meta/classes/package_ipk.bbclass
@@ -386,3 +386,7 @@ python do_package_write_ipk () {
}
do_package_write_ipk[dirs] = "${PKGWRITEDIRIPK}"
addtask package_write_ipk before do_package_write after do_package
+
+PACKAGEINDEXES += "package_update_index_ipk;"
+PACKAGEINDEXDEPS += "opkg-utils-native:do_populate_sysroot"
+PACKAGEINDEXDEPS += "opkg-native:do_populate_sysroot"
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 1cf9f79..b86356d 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -815,3 +815,6 @@ python do_package_write_rpm () {
do_package_write_rpm[dirs] = "${PKGWRITEDIRRPM}"
addtask package_write_rpm before do_package_write after do_package
+PACKAGEINDEXES += "package_update_index_rpm; createrepo ${DEPLOY_DIR_RPM};"
+PACKAGEINDEXDEPS += "rpm-native:do_populate_sysroot"
+PACKAGEINDEXDEPS += "createrepo-native:do_populate_sysroot"
diff --git a/meta/recipes-core/meta/package-index.bb b/meta/recipes-core/meta/package-index.bb
index 3c642cb..bf3922f 100644
--- a/meta/recipes-core/meta/package-index.bb
+++ b/meta/recipes-core/meta/package-index.bb
@@ -19,13 +19,11 @@ do_package_write_deb[noexec] = "1"
do_populate_sysroot[noexec] = "1"
do_package_index[nostamp] = "1"
-do_package_index[dirs] = "${DEPLOY_DIR_IPK}"
-do_package_index[depends] += "opkg-utils-native:do_populate_sysroot"
-do_package_index[depends] += "opkg-native:do_populate_sysroot"
+do_package_index[depends] += "${PACKAGEINDEXDEPS}"
do_package_index() {
set -ex
- package_update_index_ipk
+ ${PACKAGEINDEXES}
set +ex
}
addtask do_package_index before do_build
--
1.7.3.4
next prev parent reply other threads:[~2011-05-20 7:10 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-20 7:06 [PATCH 00/12] 20-May-2011 Consolidated Pull Saul Wold
2011-05-20 7:06 ` [PATCH 01/12] tcmode-default: switch to gcc 4.6.0 for x86, x86-64 & arm Saul Wold
2011-05-20 7:06 ` [PATCH 02/12] modutils-cross: fix install issue Saul Wold
2011-05-20 7:06 ` [PATCH 03/12] conf: Create distro overridable IMAGE varibales Saul Wold
2011-05-20 7:06 ` [PATCH 04/12] uclibc/site_config/funcs: getloadavg is unimplemented Saul Wold
2011-05-20 7:06 ` [PATCH 05/12] nfs-utils_1.2.3.bb: Fix compile failure on uclibc Saul Wold
2011-05-20 7:06 ` [PATCH 06/12] distcc_2.18.3.bb: Fix compilation " Saul Wold
2011-05-20 7:06 ` [PATCH 07/12] opkg_svn.bb: Install rcS.d into ${D} instead of ${IMAGE_ROOTFS} Saul Wold
2011-05-20 7:06 ` [PATCH 08/12] opkg-utils: Synchronise with OE Saul Wold
2011-05-20 7:06 ` Saul Wold [this message]
2011-05-20 7:07 ` [PATCH 10/12] ed (GPLv2): remove --disable-silent-rules Saul Wold
2011-05-20 7:07 ` [PATCH 11/12] gettext (gplv2): add virtual/gettext to PROVIDES list Saul Wold
2011-05-20 7:07 ` [PATCH 12/12] u-boot: fix LIC_FILE_CHKSUM Saul Wold
2011-05-20 11:45 ` [PATCH 00/12] 20-May-2011 Consolidated Pull Richard Purdie
2011-05-20 23:46 ` Darren Hart
2011-05-20 23:50 ` Saul Wold
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c8a189f315eeafee196f213bdb45a6eea8ab258b.1305874831.git.sgw@linux.intel.com \
--to=sgw@linux.intel.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox