summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDexuan Cui <dexuan.cui@intel.com>2011-05-18 04:09:01 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-05-20 11:40:44 (GMT)
commit9fbd9b93aea780c8168f6de2692148b14dd9d6a7 (patch)
tree2a9aeccdcf807032bb309cd66dc35e6b320fd71b
parent5956184bbe29fc24e1349035ec66cf57480fd63f (diff)
downloadpoky-9fbd9b93aea780c8168f6de2692148b14dd9d6a7.tar.gz
package-index.bb: add support for deb and rpm.
[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. (From OE-Core rev: 01e34bdb43e0cc27c1cfffd6730c384f40c404c1) Signed-off-by: Dexuan Cui <dexuan.cui@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/package_deb.bbclass4
-rw-r--r--meta/classes/package_ipk.bbclass4
-rw-r--r--meta/classes/package_rpm.bbclass3
-rw-r--r--meta/recipes-core/meta/package-index.bb6
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 () {
431do_package_write_deb[dirs] = "${PKGWRITEDIRDEB}" 431do_package_write_deb[dirs] = "${PKGWRITEDIRDEB}"
432addtask package_write_deb before do_package_write after do_package 432addtask package_write_deb before do_package_write after do_package
433 433
434
435PACKAGEINDEXES += "package_update_index_deb;"
436PACKAGEINDEXDEPS += "dpkg-native:do_populate_sysroot"
437PACKAGEINDEXDEPS += "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 () {
386} 386}
387do_package_write_ipk[dirs] = "${PKGWRITEDIRIPK}" 387do_package_write_ipk[dirs] = "${PKGWRITEDIRIPK}"
388addtask package_write_ipk before do_package_write after do_package 388addtask package_write_ipk before do_package_write after do_package
389
390PACKAGEINDEXES += "package_update_index_ipk;"
391PACKAGEINDEXDEPS += "opkg-utils-native:do_populate_sysroot"
392PACKAGEINDEXDEPS += "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 () {
815do_package_write_rpm[dirs] = "${PKGWRITEDIRRPM}" 815do_package_write_rpm[dirs] = "${PKGWRITEDIRRPM}"
816addtask package_write_rpm before do_package_write after do_package 816addtask package_write_rpm before do_package_write after do_package
817 817
818PACKAGEINDEXES += "package_update_index_rpm; createrepo ${DEPLOY_DIR_RPM};"
819PACKAGEINDEXDEPS += "rpm-native:do_populate_sysroot"
820PACKAGEINDEXDEPS += "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"
19do_populate_sysroot[noexec] = "1" 19do_populate_sysroot[noexec] = "1"
20 20
21do_package_index[nostamp] = "1" 21do_package_index[nostamp] = "1"
22do_package_index[dirs] = "${DEPLOY_DIR_IPK}" 22do_package_index[depends] += "${PACKAGEINDEXDEPS}"
23do_package_index[depends] += "opkg-utils-native:do_populate_sysroot"
24do_package_index[depends] += "opkg-native:do_populate_sysroot"
25 23
26do_package_index() { 24do_package_index() {
27 set -ex 25 set -ex
28 package_update_index_ipk 26 ${PACKAGEINDEXES}
29 set +ex 27 set +ex
30} 28}
31addtask do_package_index before do_build 29addtask do_package_index before do_build