On Tue, Aug 07, 2007 at 04:41:26PM +0400, Alexey M. Tourbin wrote: > Update of /people/at/packages/hasher.git > > Changes statistics since common ancestor `1.2.5-alt1-5-g26e3fbc' follows: > hasher/hsh-initroot | 3 +- > hasher/hsh-sh-cache-contents-functions | 87 +++++++++++++------------------ > 2 files changed, 39 insertions(+), 51 deletions(-) > > Changelog since common ancestor `1.2.5-alt1-5-g26e3fbc' follows: > commit 4180e774c1919b5a31b0f6fa066c4dad733ca5c1 > Author: Alexey Tourbin > Date: Tue Aug 7 16:08:07 2007 +0400 > > cache-contents-functions: introduced contents_index_all.gz > > This commit is for preview only, description pending for update. > > Full diff since common ancestor `1.2.5-alt1-5-g26e3fbc' follows: > diff --git a/hasher/hsh-initroot b/hasher/hsh-initroot > index 3d681b7..901db8a 100755 > --- a/hasher/hsh-initroot > +++ b/hasher/hsh-initroot [...] > -${contents_index_bin:+%_pkg_contents_index_bin /.host/contents_index_bin} > +${contents_index_bin:+%_pkg_contents_index_bin /.host/${contents_index_bin##*/}} > +${contents_index_all:+%_pkg_contents_index_all /.host/${contents_index_all##*/}} Здесь и далее, я не понимаю, зачем нужно передавать rpmbuild'у оба индексных файла; если передаётся полный индекс, то зачем ещё передавать частичный? [...] > + set -x Если код работает, то это надо убрать. [...] > + <"$contents" >>"$contents.bin" grep '^/bin/' || [ $? -eq 1 ] > + <"$contents" >>"$contents.bin" grep '^/sbin/' || [ $? -eq 1 ] > + <"$contents" >>"$contents.bin" grep '^/usr/bin/' || [ $? -eq 1 ] > + <"$contents" >>"$contents.bin" grep '^/usr/sbin/' || [ $? -eq 1 ] > + <"$contents" >>"$contents.bin" grep '^/usr/X11R6/bin/' || [ $? -eq 1 ] > + <"$contents" >>"$contents.bin" grep '^/etc/' || [ $? -eq 1 ] > + > + cat <"$contents.bin" >"$contents_index_bin" Этот новообразованный $contents.bin, похоже, никогда не зануляется. [...] > + gzip <"$contents" >"$contents_index_all" А стоит ли его cжимать? [...] > + set +x Если код работает, то это надо убрать. [...] > + Verbose 'Prepared contents index.' > + chmod 644 "$contents_index_bin" "$contents_index_all" В этом варианте имеет смысл поменять строчки местами. -- ldv