* Re: [devel] [git update] packages/hasher: heads/master
@ 2007-08-08 22:09 ` Dmitry V. Levin
2007-08-08 22:27 ` Alexey Tourbin
2007-08-08 22:52 ` Alexey Tourbin
0 siblings, 2 replies; 3+ messages in thread
From: Dmitry V. Levin @ 2007-08-08 22:09 UTC (permalink / raw)
To: ALT Devel discussion list
[-- Attachment #1: Type: text/plain, Size: 2305 bytes --]
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 <at@altlinux>
> 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
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [devel] [git update] packages/hasher: heads/master
2007-08-08 22:09 ` [devel] [git update] packages/hasher: heads/master Dmitry V. Levin
@ 2007-08-08 22:27 ` Alexey Tourbin
2007-08-08 22:52 ` Alexey Tourbin
1 sibling, 0 replies; 3+ messages in thread
From: Alexey Tourbin @ 2007-08-08 22:27 UTC (permalink / raw)
To: ALT Devel discussion list
[-- Attachment #1: Type: text/plain, Size: 1666 bytes --]
On Thu, Aug 09, 2007 at 02:09:24AM +0400, Dmitry V. Levin wrote:
> 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 <at@altlinux>
> > 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'у оба
> индексных файла; если передаётся полный индекс, то зачем ещё передавать
> частичный?
У меня есть более свежая наработка, там почти всё переделано. Я сейчас
посмотрю, можно его прямо сейчас закоммитить для preview чтобы не было
слишком стыдно или нет.
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [devel] [git update] packages/hasher: heads/master
2007-08-08 22:09 ` [devel] [git update] packages/hasher: heads/master Dmitry V. Levin
2007-08-08 22:27 ` Alexey Tourbin
@ 2007-08-08 22:52 ` Alexey Tourbin
1 sibling, 0 replies; 3+ messages in thread
From: Alexey Tourbin @ 2007-08-08 22:52 UTC (permalink / raw)
To: ALT Devel discussion list
[-- Attachment #1: Type: text/plain, Size: 2014 bytes --]
On Thu, Aug 09, 2007 at 02:09:24AM +0400, Dmitry V. Levin wrote:
> > -${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'у оба
> индексных файла; если передаётся полный индекс, то зачем ещё передавать
> частичный?
index_bin занимает порядка 700K, index_all без сжатия занимает порядка
90M. Это очень большая разница. В /usr/lib/rpm/find-package я вчера
реализовал некоторые вещи, которые сводятся к тому, что поиск по
index_all идёт только в самых крайних случаях.
> [...]
> > + set -x
>
> Если код работает, то это надо убрать.
Это недоделанный код, о чём я написал в commit message.
С окончательным кодом пойдёт commit message с подробным комментарием.
> [...]
> > + <"$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, похоже, никогда не зануляется.
Он создаётся там же, где и "$contents", т.е. в tmpdir=.../tmp,
а этот каталог tmp должен перед этим удаляться.
Этот код в любом случае неправильный, последовательность каталогов
должна более просто конфигурироваться.
> [...]
> > + gzip <"$contents" >"$contents_index_all"
> А стоит ли его cжимать?
Сжимается с 90M до 7M (очено много). Я исхожу из того, что для сборки
большинства пакетов index_all не нужен. На самом деле нужен realtime
compressor типа lzop, но сейчас не время.
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-08-08 22:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-08 22:09 ` [devel] [git update] packages/hasher: heads/master Dmitry V. Levin
2007-08-08 22:27 ` Alexey Tourbin
2007-08-08 22:52 ` Alexey Tourbin
ALT Linux Team development discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
public-inbox-index devel
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.devel
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git