From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Sat, 11 Aug 2007 02:17:38 +0400 From: "Dmitry V. Levin" To: ALT Devel discussion list Message-ID: <20070810221738.GA9864@nomad.office.altlinux.org> Mail-Followup-To: ALT Devel discussion list References: <20070810162933.D1EC08E80D5@ssh.git.local.altlinux.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="AhhlLboLdkugWU4S" Content-Disposition: inline In-Reply-To: <20070810162933.D1EC08E80D5@ssh.git.local.altlinux.org> X-fingerprint: FE4C 93AB E19A 2E4C CB5D 3E4E 7CAB E6AC 9E35 361E Subject: Re: [devel] [git update] packages/hasher: heads/master X-BeenThere: devel@lists.altlinux.org X-Mailman-Version: 2.1.9rc1 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, 10 Aug 2007 22:17:40 -0000 Archived-At: List-Archive: List-Post: --AhhlLboLdkugWU4S Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Aug 10, 2007 at 08:29:33PM +0400, Alexey M. Tourbin wrote: > Update of /people/at/packages/hasher.git [...] > On the "install ... && Verbose ... || Fatal ..." clauses. I think th= is > is overkill. =ED=CE=C5 =D7=C1=D6=CE=CF =CE=C5 =D4=CF=CC=D8=CB=CF =D7=C9=C4=C5=D4=D8 =D0= =D2=C9=DE=C9=CE=D5 =D3=C2=CF=D1, =CE=CF =C9 =D2=C5=C1=CB=C3=C9=C0 =D0=D2=CF= =C7=D2=C1=CD=CD=D9 =CE=C1 =D3=C2=CF=CA. =F7=CF=DA=CD=CF=D6=CE=CF, =C4=C9=C1=C7=CE=CF=D3=D4=C9=CB=C1 =CF=D4 install = =C9 =C4=CF=D3=D4=C1=D4=CF=DE=CE=C1. =F2=C5=DB=C5=CE=C9=C5 =D0=D2=C9=CE=C9= =CD=C1=C5=D4=D3=D1 =D3=D5=C2=DF=C5=CB=D4=C9=D7=CE=CF =D7 =CB=C1=D6=C4=CF=CD =CB=CF=CE=CB=D2=C5= =D4=CE=CF=CD =D3=CC=D5=DE=C1=C5. > On the "if shell_function ...; then ...' clauses. This is evil. Don= 't use > shell function in the "if" conditions, because "sh -e" mode is disabl= ed for > such calls. You can no longer expect that something "just fails". =F4=CF =D6=C5 =D3=C1=CD=CF=C5 =CB=C1=D3=C1=C5=D4=D3=D1 =C9 shell_function &= & on_success || on_failure. > On the "cat file |while read ...; grep || echo >bad; .. done' clauses. > I replaced them with "while ... done + rm -rf cache/contents/list.new > + mkdir -p $verbose cache/contents/list.new =FA=C4=C5=D3=D8 =C9 =C4=C1=CC=C5=C5, "rm -rf" =D3 =D0=CF=D3=CC=C5=C4=D5=C0= =DD=C9=CD "mkdir -p" =CE=C1 =CF=C4=C9=CE =C9 =D4=CF=D4 =D6=C5 =CB=C1=D4=C1= =CC=CF=C7 -- =DC=D4=CF =CE=C5=CB=CF=CE=D3=C9=D3=D4=C5=CE=D4=CE=CF; "-p" =D3=C2=C9=D7=C1= =C5=D4 =D3 =D4=CF=CC=CB=D5 =DE=C9=D4=C1=C0=DD=C5=C7=CF =CB=CF=C4. > + rm -rf cache/contents/tmp > + mkdir -p cache/contents/tmp > + local contents=3Dcache/contents/tmp/contents [...] > + contents_index_bin=3Dchroot/.host/contents_index_bin [...] > + cat <"$contents.bin" >"$contents_index_bin" > + rm -rf cache/contents/tmp =FA=C4=C5=D3=D8 =CD=CF=D6=CE=CF =DA=C1=CD=C5=CE=C9=D4=D8 cat =CE=C1 mv. [...] > + rm -rf cache/contents/{index,list} > + install -p -m644 $verbose chroot/.host/contents_index_bin cache/content= s/contents_index_bin > + install -p -m644 $verbose chroot/.host/contents_index_all.gz cache/cont= ents/contents_index_all.gz =F4=CF=C7=C4=C1 =D5=D6 ln. > + contents_index_bin=3Dchroot/.host/contents_index_bin > + contents_index_all=3Dchroot/.host/contents_index_all.gz > + install -p -m644 $verbose cache/contents/contents_index_bin "$contents_= index_bin" > + install -p -m644 $verbose cache/contents/contents_index_all.gz "$conten= ts_index_all" =E9 =DA=C4=C5=D3=D8 =CD=CF=D6=CE=CF ln. --=20 ldv --AhhlLboLdkugWU4S Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQFGvOQCfKvmrJ41Nh4RAhK3AJ4i7a5M0Sp8Z1Dqg5iksrMJ5TOuDQCgj3Qs xXokigsQqF+WhtIJaoHOqTM= =4DjJ -----END PGP SIGNATURE----- --AhhlLboLdkugWU4S--