From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Mon, 27 Jul 2020 15:34:14 +0300 From: "Dmitry V. Levin" To: ALT Devel discussion list Message-ID: <20200727123414.GA17816@altlinux.org> References: <20200720230031.2391597-1-vseleznv@altlinux.org> <20200721124024.2475221-1-vseleznv@altlinux.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200721124024.2475221-1-vseleznv@altlinux.org> Subject: Re: [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, 27 Jul 2020 12:34:14 -0000 Archived-At: List-Archive: List-Post: On Tue, Jul 21, 2020 at 03:40:24PM +0300, Vladimir D. Seleznev wrote: > 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 | 17 +++++++++++++++++ > 1 file changed, 17 insertions(+) > > diff --git a/gb/gb-task-check-noarch-i b/gb/gb-task-check-noarch-i > index 2e38b6c..05ade0c 100755 > --- a/gb/gb-task-check-noarch-i > +++ b/gb/gb-task-check-noarch-i > @@ -79,10 +79,26 @@ dump_deps() > rpmquery --qf "$R$P$O$C" -p "$1" > } > > +dump_scriptlets() > +{ > + for rpmtag in POSTIN POSTINPROG \ > + POSTUN POSTUNPROG \ > + PREIN PREINPROG \ > + PREUN PREUNPROG \ > + TRIGGERSCRIPTS TRIGGERSCRIPTPROG \ > + VERIFYSCRIPT VERIFYSCRIPTPROG > + 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 +192,7 @@ dump_arch() > rpmquery --qf "$F" -p "$1" | > LC_ALL=C grep -v '^/usr/share/' || [ $? -eq 1 ] > dump_deps "$1" > + dump_scriptlets "$1" > } > > srcN= Смержено в таком варианте: http://git.altlinux.org/people/ldv/packages/?p=girar.git;a=commitdiff;h=62e87f04fc76d0f97d3fd80ce97c523b651786e2 -- ldv