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: References:In-Reply-To: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:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=zIBmW0ektxHQZO4KL0toZE78ccz/HkyxOtQP3s/i864=; b=uxI/mfNh92xVA5F8eA6YmW/TQY PLWahdPeEXAc7dK4wADwB+R1PZhdj16wkqsmQ7v+osUQgAXGZXOuMjmfaoFqj/yrYtbReUcLT6yMl 6pfLOJxrpv1Yl22wq08Ekv4wtrTZhxcZ7UI8/V6N+azBG/y6kzBFgJ/yqsFsUDv198q5yz92NeDXg EMyGgHyaWO7WCCxS8cFQzYOgY7pMifmbQP4+p080CToAacMzBdIgBM1DlYXApymdEcKo/qwV80M3P +ljCncOk+lTTtdR+b2uYk7XJkDCUrkViQZqbnaDmV1IHJUY4eGBNoMudn/QGfE1unoOAlDTSukNLA 8y1ztVtA==; From: "Vladimir D. Seleznev" To: devel@lists.altlinux.org Date: Tue, 21 Jul 2020 02:00:31 +0300 Message-Id: <20200720230031.2391597-1-vseleznv@altlinux.org> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200720225458.2391145-1-vseleznv@altlinux.org> References: <20200720225458.2391145-1-vseleznv@altlinux.org> 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: Ivan Zakharyaschev , 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 23:00:37 -0000 Archived-At: List-Archive: List-Post: noarch packages should have equal scriptlets across all arches. New function dump_scriptlets() prints content of RPM package scriptlets. * dump_scriptlets(): New function. * dump_noarch(): Use dump_scriptlets(). * dump_arch(): Use dump_scriptlets(). Reported-by: Ivan Zakharyaschev --- 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