From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Fri, 12 May 2006 22:52:26 +0400 From: Alexey Tourbin To: ALT Linux Devel Mailing List Message-ID: <20060512185226.GK9655@localhost> Mail-Followup-To: ALT Linux Devel Mailing List References: <20060510091438.GC28000@lks.home> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="w2xx78T4DcG3O+DJ" Content-Disposition: inline In-Reply-To: <20060510091438.GC28000@lks.home> Subject: Re: [devel] Q: at@ robots X-BeenThere: devel@lists.altlinux.org X-Mailman-Version: 2.1.7 Precedence: list Reply-To: ALT Devel discussion list List-Id: ALT Devel discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2006 18:51:43 -0000 Archived-At: List-Archive: List-Post: --w2xx78T4DcG3O+DJ Content-Type: multipart/mixed; boundary="k18oBAwMkTg3OUap" Content-Disposition: inline --k18oBAwMkTg3OUap Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, May 10, 2006 at 01:14:38PM +0400, Konstantin A. Lepikhov wrote: > =EE=C5 =D4=C1=CB =C4=C1=D7=CE=CF =CE=C1 =CB=C1=CB=CF=CA-=D4=CF =C9=DA =CD= =C1=DB=C9=CE =D7 =CF=C6=C9=D3=C5 =CF=C2=C9=D4=C1=CC =D2=CF=C2=CF=D4, =CB=CF= =D4=CF=D2=D9=CA > =D0=C5=D2=C9=CF=C4=C9=DE=C5=D3=CB=C9 =CC=C1=DA=C9=CC =D0=CF CPAN =C9 =D3= =D0=C1=CD=C9=CC =CD=C1=CE=D4=C5=CA=CE=C5=D2=CF=D7 =D3=CF=CF=D4=D7=C5=D3=D4= =D7=D5=C0=DD=C9=C8 =D0=C5=D2=CC=CF=D7=D9=C8 > =CD=CF=C4=D5=CC=C5=CA =CF =D7=D9=C8=CF=C4=C5 =CE=CF=D7=D9=C8 =D7=C5=D2=D3= =C9=CA. =F0=CF=D4=CF=CD =DE=D4=CF-=D4=CF =DC=D4=CF=D4 =D2=CF=C2=CF=D4 =DA= =C1=D4=C9=C8. =EF=CE =D5=CD=C5=D2, =C9=CC=C9 > =CE=C1 =CE=C5=C7=CF/=D0=D2=CF =CE=C5=C7=CF =DA=C1=C2=C9=CC=C9/=DA=C1=C2= =D9=CC=C9? :) =EF=CE =D2=C1=C2=CF=D4=C1=C5=D4, =DB=CC=A3=D4 =D0=C9=D3=D8=CD=C1 =CD=CE=C5.= =ED=CF=C7=D5 =D0=C5=D2=C5=D3=D4=D2=CF=C9=D4=D8 =C5=C7=CF =CE=C1 cybertalk. =F7 =D0=D2=C9=CE=C3=C9=D0=C5 =CD=CF=D6=CE=CF =C5=C7=CF =DA=C1=D0=D5=D3=D4= =C9=D4=D8 =C9 =D0=CF=D3=CD=CF=D4=D2=C5=D4=D8. =FE=D4=CF =CE=C5 =CE=D2=C1= =D7=C9=D4=D3=D1 =DE=D4=CF =C5=D3=CC=C9 =CB=C1=CB=CF=CA-=CC=C9=C2=CF =D0=C5=D2=CC=CF=D7=D9=CA =D0=C1=CB=C5=D4 =D3 = =C1=CE=CD=C5=D4=CF=CD =D4=CF=C7=C4=C1 =D7=C5=D3=D8 =D2=CF=C2=CF=D4 =D7=D9= =D7=C1=CC=C9=D7=C1=C5=D4=D3=D1. =EE=C5 =DA=CE=C1=C0 =DE=D4=CF =D3 =DC=D4=C9=CD =CD=CF=D6=CE=CF =D0=D2=C9=C4=D5=CD= =C1=D4=D8. --k18oBAwMkTg3OUap Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=cpan_modules #!/bin/sh -ef hshdir="${1:-$TMPDIR/build}" mkdir -p "$hshdir" cd "${workdir:?}" . trap.sh hsh -q --no-stuff --initroot-only "$hshdir" add_trap hsh -q --cleanup-only "$hshdir" conflicts='perl-Geo-IPfree perl-Module-Signature perl-SOAP-Lite-examples perl-SOAP-Lite perl-Spreadsheet-WriteExcel' # install all perl packages "$hshdir"/aptbox/apt-cache -q --no-all-names pkgnames perl | grep -Fx -v "$conflicts" | xargs hsh-install -q -- "$hshdir" >/dev/null # query CPAN database hsh-run -q -- "$hshdir" perl -MCPAN -e 'CPAN::Shell->r' >cpan.out <modules # list packages that need updating while read -r mod v0 v1 dist; do dep="${mod//:://}"; dep="perl($dep.pm)" pkg="$(hsh-run -q -- "$hshdir" rpm -q --whatprovides --qf '%{NAME}\n' "$dep")" pkg="$(echo "$pkg" |head -1)" who="$(hsh-run -q -- "$hshdir" rpm -q --whatprovides --qf '%{PACKAGER}\n' "$dep")" who="$(echo "$who" |head -1)" who="${who// at /@}"; who="${who// dot /.}" dist="${dist##*/}" printf "%s\t%s\t%s\t%s\t%s\t%s\n" "$pkg" "$mod" "$v0" "$v1" "$dist" "$who" done /dev/null # group by packager xfmt1() { sort -t$'\t' +5 |awk -F'\t' 'who != $6 { who = $6; printf "\n%s:\n", who; } { printf "%-16s\t%s\t%s\t%s\t%s\n", $1, $2, $3, $4, $5; }' } fmt_plus() { subj="$subj +$1" echo " $1 NEW $2 added to the list" xfmt1; echo } fmt_minus() { subj="$subj -$1" echo " $1 $2 REMOVED from the list" xfmt1; echo } fmt_total() { subj="$subj ($1)" echo " Total $1 $2 need updating" xfmt1; echo } --k18oBAwMkTg3OUap Content-Type: application/x-sh Content-Disposition: attachment; filename="trap.sh" Content-Transfer-Encoding: quoted-printable #!/bin/sh=0A=0A: __exit_traps=3D=0A=0Aadd_trap()=0A{=0A # TODO: quote args= =0A __exit_traps=3D"$*=0A$__exit_traps"=0A}=0A=0Aremove_trap()=0A{=0A # TOD= O: quote args=0A __exit_traps=3D"$(printf %s "$__exit_traps" |grep -Fvx "$*= ")"=0A}=0A=0Atrap_atexit()=0A{=0A local t_rc=3D$?=0A trap - EXIT=0A eval "$= __exit_traps"=0A exit $t_rc=0A}=0A=0Aif [ -z "$__exit_traps" ]; then=0A __e= xit_traps=3D:=0A trap trap_atexit EXIT HUP INT QUIT PIPE TERM=0Afi=0A=0A: <= <'__EOF__'=0A=0A=3Dhead1 NAME=0A=0Atrap.sh - manage exit traps=0A=0A=3Dhead= 1 SYNOPSIS=0A=0A #!/bin/sh=0A . trap.sh=0A lockfile -r0 "$workdir"/lock = || exit=0A add_trap rm -f "$workdir"/lock=0A=0A=3Dhead1 AUTHOR=0A=0AWritte= n by Alexey Tourbin .=0A=0A=3Dhead1 COPYING=0A=0ACopyright= (c) 2006 Alexey Tourbin, ALT Linux Team.=0A=0AThis is free software; you c= an redistribute it and/or modify it under the terms=0Aof the GNU General Pu= blic License as published by the Free Software Foundation;=0Aeither version= 2 of the License, or (at your option) any later version.=0A=0A=3Dcut=0A=0A= __EOF__=0A --k18oBAwMkTg3OUap-- --w2xx78T4DcG3O+DJ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFEZNlqfBKgtDjnu0YRAkYtAKCZUd/AbglnyDYfsU1N0l47rxp0aQCaAzBb AFZ9tQQUy/PGG7qY4Ojv7TI= =l80P -----END PGP SIGNATURE----- --w2xx78T4DcG3O+DJ--