Patchwork [3/4] rootfs_rpm.bbclass: rename postinst trigger script

login
register
mail settings
Submitter Otavio Salvador
Date March 3, 2012, 5:39 p.m.
Message ID <af77629ed96cb6c688540f19806558f6a8034771.1330796256.git.otavio@ossystems.com.br>
Download mbox | patch
Permalink /patch/22637/
State Accepted
Commit 6bc50e531a15728be019af7bec5bce704fb72f8f
Headers show

Comments

Otavio Salvador - March 3, 2012, 5:39 p.m.
Use 'run-postinsts' as trigger script name for consistency against
package managers.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
 meta/classes/rootfs_rpm.bbclass |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
Richard Purdie - March 4, 2012, 4:31 a.m.
On Sat, 2012-03-03 at 17:39 +0000, Otavio Salvador wrote:
> Use 'run-postinsts' as trigger script name for consistency against
> package managers.
> 
> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> ---
>  meta/classes/rootfs_rpm.bbclass |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)

I find the consistency argument a little confusing when you had to
rename this for all of the packaging backends from the same thing?

I understand you want a less confusing name though as configure is an
overloaded word.

Also, please do post the deb patch too. Saying you've just pushed an
extra patch somewhere doesn't really work...

Cheers,

Richard
Otavio Salvador - March 5, 2012, 11:46 a.m.
On Sun, Mar 4, 2012 at 01:31, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> I find the consistency argument a little confusing when you had to
> rename this for all of the packaging backends from the same thing?

I did it because I used run-postinsts package for bootstrap in ipk.

> I understand you want a less confusing name though as configure is an
> overloaded word.

If you prefer I can change this; doesn't matter for me.

> Also, please do post the deb patch too. Saying you've just pushed an
> extra patch somewhere doesn't really work...

Right; once you reply if you want me to change wording I do.

Patch

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