ALT Linux Team development discussions
 help / color / mirror / Atom feed
* [devel] [PATCH] gb-task-check-noarch-i: check package scriptlets
@ 2020-07-20 22:54 Vladimir D. Seleznev
  2020-07-20 23:00 ` Vladimir D. Seleznev
  0 siblings, 1 reply; 10+ messages in thread
From: Vladimir D. Seleznev @ 2020-07-20 22:54 UTC (permalink / raw)
  To: devel; +Cc: vseleznv

New function dump_scriptlets() prints content of RPM package scriptlets.

* dump_scriptlets(): New function.
* dump_noarch(): Use dump_scriptlets().
* dump_arch(): Use dump_scriptlets().
---
 gb/gb-task-check-noarch-i | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/gb/gb-task-check-noarch-i b/gb/gb-task-check-noarch-i
index 2e38b6c..2527c84 100755
--- a/gb/gb-task-check-noarch-i
+++ b/gb/gb-task-check-noarch-i
@@ -79,10 +79,20 @@ dump_deps()
 	rpmquery --qf "$R$P$O$C" -p "$1"
 }
 
+dump_scriptlets()
+{
+	for rpmtag in POSTIN POSTINPROG POSTUN POSTUNPROG PREIN PREINPROG PREUN PREUNPROG; do
+		# print nicely formated scriptlet
+		rpmquery --qf "%{$rpmtag}\n" -p "$1" |sed '=' |
+			sed "s,^,${rpmtag}:,;N;s,\n, ,"
+	done
+}
+
 dump_noarch()
 {
 	dump_rpmfile "$1"
 	dump_deps "$1"
+	dump_scriptlets "$1"
 }
 
 set -- $GB_ARCH
@@ -176,6 +186,7 @@ dump_arch()
 	rpmquery --qf "$F" -p "$1" |
 		LC_ALL=C grep -v '^/usr/share/' || [ $? -eq 1 ]
 	dump_deps "$1"
+	dump_scriptlets "$1"
 }
 
 srcN=
-- 
2.25.4



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-07-27 12:34 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-20 22:54 [devel] [PATCH] gb-task-check-noarch-i: check package scriptlets Vladimir D. Seleznev
2020-07-20 23:00 ` Vladimir D. Seleznev
2020-07-21 11:49   ` Dmitry V. Levin
2020-07-21 11:57     ` Vladimir D. Seleznev
2020-07-21 12:02       ` Dmitry V. Levin
2020-07-21 12:15         ` Vladimir D. Seleznev
2020-07-21 12:28           ` Dmitry V. Levin
2020-07-21 12:40   ` Vladimir D. Seleznev
2020-07-21 12:42     ` Vladimir D. Seleznev
2020-07-27 12:34     ` Dmitry V. Levin

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git