From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on sa.local.altlinux.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.1 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=altlinux.org; s=dkim; h=Subject:Content-Transfer-Encoding:MIME-Version: Message-Id:Date:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=DD5DbQLMRHQx17fs79V5CK+uG9EBTmfPqRw/aP4sC1I=; b=KJB0/WgANk8cfwg4VvMTBf3HXI mNQZnftBMJ2U51u3C2CCUe6AFYChOvWx2ArjgZhjktFIRnq15G6wZLu72BA1Yt+acx3SkjNv7w42C dq04ZDujiOGUmBz32HDi3mqc98QvkBUP3/sMAAcb9d31pF+6lsULp8dLdzqw6u8KRYEmPnam9ravi nlKWuFcaP0pPT8qD9/rdzvdiFdPymMUnUmkzrbFpyfYeHx+ghj+UGXZUuTxF/Ujk7cwFFSoLYe8qk EUZN88sf00TtNdCLRHech8JCHJ8AaYeKjv7C0qAoAnaX0z2SzNu0oFTF3wN+rKdnk00iC6bL/tqxw FPAfGg+Q==; From: "Vladimir D. Seleznev" To: devel@lists.altlinux.org Date: Tue, 21 Jul 2020 01:54:58 +0300 Message-Id: <20200720225458.2391145-1-vseleznv@altlinux.org> X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 81.200.23.88 X-SA-Exim-Mail-From: vseleznv@altlinux.org X-SA-Exim-Version: 4.2.1 X-SA-Exim-Scanned: Yes (on mail.cs.msu.ru) Cc: vseleznv@altlinux.org Subject: [devel] [PATCH] gb-task-check-noarch-i: check package scriptlets X-BeenThere: devel@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: ALT Linux Team development discussions List-Id: ALT Linux Team development discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Jul 2020 22:55:21 -0000 Archived-At: List-Archive: List-Post: 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