From 34f3926f1787f9a2efa2257a2aaea6ee92adf8a3 Mon Sep 17 00:00:00 2001 From: Kang Kai Date: Fri, 1 Mar 2013 18:02:13 +0800 Subject: package_rpm.bbclass: add more description for pre/post scriptlets When write rpm spec file, one description line "# pkgname - script_type" is added to pre/post scriptlets for base package but no such line writted for subpackage. Add similiar line to subpackage to facilitate handling the pre/post scriptlets. Signed-off-by: Kang Kai Signed-off-by: Richard Purdie --- meta/classes/package_rpm.bbclass | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'meta/classes/package_rpm.bbclass') diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass index 225fc70f2f..c0ba54dd9c 100644 --- a/meta/classes/package_rpm.bbclass +++ b/meta/classes/package_rpm.bbclass @@ -777,19 +777,23 @@ python write_specfile () { # Now process scriptlets if splitrpreinst: spec_scriptlets_bottom.append('%%pre -n %s' % splitname) + spec_scriptlets_bottom.append('# %s - preinst' % splitname) spec_scriptlets_bottom.append(splitrpreinst) spec_scriptlets_bottom.append('') if splitrpostinst: spec_scriptlets_bottom.append('%%post -n %s' % splitname) + spec_scriptlets_bottom.append('# %s - postinst' % splitname) spec_scriptlets_bottom.append(splitrpostinst) spec_scriptlets_bottom.append('') if splitrprerm: spec_scriptlets_bottom.append('%%preun -n %s' % splitname) + spec_scriptlets_bottom.append('# %s - prerm' % splitname) scriptvar = wrap_uninstall(splitrprerm) spec_scriptlets_bottom.append(scriptvar) spec_scriptlets_bottom.append('') if splitrpostrm: spec_scriptlets_bottom.append('%%postun -n %s' % splitname) + spec_scriptlets_bottom.append('# %s - postrm' % splitname) scriptvar = wrap_uninstall(splitrpostrm) spec_scriptlets_bottom.append(scriptvar) spec_scriptlets_bottom.append('') -- cgit v1.2.3