[devel] [PATCH 2/2] gb: optimize rebuilt srpm if its identity is equal to identity of srpm in the repo

Dmitry V. Levin ldv на altlinux.org
Пт Апр 17 16:54:20 MSK 2020


On Fri, Apr 17, 2020 at 12:51:51AM +0300, Alexey Tourbin wrote:
[...]
> So what's the right set of tags for a binary package, and what is its
> identity? (I'm not sure identity is the right word, I would rather
> call it ID. Identity is who you are and what you believe in, for
> example a black person who votes for Obama.)  I've already hinted that
> identity can be defined via substitution: if you replace a package
> with a different package but the same identity, there should be no
> functional difference, and furthermore no difference "for all intents
> and purposes", except for a few observable differences which we deem
> immaterial and permit explicitly, such as FileMtimes. So obviously you
> need to hash at least FileDigests and
> Requires/Provides/Obsoletes/Conflicts. This should satisfy the
> definition of ID for rpm (the dependencies are satisfied in the same
> way, and file conflicts are the resolved in the same way, so rpm can't
> tell the difference if we make a substitution.)

What about various types of scripts?

$ rpmquery --querytags | grep 'PROG$'
PREINPROG
POSTINPROG
PREUNPROG
POSTUNPROG
VERIFYSCRIPTPROG
TRIGGERSCRIPTPROG

> It isn't clear whether you should hash informational sections such as
> %description. It can be argued that under the same NEVR, the
> description shouldn't change anyway. Is it possible that nothing
> changes in a package but the description? Would we still want to
> update/replace the package then?
> 
> Finally, your identity hash need not to be fixed once and forever. It
> is used only for internal bookkeeping, so once in a while you are
> allowed to change the hash and rebuild the identity-addressable
> storage. You should have a script for that in girar/admin. It may take
> an hour or so to complete, but that's not too bad.

-- 
ldv


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