Patchwork [1/3] rpm: remove the obsolete rpm-postinsts.bb

login
register
mail settings
Submitter Qi.Chen@windriver.com
Date July 19, 2013, 9:39 a.m.
Message ID <9d5689b2a901728c1695d0889e27d2507c5c61a4.1374226651.git.Qi.Chen@windriver.com>
Download mbox | patch
Permalink /patch/54053/
State Accepted
Commit 7e348654988b1701f58646ab32a18f4d389f7058
Headers show

Comments

Qi.Chen@windriver.com - July 19, 2013, 9:39 a.m.
From: Chen Qi <Qi.Chen@windriver.com>

Now that the postinsts of rpm, deb and ipk are all handled in the one
central place, run-postinsts.bb, the rpm-postinsts.bb recipe is actually
obsolete now. Remove this recipe to avoid confusion.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 meta/recipes-devtools/rpm/rpm-postinsts.bb |   54 ----------------------------
 1 file changed, 54 deletions(-)
 delete mode 100644 meta/recipes-devtools/rpm/rpm-postinsts.bb
Saul Wold - July 22, 2013, 11:49 p.m.
On 07/19/2013 02:39 AM, Qi.Chen@windriver.com wrote:
> From: Chen Qi <Qi.Chen@windriver.com>
>
> Now that the postinsts of rpm, deb and ipk are all handled in the one
> central place, run-postinsts.bb, the rpm-postinsts.bb recipe is actually
> obsolete now. Remove this recipe to avoid confusion.
>
There still seems to be references to rpm-postinsts in the rootfs_rpm, 
package_rpm and image.bb, while these seem unused, we should clean these 
all up at the same time.


Sau!

> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
> ---
>   meta/recipes-devtools/rpm/rpm-postinsts.bb |   54 ----------------------------
>   1 file changed, 54 deletions(-)
>   delete mode 100644 meta/recipes-devtools/rpm/rpm-postinsts.bb
>
> diff --git a/meta/recipes-devtools/rpm/rpm-postinsts.bb b/meta/recipes-devtools/rpm/rpm-postinsts.bb
> deleted file mode 100644
> index ba58cd4..0000000
> --- a/meta/recipes-devtools/rpm/rpm-postinsts.bb
> +++ /dev/null
> @@ -1,54 +0,0 @@
> -DESCRIPTION = "RPM postinstall script"
> -SECTION = "core"
> -LICENSE = "LGPLv2.1"
> -LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/LGPL-2.1;md5=1a6d268fd218675ffea8be556788b780"
> -
> -inherit allarch
> -#
> -# Allow distributions to alter when [postponed] package install scripts are run
> -#
> -POSTINSTALL_INITPOSITION ?= "98"
> -
> -do_fetch() {
> -	:
> -}
> -
> -do_configure() {
> -	:
> -}
> -
> -do_compile() {
> -	:
> -}
> -
> -do_install() {
> -	:
> -}
> -
> -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
> -[ -e ${sysconfdir}/default/postinst ] && . ${sysconfdir}/default/postinst
> -[ -d ${sysconfdir}/rpm-postinsts ] && for i in `ls ${sysconfdir}/rpm-postinsts/`; do
> -	i=${sysconfdir}/rpm-postinsts/$i
> -	echo "Running postinst $i..."
> -	if [ -x $i ]; then
> -		if [ "$POSTINST_LOGGING" = "1" ]; then
> -			$i >>$LOGFILE 2>&1
> -		else
> -			$i
> -		fi
> -		rm $i
> -	else
> -		echo "ERROR: postinst $i failed."
> -	fi
> -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
> -fi
> -}
> -
> -ALLOW_EMPTY_${PN} = "1"
>
Qi.Chen@windriver.com - July 23, 2013, 2:04 a.m.
On 07/23/2013 07:49 AM, Saul Wold wrote:
> On 07/19/2013 02:39 AM, Qi.Chen@windriver.com wrote:
>> From: Chen Qi <Qi.Chen@windriver.com>
>>
>> Now that the postinsts of rpm, deb and ipk are all handled in the one
>> central place, run-postinsts.bb, the rpm-postinsts.bb recipe is actually
>> obsolete now. Remove this recipe to avoid confusion.
>>
> There still seems to be references to rpm-postinsts in the rootfs_rpm, 
> package_rpm and image.bb, while these seem unused, we should clean 
> these all up at the same time.
>
Hi Saul,

I checked these classes, no reference to the rpm-postinsts recipe.

And we can see that the ROOTFS_PKGMANAGE_BOOTSTRAP has been changed to 
'run-postinsts'.
meta/classes/rootfs_rpm.bbclass:ROOTFS_PKGMANAGE_BOOTSTRAP = "run-postinsts"

There are references to the /etc/rpm-postinsts directory which is 
actually handled by run-postinsts.bb recipe now.

Best Regards,
Chen Qi

>
> Sau!
>
>> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
>> ---
>>   meta/recipes-devtools/rpm/rpm-postinsts.bb |   54 
>> ----------------------------
>>   1 file changed, 54 deletions(-)
>>   delete mode 100644 meta/recipes-devtools/rpm/rpm-postinsts.bb
>>
>> diff --git a/meta/recipes-devtools/rpm/rpm-postinsts.bb 
>> b/meta/recipes-devtools/rpm/rpm-postinsts.bb
>> deleted file mode 100644
>> index ba58cd4..0000000
>> --- a/meta/recipes-devtools/rpm/rpm-postinsts.bb
>> +++ /dev/null
>> @@ -1,54 +0,0 @@
>> -DESCRIPTION = "RPM postinstall script"
>> -SECTION = "core"
>> -LICENSE = "LGPLv2.1"
>> -LIC_FILES_CHKSUM = 
>> "file://${COREBASE}/meta/files/common-licenses/LGPL-2.1;md5=1a6d268fd218675ffea8be556788b780"
>> -
>> -inherit allarch
>> -#
>> -# Allow distributions to alter when [postponed] package install 
>> scripts are run
>> -#
>> -POSTINSTALL_INITPOSITION ?= "98"
>> -
>> -do_fetch() {
>> -    :
>> -}
>> -
>> -do_configure() {
>> -    :
>> -}
>> -
>> -do_compile() {
>> -    :
>> -}
>> -
>> -do_install() {
>> -    :
>> -}
>> -
>> -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
>> -[ -e ${sysconfdir}/default/postinst ] && . 
>> ${sysconfdir}/default/postinst
>> -[ -d ${sysconfdir}/rpm-postinsts ] && for i in `ls 
>> ${sysconfdir}/rpm-postinsts/`; do
>> -    i=${sysconfdir}/rpm-postinsts/$i
>> -    echo "Running postinst $i..."
>> -    if [ -x $i ]; then
>> -        if [ "$POSTINST_LOGGING" = "1" ]; then
>> -            $i >>$LOGFILE 2>&1
>> -        else
>> -            $i
>> -        fi
>> -        rm $i
>> -    else
>> -        echo "ERROR: postinst $i failed."
>> -    fi
>> -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
>> -fi
>> -}
>> -
>> -ALLOW_EMPTY_${PN} = "1"
>>
>
>

Patch

diff --git a/meta/recipes-devtools/rpm/rpm-postinsts.bb b/meta/recipes-devtools/rpm/rpm-postinsts.bb
deleted file mode 100644
index ba58cd4..0000000
--- a/meta/recipes-devtools/rpm/rpm-postinsts.bb
+++ /dev/null
@@ -1,54 +0,0 @@ 
-DESCRIPTION = "RPM postinstall script"
-SECTION = "core"
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/LGPL-2.1;md5=1a6d268fd218675ffea8be556788b780"
-
-inherit allarch
-#
-# Allow distributions to alter when [postponed] package install scripts are run
-#
-POSTINSTALL_INITPOSITION ?= "98"
-
-do_fetch() {
-	:
-}
-
-do_configure() {
-	:
-}
-
-do_compile() {
-	:
-}
-
-do_install() {
-	:
-}
-
-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
-[ -e ${sysconfdir}/default/postinst ] && . ${sysconfdir}/default/postinst
-[ -d ${sysconfdir}/rpm-postinsts ] && for i in `ls ${sysconfdir}/rpm-postinsts/`; do
-	i=${sysconfdir}/rpm-postinsts/$i
-	echo "Running postinst $i..."
-	if [ -x $i ]; then
-		if [ "$POSTINST_LOGGING" = "1" ]; then
-			$i >>$LOGFILE 2>&1
-		else
-			$i
-		fi
-		rm $i
-	else
-		echo "ERROR: postinst $i failed."
-	fi
-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
-fi
-}
-
-ALLOW_EMPTY_${PN} = "1"