Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH v2 0/5] Postinst trigger improvements for images
@ 2012-03-06 17:24 Otavio Salvador
  2012-03-06 17:24 ` [PATCH v2 1/5] run-postinsts: fix opkg data path Otavio Salvador
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Otavio Salvador @ 2012-03-06 17:24 UTC (permalink / raw)
  To: openembedded-core

This patchset make consistent and more meanful the name used as
postinst trigger in rootfs.

The following changes since commit d7b8c247227f3cc82f92292407f548927e9fde78:

  base.bbclass: Fix PACKAGECONFIG handling when no flags are set (2012-03-05 13:03:41 -0800)

are available in the git repository at:
  git://github.com/OSSystems/oe-core master
  https://github.com/OSSystems/oe-core/tree/HEAD

Otavio Salvador (5):
  run-postinsts: fix opkg data path
  image.bbclass: fix rootfs generation without package management tools
  rootfs_rpm.bbclass: rename postinst trigger script
  opkg: rename postinst trigger script
  dpkg: rename postinst trigger script

 meta/classes/core-image.bbclass                    |    2 --
 meta/classes/image.bbclass                         |    7 +++++--
 meta/classes/rootfs_rpm.bbclass                    |    6 +++---
 meta/recipes-devtools/dpkg/dpkg.inc                |    8 ++++----
 .../dpkg/run-postinsts/run-postinsts               |    4 ++--
 .../dpkg/run-postinsts/run-postinsts.awk           |    2 +-
 meta/recipes-devtools/dpkg/run-postinsts_1.0.bb    |    2 +-
 meta/recipes-devtools/opkg/opkg.inc                |    8 ++++----
 8 files changed, 20 insertions(+), 19 deletions(-)

-- 
1.7.2.5




^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v2 1/5] run-postinsts: fix opkg data path
  2012-03-06 17:24 [PATCH v2 0/5] Postinst trigger improvements for images Otavio Salvador
@ 2012-03-06 17:24 ` Otavio Salvador
  2012-03-06 17:24 ` [PATCH v2 2/5] image.bbclass: fix rootfs generation without package management tools Otavio Salvador
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Otavio Salvador @ 2012-03-06 17:24 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
 .../dpkg/run-postinsts/run-postinsts               |    4 ++--
 .../dpkg/run-postinsts/run-postinsts.awk           |    2 +-
 meta/recipes-devtools/dpkg/run-postinsts_1.0.bb    |    2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-devtools/dpkg/run-postinsts/run-postinsts b/meta/recipes-devtools/dpkg/run-postinsts/run-postinsts
index 584a92e..5f6442c 100755
--- a/meta/recipes-devtools/dpkg/run-postinsts/run-postinsts
+++ b/meta/recipes-devtools/dpkg/run-postinsts/run-postinsts
@@ -8,8 +8,8 @@
 PKGSYSTEM=/var/lib/dpkg
 
 if [ ! -e $PKGSYSTEM/status ]; then
-  if [ -e /usr/lib/opkg/status ]; then
-    PKGSYSTEM=/usr/lib/opkg
+  if [ -e /var/lib/opkg/status ]; then
+    PKGSYSTEM=/var/lib/opkg
   else
     echo "No package system found"
     exit 1
diff --git a/meta/recipes-devtools/dpkg/run-postinsts/run-postinsts.awk b/meta/recipes-devtools/dpkg/run-postinsts/run-postinsts.awk
index d92200b..18a0492 100644
--- a/meta/recipes-devtools/dpkg/run-postinsts/run-postinsts.awk
+++ b/meta/recipes-devtools/dpkg/run-postinsts/run-postinsts.awk
@@ -11,7 +11,7 @@ BEGIN {
   if (rc==0)
     pkgdir="/var/lib/dpkg/info"
   else
-    pkgdir="/usr/lib/opkg/info"
+    pkgdir="/var/lib/opkg/info"
   package=""
 }
 /Package:.*/ {
diff --git a/meta/recipes-devtools/dpkg/run-postinsts_1.0.bb b/meta/recipes-devtools/dpkg/run-postinsts_1.0.bb
index f8f3368..7438a10 100644
--- a/meta/recipes-devtools/dpkg/run-postinsts_1.0.bb
+++ b/meta/recipes-devtools/dpkg/run-postinsts_1.0.bb
@@ -1,6 +1,6 @@
 DESCRIPTION = "Run postinstall scripts on device using awk"
 SECTION = "devel"
-PR = "r7"
+PR = "r8"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
                     file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
-- 
1.7.2.5




^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v2 2/5] image.bbclass: fix rootfs generation without package management tools
  2012-03-06 17:24 [PATCH v2 0/5] Postinst trigger improvements for images Otavio Salvador
  2012-03-06 17:24 ` [PATCH v2 1/5] run-postinsts: fix opkg data path Otavio Salvador
@ 2012-03-06 17:24 ` Otavio Salvador
  2012-03-06 17:24 ` [PATCH v2 3/5] rootfs_rpm.bbclass: rename postinst trigger script Otavio Salvador
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Otavio Salvador @ 2012-03-06 17:24 UTC (permalink / raw)
  To: openembedded-core

When building without package management tools the
ROOTFS_BOOTSTRAP_INSTALL packages need to be available to provide the
bare minimal for rootfs unconfigure postinsts to be on first boot.

Those packages where being include in core-image.bbclass' based images
however every image needs those available for proper rootfs generation.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
 meta/classes/core-image.bbclass |    2 --
 meta/classes/image.bbclass      |    7 +++++--
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/meta/classes/core-image.bbclass b/meta/classes/core-image.bbclass
index 668297b..e2ad0fc 100644
--- a/meta/classes/core-image.bbclass
+++ b/meta/classes/core-image.bbclass
@@ -51,8 +51,6 @@ CORE_IMAGE_BASE_INSTALL = '\
     task-core-boot \
     task-base-extended \
     \
-    ${@base_contains("IMAGE_FEATURES", "package-management", "", "${ROOTFS_PKGMANAGE_BOOTSTRAP}",d)} \
-    \
     ${CORE_IMAGE_EXTRA_INSTALL} \
     '
 
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index a62eb2c..533f53c 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -5,7 +5,7 @@ inherit imagetest-${IMAGETEST}
 
 LICENSE = "MIT"
 PACKAGES = ""
-RDEPENDS += "${IMAGE_INSTALL} ${LINGUAS_INSTALL} ${NORMAL_FEATURE_INSTALL}"
+RDEPENDS += "${IMAGE_INSTALL} ${LINGUAS_INSTALL} ${NORMAL_FEATURE_INSTALL} ${ROOTFS_BOOTSTRAP_INSTALL}"
 RRECOMMENDS += "${NORMAL_FEATURE_INSTALL_OPTIONAL}"
 
 INHIBIT_DEFAULT_DEPS = "1"
@@ -14,6 +14,9 @@ INHIBIT_DEFAULT_DEPS = "1"
 IMAGE_FEATURES ?= ""
 IMAGE_FEATURES[type] = "list"
 
+# rootfs bootstrap install
+ROOTFS_BOOTSTRAP_INSTALL = "${@base_contains("IMAGE_FEATURES", "package-management", "", "${ROOTFS_PKGMANAGE_BOOTSTRAP}",d)}"
+
 # packages to install from features
 FEATURE_INSTALL = "${@' '.join(oe.packagegroup.required_packages(oe.data.typed_value('IMAGE_FEATURES', d), d))}"
 FEATURE_INSTALL_OPTIONAL = "${@' '.join(oe.packagegroup.optional_packages(oe.data.typed_value('IMAGE_FEATURES', d), d))}"
@@ -52,7 +55,7 @@ PACKAGE_GROUP_doc-pkgs[optional] = "1"
 IMAGE_INSTALL ?= ""
 IMAGE_INSTALL[type] = "list"
 IMAGE_BASENAME[export] = "1"
-export PACKAGE_INSTALL ?= "${IMAGE_INSTALL} ${FEATURE_INSTALL}"
+export PACKAGE_INSTALL ?= "${IMAGE_INSTALL} ${ROOTFS_BOOTSTRAP_INSTALL} ${FEATURE_INSTALL}"
 PACKAGE_INSTALL_ATTEMPTONLY ?= "${FEATURE_INSTALL_OPTIONAL}"
 
 # Images are generally built explicitly, do not need to be part of world.
-- 
1.7.2.5




^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v2 3/5] rootfs_rpm.bbclass: rename postinst trigger script
  2012-03-06 17:24 [PATCH v2 0/5] Postinst trigger improvements for images Otavio Salvador
  2012-03-06 17:24 ` [PATCH v2 1/5] run-postinsts: fix opkg data path Otavio Salvador
  2012-03-06 17:24 ` [PATCH v2 2/5] image.bbclass: fix rootfs generation without package management tools Otavio Salvador
@ 2012-03-06 17:24 ` Otavio Salvador
  2012-03-06 17:24 ` [PATCH v2 4/5] opkg: " Otavio Salvador
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Otavio Salvador @ 2012-03-06 17:24 UTC (permalink / raw)
  To: openembedded-core

Use 'run-postinsts' as trigger script name as it describes better the
intent of it.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
 meta/classes/rootfs_rpm.bbclass |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/meta/classes/rootfs_rpm.bbclass b/meta/classes/rootfs_rpm.bbclass
index 48133f0..9039b21 100644
--- a/meta/classes/rootfs_rpm.bbclass
+++ b/meta/classes/rootfs_rpm.bbclass
@@ -112,7 +112,7 @@ EOF
 	install -d ${IMAGE_ROOTFS}/${sysconfdir}/rcS.d
 	# Stop $i getting expanded below...
 	i=\$i
-	cat > ${IMAGE_ROOTFS}${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}configure << EOF
+	cat > ${IMAGE_ROOTFS}${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts << EOF
 #!/bin/sh
 for i in /etc/rpm-postinsts/*; do
 	echo "Running postinst $i..."
@@ -122,9 +122,9 @@ for i in /etc/rpm-postinsts/*; do
 		echo "ERROR: postinst $i failed."
 	fi
 done
-rm -f ${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}configure
+rm -f ${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts
 EOF
-	chmod 0755 ${IMAGE_ROOTFS}${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}configure
+	chmod 0755 ${IMAGE_ROOTFS}${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts
 
 	install -d ${IMAGE_ROOTFS}/${sysconfdir}
 	echo ${BUILDNAME} > ${IMAGE_ROOTFS}/${sysconfdir}/version
-- 
1.7.2.5




^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v2 4/5] opkg: rename postinst trigger script
  2012-03-06 17:24 [PATCH v2 0/5] Postinst trigger improvements for images Otavio Salvador
                   ` (2 preceding siblings ...)
  2012-03-06 17:24 ` [PATCH v2 3/5] rootfs_rpm.bbclass: rename postinst trigger script Otavio Salvador
@ 2012-03-06 17:24 ` Otavio Salvador
  2012-03-06 17:24 ` [PATCH v2 5/5] dpkg: " Otavio Salvador
  2012-03-13 16:02 ` [PATCH v2 0/5] Postinst trigger improvements for images Saul Wold
  5 siblings, 0 replies; 7+ messages in thread
From: Otavio Salvador @ 2012-03-06 17:24 UTC (permalink / raw)
  To: openembedded-core

Use 'run-postinsts' as trigger script name as it describes better the
intent of it.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
 meta/recipes-devtools/opkg/opkg.inc |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-devtools/opkg/opkg.inc b/meta/recipes-devtools/opkg/opkg.inc
index a67066f..689bd4a 100644
--- a/meta/recipes-devtools/opkg/opkg.inc
+++ b/meta/recipes-devtools/opkg/opkg.inc
@@ -11,7 +11,7 @@ DEPENDS_virtclass-native = "curl-native"
 DEPENDS_virtclass-nativesdk = "curl-nativesdk"
 
 PE = "1"
-INC_PR = "r7"
+INC_PR = "r8"
 
 FILESDIR = "${@os.path.dirname(d.getVar('FILE',1))}/opkg"
 
@@ -60,9 +60,9 @@ if [ "x$D" != "x" ]; then
 	# this happens at S98 where our good 'ole packages script used to run
 	echo "#!/bin/sh
 opkg-cl configure
-rm -f /${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}configure
-" > $D${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}configure
-	chmod 0755 $D${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}configure
+rm -f /${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts
+" > $D${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts
+	chmod 0755 $D${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts
 fi
 
 update-alternatives --install ${bindir}/opkg opkg ${bindir}/opkg-cl 100
-- 
1.7.2.5




^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v2 5/5] dpkg: rename postinst trigger script
  2012-03-06 17:24 [PATCH v2 0/5] Postinst trigger improvements for images Otavio Salvador
                   ` (3 preceding siblings ...)
  2012-03-06 17:24 ` [PATCH v2 4/5] opkg: " Otavio Salvador
@ 2012-03-06 17:24 ` Otavio Salvador
  2012-03-13 16:02 ` [PATCH v2 0/5] Postinst trigger improvements for images Saul Wold
  5 siblings, 0 replies; 7+ messages in thread
From: Otavio Salvador @ 2012-03-06 17:24 UTC (permalink / raw)
  To: openembedded-core

Use 'run-postinsts' as trigger script name as it describes better the
intent of it.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
 meta/recipes-devtools/dpkg/dpkg.inc |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-devtools/dpkg/dpkg.inc b/meta/recipes-devtools/dpkg/dpkg.inc
index 1326994..09bfbbc 100644
--- a/meta/recipes-devtools/dpkg/dpkg.inc
+++ b/meta/recipes-devtools/dpkg/dpkg.inc
@@ -2,7 +2,7 @@ DESCRIPTION = "Package maintenance system for Debian."
 LICENSE = "GPLv2.0+"
 SECTION = "base"
 
-INC_PR = "r15"
+INC_PR = "r16"
 
 SRC_URI = "${DEBIAN_MIRROR}/main/d/dpkg/dpkg_${PV}.tar.bz2 \
            file://ignore_extra_fields.patch"
@@ -42,9 +42,9 @@ do_install_prepend () {
 	# this happens at S98 where our good 'ole packages script used to run
 	printf "#!/bin/sh
 dpkg --configure -a
-rm -f ${sysconfdir}/rcS.d/S${DPKG_INIT_POSITION}configure
-" > ${D}/${sysconfdir}/rcS.d/S${DPKG_INIT_POSITION}configure
-	chmod 0755 ${D}/${sysconfdir}/rcS.d/S${DPKG_INIT_POSITION}configure
+rm -f ${sysconfdir}/rcS.d/S${DPKG_INIT_POSITION}run-postinsts
+" > ${D}/${sysconfdir}/rcS.d/S${DPKG_INIT_POSITION}run-postinsts
+	chmod 0755 ${D}/${sysconfdir}/rcS.d/S${DPKG_INIT_POSITION}run-postinsts
 }
 
 do_install_append () {
-- 
1.7.2.5




^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 0/5] Postinst trigger improvements for images
  2012-03-06 17:24 [PATCH v2 0/5] Postinst trigger improvements for images Otavio Salvador
                   ` (4 preceding siblings ...)
  2012-03-06 17:24 ` [PATCH v2 5/5] dpkg: " Otavio Salvador
@ 2012-03-13 16:02 ` Saul Wold
  5 siblings, 0 replies; 7+ messages in thread
From: Saul Wold @ 2012-03-13 16:02 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On 03/06/2012 09:24 AM, Otavio Salvador wrote:
> This patchset make consistent and more meanful the name used as
> postinst trigger in rootfs.
>
> The following changes since commit d7b8c247227f3cc82f92292407f548927e9fde78:
>
>    base.bbclass: Fix PACKAGECONFIG handling when no flags are set (2012-03-05 13:03:41 -0800)
>
> are available in the git repository at:
>    git://github.com/OSSystems/oe-core master
>    https://github.com/OSSystems/oe-core/tree/HEAD
>
> Otavio Salvador (5):
>    run-postinsts: fix opkg data path
>    image.bbclass: fix rootfs generation without package management tools
>    rootfs_rpm.bbclass: rename postinst trigger script
>    opkg: rename postinst trigger script
>    dpkg: rename postinst trigger script
>
>   meta/classes/core-image.bbclass                    |    2 --
>   meta/classes/image.bbclass                         |    7 +++++--
>   meta/classes/rootfs_rpm.bbclass                    |    6 +++---
>   meta/recipes-devtools/dpkg/dpkg.inc                |    8 ++++----
>   .../dpkg/run-postinsts/run-postinsts               |    4 ++--
>   .../dpkg/run-postinsts/run-postinsts.awk           |    2 +-
>   meta/recipes-devtools/dpkg/run-postinsts_1.0.bb    |    2 +-
>   meta/recipes-devtools/opkg/opkg.inc                |    8 ++++----
>   8 files changed, 20 insertions(+), 19 deletions(-)
>

Merged into OE-Core

Thanks
	Sau!



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-03-13 16:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-06 17:24 [PATCH v2 0/5] Postinst trigger improvements for images Otavio Salvador
2012-03-06 17:24 ` [PATCH v2 1/5] run-postinsts: fix opkg data path Otavio Salvador
2012-03-06 17:24 ` [PATCH v2 2/5] image.bbclass: fix rootfs generation without package management tools Otavio Salvador
2012-03-06 17:24 ` [PATCH v2 3/5] rootfs_rpm.bbclass: rename postinst trigger script Otavio Salvador
2012-03-06 17:24 ` [PATCH v2 4/5] opkg: " Otavio Salvador
2012-03-06 17:24 ` [PATCH v2 5/5] dpkg: " Otavio Salvador
2012-03-13 16:02 ` [PATCH v2 0/5] Postinst trigger improvements for images Saul Wold

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox