diff options
Diffstat (limited to 'meta')
| -rw-r--r-- | meta/recipes-devtools/dpkg/dpkg.inc | 23 | ||||
| -rw-r--r-- | meta/recipes-devtools/opkg/opkg.inc | 3 | ||||
| -rw-r--r-- | meta/recipes-devtools/rpm/rpm-postinsts.bb | 19 | 
3 files changed, 28 insertions, 17 deletions
| diff --git a/meta/recipes-devtools/dpkg/dpkg.inc b/meta/recipes-devtools/dpkg/dpkg.inc index 6bb1e16617..555492089f 100644 --- a/meta/recipes-devtools/dpkg/dpkg.inc +++ b/meta/recipes-devtools/dpkg/dpkg.inc @@ -39,15 +39,6 @@ POSTLOG ?= "/var/log/postinstall.log"  REDIRECT_CMD = "${@base_contains('IMAGE_FEATURES', 'debug-tweaks', '>${POSTLOG} 2>&1', '', d)}"  DPKG_INIT_POSITION ?= "98" -do_install_prepend () { -	install -d ${D}/${sysconfdir}/rcS.d -	# this happens at S98 where our good 'ole packages script used to run -	echo "#!/bin/sh -dpkg --configure -a ${REDIRECT_CMD} -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 () {  	if [ "${PN}" = "dpkg-native" ]; then @@ -67,6 +58,20 @@ do_install_append_class-native () {  	done  } +pkg_postinst_${PN} () { +#!/bin/sh +if [ "x$D" != "x" ] && [ -f $D/var/lib/dpkg/status ]; then +	install -d ${D}/${sysconfdir}/rcS.d + +	# this happens at S98 where our good 'ole packages script used to run +	echo "#!/bin/sh +dpkg --configure -a ${REDIRECT_CMD} +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 +fi +} +  PROV = "virtual/update-alternatives"  PROV_class-native = "" diff --git a/meta/recipes-devtools/opkg/opkg.inc b/meta/recipes-devtools/opkg/opkg.inc index f9c120257b..ff26b04b6e 100644 --- a/meta/recipes-devtools/opkg/opkg.inc +++ b/meta/recipes-devtools/opkg/opkg.inc @@ -62,8 +62,9 @@ REDIRECT_CMD = "${@base_contains('IMAGE_FEATURES', 'debug-tweaks', '>${POSTLOG}  pkg_postinst_${PN} () {  #!/bin/sh -if [ "x$D" != "x" ]; then +if [ "x$D" != "x" ] && [ -f $D/var/lib/opkg/status ]; then  	install -d $D${sysconfdir}/rcS.d +  	# this happens at S98 where our good 'ole packages script used to run  	echo "#!/bin/sh  opkg-cl configure ${REDIRECT_CMD} diff --git a/meta/recipes-devtools/rpm/rpm-postinsts.bb b/meta/recipes-devtools/rpm/rpm-postinsts.bb index fb05ad6d51..b551c8d4f0 100644 --- a/meta/recipes-devtools/rpm/rpm-postinsts.bb +++ b/meta/recipes-devtools/rpm/rpm-postinsts.bb @@ -27,15 +27,17 @@ do_compile() {  }  do_install() { -	install -d ${D}/${sysconfdir}/rcS.d -	# Stop $i getting expanded below... -	i=\$i -	cat > ${D}${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts << EOF -#!/bin/sh +	: +} +pkg_postinst_${PN} () { +if [ "x$D" != "x" ] && [ -f $D/var/lib/rpm/Packages ]; then +	install -d $D/${sysconfdir}/rcS.d +	cat > $D${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts << "EOF" +#!/bin/sh  . /etc/default/rcS -[ -d /etc/rpm-postinsts ] && for i in \`ls /etc/rpm-postinsts/ \`; do +[ -d /etc/rpm-postinsts ] && for i in `ls /etc/rpm-postinsts/`; do  	i=/etc/rpm-postinsts/$i  	echo "Running postinst $i..."  	if [ -f $i ] && $i ${REDIRECT_CMD}; then @@ -46,5 +48,8 @@ do_install() {  done  rm -f ${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts 2>/dev/null  EOF -	chmod 0755 ${D}${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts +	chmod 0755 $D${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts +fi  } + +ALLOW_EMPTY_${PN} = "1" | 
