[OE-core] [PATCH 5/8] opkg: Merge in opkg-collateral

Paul Barker paul at paulbarker.me.uk
Sun Dec 21 22:11:54 UTC 2014


All non-arch-specific and non-distro-specific configuration is now kept in the
main 'opkg' recipe and package.

Signed-off-by: Paul Barker <paul at paulbarker.me.uk>
---
 meta/classes/rootfs_ipk.bbclass                       |  2 +-
 meta/recipes-devtools/opkg/opkg-collateral.bb         | 19 -------------------
 .../opkg/{opkg-collateral => opkg}/opkg.conf          |  0
 meta/recipes-devtools/opkg/opkg_0.2.4.bb              | 12 +++++++++++-
 4 files changed, 12 insertions(+), 21 deletions(-)
 delete mode 100644 meta/recipes-devtools/opkg/opkg-collateral.bb
 rename meta/recipes-devtools/opkg/{opkg-collateral => opkg}/opkg.conf (100%)

diff --git a/meta/classes/rootfs_ipk.bbclass b/meta/classes/rootfs_ipk.bbclass
index 6139cc7..dd144e4 100644
--- a/meta/classes/rootfs_ipk.bbclass
+++ b/meta/classes/rootfs_ipk.bbclass
@@ -6,7 +6,7 @@
 #
 
 EXTRAOPKGCONFIG ?= ""
-ROOTFS_PKGMANAGE = "opkg opkg-collateral ${EXTRAOPKGCONFIG}"
+ROOTFS_PKGMANAGE = "opkg ${EXTRAOPKGCONFIG}"
 ROOTFS_PKGMANAGE_BOOTSTRAP  = "run-postinsts"
 
 do_rootfs[depends] += "opkg-native:do_populate_sysroot opkg-utils-native:do_populate_sysroot"
diff --git a/meta/recipes-devtools/opkg/opkg-collateral.bb b/meta/recipes-devtools/opkg/opkg-collateral.bb
deleted file mode 100644
index b16579c..0000000
--- a/meta/recipes-devtools/opkg/opkg-collateral.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-SUMMARY = "Constructs the main configuration file for opkg"
-SECTION = "base"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
-PR = "r2"
-
-SRC_URI = "file://opkg.conf"
-
-OPKGLIBDIR = "${localstatedir}/lib"
-do_compile () {
-	echo "option lists_dir ${OPKGLIBDIR}/opkg" >>${WORKDIR}/opkg.conf
-}
-
-do_install () {
-	install -d ${D}${sysconfdir}/opkg
-	install -m 0644 ${WORKDIR}/opkg.conf ${D}${sysconfdir}/opkg/opkg.conf
-}
-
-CONFFILES_${PN} = "${sysconfdir}/opkg/opkg.conf"
diff --git a/meta/recipes-devtools/opkg/opkg-collateral/opkg.conf b/meta/recipes-devtools/opkg/opkg/opkg.conf
similarity index 100%
rename from meta/recipes-devtools/opkg/opkg-collateral/opkg.conf
rename to meta/recipes-devtools/opkg/opkg/opkg.conf
diff --git a/meta/recipes-devtools/opkg/opkg_0.2.4.bb b/meta/recipes-devtools/opkg/opkg_0.2.4.bb
index 573195a..6cb89e9 100644
--- a/meta/recipes-devtools/opkg/opkg_0.2.4.bb
+++ b/meta/recipes-devtools/opkg/opkg_0.2.4.bb
@@ -14,6 +14,7 @@ SRC_URI = "http://downloads.yoctoproject.org/releases/${BPN}/${BPN}-${PV}.tar.gz
            file://add-exclude.patch \
            file://libopkg-opkg_remove.c-avoid-remove-pkg-repeatly-with.patch \
            file://opkg-configure.service \
+           file://opkg.conf \
 "
 
 S = "${WORKDIR}/${BPN}-${PV}"
@@ -50,7 +51,14 @@ do_configure_prepend() {
 	sed -i -e s:-Werror::g ${S}/libopkg/Makefile.am
 }
 
+do_compile_append () {
+	echo "option lists_dir ${OPKGLIBDIR}/opkg" >>${WORKDIR}/opkg.conf
+}
+
 do_install_append () {
+	install -d ${D}${sysconfdir}/opkg
+	install -m 0644 ${WORKDIR}/opkg.conf ${D}${sysconfdir}/opkg/opkg.conf
+
 	# We need to create the lock directory
 	install -d ${D}${OPKGLIBDIR}/opkg
 
@@ -74,7 +82,7 @@ do_install_append () {
 RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} opkg-arch-config run-postinsts"
 RDEPENDS_${PN}_class-native = ""
 RDEPENDS_${PN}_class-nativesdk = ""
-RREPLACES_${PN} = "opkg-nogpg"
+RREPLACES_${PN} = "opkg-nogpg opkg-collateral"
 
 PACKAGES =+ "libopkg-dev libopkg-staticdev libopkg"
 
@@ -84,3 +92,5 @@ FILES_libopkg = "${libdir}/*.so.* ${OPKGLIBDIR}/opkg/"
 FILES_${PN} += "${systemd_unitdir}/system/"
 
 BBCLASSEXTEND = "native nativesdk"
+
+CONFFILES_${PN} = "${sysconfdir}/opkg/opkg.conf"
-- 
1.9.1




More information about the Openembedded-core mailing list