From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-AntiVirus: Checked by Dr.Web [version: 4.31a, engine: 4.31b, virus records: 47247, updated: 11.03.2004] Message-ID: <405AE8AF.5060100@mail.ru> Date: Fri, 19 Mar 2004 15:33:51 +0300 From: Dmitry Rusetsky User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; ru-RU; rv:1.5) Gecko/20031006 X-Accept-Language: ru,en MIME-Version: 1.0 To: community@altlinux.ru Subject: Re: [Comm] =?KOI8-R?Q?=EB=C1=CB_=D3=D2=C1=D7=CE=C9=D4=D8_=D7?= =?KOI8-R?Q?=C5=D2=D3=C9=C9=3F?= References: <40596E82.9070407@mail.ru> <20040318151243.4d07167f@bortnikov> <20040318130108.GC19921@inferno.immo> <200403181611.47917.ngrechukh@ua.fm> <20040318141511.GE19921@inferno.immo> In-Reply-To: <20040318141511.GE19921@inferno.immo> Content-Type: multipart/mixed; boundary="------------000209050900070803070802" X-BeenThere: community@altlinux.ru X-Mailman-Version: 2.1.4 Precedence: list Reply-To: community@altlinux.ru List-Id: Mailing list for ALT Linux users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2004 12:38:20 -0000 Archived-At: List-Archive: List-Post: This is a multi-part message in MIME format. --------------000209050900070803070802 Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: quoted-printable Alexey I. Froloff =D0=C9=DB=C5=D4: > * Nick S. Grechukh [040318 17:11]: >=20 >>>>>=F0=C9=DB=D5 =D3=CB=D2=C9=D0=D4=C9=CB =D0=CF =CF=DE=C9=D3=D4=CB=C5 /= var/cache/apt/archives =CF=D4 =D3=D4=C1=D2=D9=C8 >>>>>=D7=C5=D2=D3=C9=CA =CF=C4=C9=CE=C1=CB=CF=D7=D9=C8 =D0=C1=CB=C5=D4=CF= =D7. >>>> >>>>=E1 =D0=CF=C4=C5=CC=C9=D4=C5=D3=D8, =D0=CC=C9=DA, =CB=CF=C7=C4=C1 =CE= =C1=D0=C9=DB=C9=D4=C5. :) >>> >>>apt-get autoclean =CE=C5 =D0=CF=C4=C8=CF=C4=C9=D4 =C9=DA =D2=C5=CC=C9=C7= =C9=CF=DA=CE=D9=C8 =D3=CF=CF=C2=D2=C1=D6=C5=CE=C9=CA? >> >>=CF=CE =D4=CF=DE=CE=CF =DE=C9=D3=D4=C9=D4 =D4=CF=CC=D8=CB=CF =D5=D3=D4= =C1=D2=C5=D7=DB=C9=C5, =C1 =CE=C5 =D7=C5=D3=D8 =CB=DC=DB? >=20 > =F7 man apt-get =D7=D3=A3 =CE=C1=D0=C9=D3=C1=CE=CF ;-) >=20 >=20 >=20 > -----------------------------------------------------------------------= - >=20 > _______________________________________________ > Community mailing list > Community@altlinux.ru > http://www.altlinux.ru/mailman/listinfo/community =CE=C1=D3=CB=CF=CC=D8=CB=CF =D1 =D0=CF=CE=D1=CC apt-get autoclean =DE=C9=D3= =D4=C9=D4 =D7=C5=D3=D8 =CB=DC=DB =C1 =D4=D2=C5=C2=D5=C5=D4=D3=D1 =D0=CF=DE=C9=D3=D4=C9=D4=D8 =D4=CF=CC=D8=CB= =CF =D3=D4=C1=D2=D9=C5 =D7=C5=D2=D3=C9=C9 =D0=C1=CB=C5=D4=CF=D7. =D0=CF=D4=CF=CD =CF=D4=D4=D5=C4=C1 =D7=C5=D3=D8 =CB=DC=DB =D0=C5=D2=C5=C2= =D2=C1=D3=D9=D7=C1=C5=D4=D3=D1 =D7 =CC=C1=CE =D0=D5=D4=C5=CD =D0=C5=D2=C5= =D0=C9=D3=D9=D7=C1=CE=C9=D1 if=20 different size =C9 =CF=C2=CE=CF=D7=CC=D1=C0=D4=D8=D3=D1 =CD=C1=DB=C9=CE=D9= =D7 =CC=C1=CE=C5. =C1 =D3=CB=D2=C9=D0=D4 =D7 =D0=C5=D2=D7=CF=CD =D0=D2=C9=C2=CC=C9=D6=C5=CE= =C9=C9 =D7=CF=D4: =D4=CF=CC=D8=CB=CF =CE=C5 =D2=D5=C7=C1=CA=D4=C5. --------------000209050900070803070802 Content-Type: text/plain; name="1_old_filter.sh" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="1_old_filter.sh" #!/bin/sh # # For move old packages to old dir # copy it to /var/cache/apt/arcvives # and if need run it :-) LOG=0rmlist.log ERR=0rmerror.log OLD=old RPMERR=0rpmerr.log mkdir -p old genlist() { #rm_list="" Ver_old="0" Rel_old="0" pack_old="" Name0=$1 ver_res=0 rel_res=0 for j in ${Name0}_*.rpm do #echo $j if [ ! -f $j ] ; then return fi Name=`rpm -qp $j --queryformat %{NAME} 2>>$RPMERR` Ver_current=`rpm -qp $j --queryformat %{VERSION} 2>>$RPMERR` Rel_current=`rpm -qp $j --queryformat %{RELEASE} 2>>$RPMERR` ver_res=`rpmvercmp $Ver_current $Ver_old` rel_res=`rpmvercmp $Rel_current $Rel_old` #echo "rpmvercmp $Ver_current $Ver_old" if [ "$ver_res" -gt 0 ] ; then Ver_old=$Ver_current rmlist="$rmlist $pack_old" #echo 1 - $rmlist elif [ "$ver_res" -lt 0 ] ; then rmlist="$rmlist $j" elif [ "$ver_res" -eq 0 ] ; then if [ "$rel_res" -gt 0 ] ; then Rel_old=$Rel_current rmlist="$rmlist $pack_old" elif [ "$rel_res" -lt 0 ] ; then rmlist="$rmlist $j" elif [ "$rel_res" -eq 0 ] ; then echo ERROR!!!!!!!! exit fi fi pack_old=$j #echo $Name #echo $Ver_current #echo $Rel_current done #echo $rmlist } dublicate() { Name="" rmlist="" flag=0 for i in *.rpm do if [ ! -f $i ] ; then continue fi Name0=`rpm -qp $i --queryformat %{NAME} | sed -e s/_/%5f/g 2>>$ERR` #echo --------Name0=$Name0 -- Name=$Name------------------- echo $i if [ "$Name0" = "$Name" ]; then if [ "$flag" = "1" ] ; then continue fi echo ------------$Name0---------------- >>$LOG genlist $Name0 echo RMLIST IS: $rmlist >>$LOG mv $rmlist $OLD 2>>$ERR rmlist="" echo ----------------------------------------- >>$LOG flag=1 else flag=0 fi Name=$Name0 done #exit } #------------------------------------------------------------- # main() date >>$LOG dublicate #exit --------------000209050900070803070802--