From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Tue, 16 Mar 2010 20:24:18 +0300 From: Alexey Tourbin To: devel@lists.altlinux.org Message-ID: <20100316172418.GM8189@altlinux.org> Mail-Followup-To: devel@lists.altlinux.org References: <20100316141101.GI8189@altlinux.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="pWAGJYLEitsbNOt2" Content-Disposition: inline In-Reply-To: <20100316141101.GI8189@altlinux.org> Subject: Re: [devel] gb-task-check-lastchange: inheritance by src.rpm changelog 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: Tue, 16 Mar 2010 17:24:19 -0000 Archived-At: List-Archive: List-Post: --pWAGJYLEitsbNOt2 Content-Type: multipart/mixed; boundary="scYsJfBjqkrBfg1Z" Content-Disposition: inline --scYsJfBjqkrBfg1Z Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Mar 16, 2010 at 05:11:01PM +0300, Alexey Tourbin wrote: > gb-task-check-lastchange: new check for inheritance > http://git.altlinux.org/people/at/packages/girar-builder.git?a=3Dcommitdi= ff;h=3D132737dc >=20 > +# > +# When updating a package V1->V2, last changelog entry in V1 > +# must be present among changelog entries in V2. This is how > +# we can retain NMU and promote QA activity. > +# More examples follow along with a simple script to automate comparsion. [at@altair at]$ ./changelogdiff /ALT/archive/Sisyphus/2009/08/01 /ALT/archi= ve/Sisyphus/2009/09/01 >diff --scYsJfBjqkrBfg1Z Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=changelogdiff Content-Transfer-Encoding: quoted-printable #!/bin/sh -efu =2E tmpdir.sh cd $TMPDIR repo1=3D$1 repo2=3D$2 ls $repo1/files/SRPMS/ |perl -pe 's/(.+)-(.+)-(.+)/$1\t$1-$2-$3/' >NF1 ls $repo2/files/SRPMS/ |perl -pe 's/(.+)-(.+)-(.+)/$1\t$1-$2-$3/' >NF2 sort -u -o NF1{,} sort -u -o NF2{,} join NF1 NF2 |awk '$2!=3D$3{print$2,$3}' >check changelog() { =20 rpmquery --qf '[%{CHANGELOGTIME:day}\t%{CHANGELOGNAME}\n]' -p "$1" | perl -pe 's/\t.*<(\S+)(?:\@| at )([\w-]+).*>[ \t]*/\t$1\@$2\t/' } check() { =20 changelog "$1" >c1 changelog "$2" >c2 lastchange=3D$(head -1 c1) if ! fgrep -qs -x -e "${lastchange:?}" c2; then rpm -q --changelog -p "$1" >${1##*/}.changelog rpm -q --changelog -p "$2" >${2##*/}.changelog diff -u {${1##*/},${2##*/}}.changelog || [ $? =3D 1 ] fi } while read -r F1 F2; do F1=3D$repo1/files/SRPMS/$F1 F2=3D$repo2/files/SRPMS/$F2 check $F1 $F2 done