[devel] RFC: girar: optimize rebuild

Gleb Fotengauer-Malinovskiy glebfm на altlinux.org
Сб Апр 11 19:41:45 MSK 2020


On Sat, Apr 11, 2020 at 06:21:01PM +0300, Vladimir D. Seleznev wrote:
> On Sat, Apr 11, 2020 at 02:04:25PM +0300, Gleb Fotengauer-Malinovskiy wrote:
> > Hi,
> > 
> > On Sat, Apr 11, 2020 at 02:10:42AM +0300, Vladimir D. Seleznev wrote:
> > > 
> > > Hi!
> > > 
> > > The first part of rebuilt packages optimization for girar. It introduces
> > > pkg_identity() and simple optimization of the rebuilt sourcerpm.
> > 
> > Why do we rebuild source rpm at all when we already have one?  I mean,
> > when we use hasher with --query-repackage this new rebuilt source rpm is
> > no better then original one.
> > 
> > I think we can always save the original source rpm when we rebuild
> > a package or copy it from branch to branch (like we actually do for
> > packages originally built from src.rpm-s).
> 
> I'm sorry, I was not clear.

No, I think you were clear enough.  Unlike me, obviously. :)

> Sure when a package is built from the sourcerpm, no optimization is
> required in this case as girar saves only original sourcerpm.

Yes.

> The different things happen when package is built
> from the gear. In the case when package is rebuilt from the gear, girar
> produce new source and binary rpms, and when the rebuilt task is done it
> saves all these new source and binary rpms. The proposed optimization is
> aimed for that case.

Yes, I was talking about this same case.
I think we don't need to bother with identity of src.rpm-s at all.
If we build two src.rpm-s from two identical pkg.tar-s we still get
equivalent src.rpm-s because in --query-repackage mode hasher uses src.rpm
as a source archive (buildtime is the only read rpm tag).

Moreover, if we do not store rebuilt src.rpm-s we do not need to rebuild
it at all, we can use old src.rpm for rebuild and copy.

-- 
glebfm
----------- следующая часть -----------
Было удалено вложение не в текстовом формате...
Имя     : signature.asc
Тип     : application/pgp-signature
Размер  : 801 байтов
Описание: отсутствует
Url     : <http://lists.altlinux.org/pipermail/devel/attachments/20200411/20a9d56b/attachment.bin>


Подробная информация о списке рассылки Devel