V2: Create postinstall script for opkg conditionally
cover V2: Create postinstall script for opkg conditionally
V2:
Update commit comments
The following changes since commit f36926a264190e6202830e8520b41b30ae77ea43:
docbook-utils-native: Unbreak the build after source and build dir split (2013-03-25 20:51:19 +0000)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib kangkai/debug-tweaks
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=kangkai/debug-tweaks
Kang Kai (1):
opkg: create run-scripts file conditionally
meta/recipes-devtools/opkg/opkg.inc | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
Signature · 1 line
1.7.5.4
PATCH 1/1 opkg: create run-scripts file conditionally
This bug occurs on rpm-based sdk image.
update-alternatives-cworth is default installed into sato image. And for sato-sdk image, it installs every related dev packages. update-alternatives-cworth is from opkg, so opkg-dev is installed and it requires opkg, then opkg is installed into sato-sdk image.
This causes the script file run-postinsts installed by rpm will be overwrited by opkg on rpm-based sdk image.
Judge the image package type and don't create run-scripts file when package type is not ipk.
[YOCTO #3223]
--- meta/recipes-devtools/opkg/opkg.inc | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
meta/recipes-devtools/opkg/opkg.inc +6 -0
@@ -59,10 +59,16 @@ do_install_append_class-native() { POSTLOG ?= "/var/log/postinstall.log" REDIRECT_CMD = "${@base_contains('IMAGE_FEATURES', 'debug-tweaks', '>${POSTLOG} 2>&1', '', d)}" +PKGTYPE = "${@d.getVar('IMAGE_PKGTYPE', True)}" pkg_postinst_${PN} () { #!/bin/sh if [ "x$D" != "x" ]; then + # if installed to a rpm/deb based image, don't create run-postinsts file + if [ "x${PKGTYPE}" != "xipk" ]; then + exit 0 + fi + install -d $D${sysconfdir}/rcS.d # this happens at S98 where our good 'ole packages script used to run echo "#!/bin/sh
Signature · 1 line
1.7.5.4
Re: [PATCH 1/1] opkg: create run-scripts file conditionally
Quoted 28 lines · Kang Kai
This bug occurs on rpm-based sdk image.
update-alternatives-cworth is default installed into sato image. And for sato-sdk image, it installs every related dev packages. update-alternatives-cworth is from opkg, so opkg-dev is installed and it requires opkg, then opkg is installed into sato-sdk image.
This causes the script file run-postinsts installed by rpm will be overwrited by opkg on rpm-based sdk image.
Judge the image package type and don't create run-scripts file when package type is not ipk.
[YOCTO #3223]
Signed-off-by Kang Kai <[email protected]>--- meta/recipes-devtools/opkg/opkg.inc | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)meta/recipes-devtools/opkg/opkg.inc +0
-0@@ -59,10 +59,16 @@ do_install_append_class-native() { POSTLOG ?= "/var/log/postinstall.log" REDIRECT_CMD = "${@base_contains('IMAGE_FEATURES', 'debug-tweaks', '>${POSTLOG} 2>&1', '', d)}"
meta/recipes-devtools/opkg/opkg.inc do_install_append_class-native() { · line 71
Quoted 10 lines
meta/recipes-devtools/opkg/opkg.inc +6
-0+PKGTYPE = "${@d.getVar('IMAGE_PKGTYPE', True)}" pkg_postinst_${PN} () { #!/bin/sh if [ "x$D" != "x" ]; then + # if installed to a rpm/deb based image, don't create run-postinsts file + if [ "x${PKGTYPE}" != "xipk" ]; then + exit 0 + fi +
I understand what you are trying to do here, I think Richard was questioning if this is the right implementation of the change. I think if you look at how RPM does it and then make the *run-postinsts script an update-alternatives so each package system does it consistently, this will also require a change to dpkg.
Then there might have to be some setting of the PRIORITY for when each package system is installed.
Sau!
Quoted 4 lines
meta/recipes-devtools/opkg/opkg.inc +0
-0install -d $D${sysconfdir}/rcS.d # this happens at S98 where our good 'ole packages script used to run echo "#!/bin/sh
Re: [PATCH 1/1] opkg: create run-scripts file conditionally
Quoted 42 lines · Saul Wold
Quoted 30 lines · Kang Kai
This bug occurs on rpm-based sdk image.
update-alternatives-cworth is default installed into sato image. And for sato-sdk image, it installs every related dev packages. update-alternatives-cworth is from opkg, so opkg-dev is installed and it requires opkg, then opkg is installed into sato-sdk image.
This causes the script file run-postinsts installed by rpm will be overwrited by opkg on rpm-based sdk image.
Judge the image package type and don't create run-scripts file when package type is not ipk.
[YOCTO #3223]
Signed-off-by Kang Kai <[email protected]>---
meta/recipes-devtools/opkg/opkg.inc | 6 ++++++1 files changed, 6 insertions(+), 0 deletions(-)meta/recipes-devtools/opkg/opkg.inc +0
-0@@ -59,10 +59,16 @@ do_install_append_class-native() {POSTLOG ?= "
/var/log/postinstall.log"REDIRECT_CMD= "${@base_contains('IMAGE_FEATURES', 'debug-tweaks', '>${POSTLOG} 2>&1', '', d)}" +PKGTYPE = "${@d.getVar('IMAGE_PKGTYPE', True)}"Quoted 9 lines
pkg_postinst_${PN} () {
#!/bin/sh
if [ "x$D" != "x" ]; then
+ # if installed to a rpm/deb based image, don't create run-postinsts file
+ if [ "x${PKGTYPE}" != "xipk" ]; then
+ exit 0
+ fi
+I understand what you are trying to do here, I think Richard was questioning if this is the right implementation of the change. I think if you look at how RPM does it and then make the *run-postinsts script an update-alternatives so each package system does it consistently, this will also require a change to dpkg.
Quoted 1 line
Then there might have to be some setting of the PRIORITY for when each package system is installed.
Thanks. I'll re-implement it.
Regards,
Kai
Quoted 8 lines
Sau!
Quoted 4 lines
install -d $D${sysconfdir}/rcS.d
# this happens at S98 where our good 'ole packages script used to run echo "#!/bin/sh