From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on sa.int.altlinux.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Date: Sun, 15 Nov 2009 14:07:32 +0200 From: Michael Shigorin To: ALT Linux Team development discussions Message-ID: <20091115120731.GX13476@osdn.org.ua> Mail-Followup-To: ALT Linux Team development discussions References: <20091105153000.GT13476@osdn.org.ua> <20091112225136.GR13476@osdn.org.ua> <20091114133632.GC23671@osdn.org.ua> <20091114134129.GA22352@wo.int.altlinux.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Z8yxTSU1mh2gsre7" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20091114134129.GA22352@wo.int.altlinux.org> User-Agent: Mutt/1.4.2.1i Subject: Re: [devel] Better place for 5.1-based community releases, iso-builder? 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: Sun, 15 Nov 2009 12:07:48 -0000 Archived-At: List-Archive: List-Post: --Z8yxTSU1mh2gsre7 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: 8bit On Sat, Nov 14, 2009 at 04:41:29PM +0300, Dmitry V. Levin wrote: > > Примерно так: > > apt-cache pkgnames > list1 > > cleanup_pkglist pkg/lists/contrib > list2 > > comm -23 list1 list2 > Please note that comm(1) compares two SORTED files. Да, переупростил. -- ---- WBR, Michael Shigorin ------ Linux.Kiev http://www.linux.kiev.ua/ --Z8yxTSU1mh2gsre7 Content-Type: application/x-sh Content-Disposition: attachment; filename="checklist.sh" Content-Transfer-Encoding: quoted-printable #!/bin/sh=0A=0A# Parameters: =0Afprofilelist=3D$1=0Afpkgnames=3D`mktemp /tmp/pkgchecker.names.XXXXX`= =0Afpkgwildcards=3D`mktemp /tmp/pkgchecker.wildcards.XXXXX`=0Afavaillist=3D= $2=0Aftemp=3D`mktemp /tmp/pkgchecker.XXXXX` =0A=0A# cleaning pkg list from = comments, emty lines, replacing * with '.*' for wildcards=0A# splitting sev= eral pkgnames on the one line=0Ased -e '/^#/d' -e '/^$/d' -e 's/ \+$//' -e = 's/ \+/\n/g' < $fprofilelist | sort -u > $ftemp # got list of pkg names we = need=0A=0A# split pkgnames without wildcards and with wildcards=0Afgrep -v = '*' $ftemp > $fpkgnames=0Afgrep '*' $ftemp > $fpkgwildcards=0Asort $favai= llist > $ftemp=0A=0A# return not available packages=0Acomm -2 -3 $fpkgnames= $ftemp =0A=0A# return not available wildcards=0Afor i in `cat $fpkgwildcar= ds`; do=0A # replacing * with regexp's \.+=0A pattern=3D"^`echo $i | sed -e= 's/\*/.\\\\+/'`$"=0A if ! grep "$pattern" $favaillist >/dev/null; then=0A = echo "$i"=0A fi=0Adone=0A=0A# cleaning up=0Arm $ftemp $fpkgnames $fpkgwild= cards=0A --Z8yxTSU1mh2gsre7--