[devel] stopping a cascade of rebuilds

Alexey Tourbin alexey.tourbin на gmail.com
Пн Апр 20 12:05:26 MSK 2020


On Fri, Apr 17, 2020 at 4:54 PM Dmitry V. Levin <ldv на altlinux.org> 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

Sure, slipped my mind.

These IDs can have another application. Suppose a task is resumed, and
subtask #100 needs a rebuild. It is likely that, after the rebuild,
the result won't change (all subpackage end up with the same IDs).
However, we replace the packages anyway.  This will trigger the
rebuild of subtask #200, if it depends on subtrask #100. There are two
approaches to spare the unnecessary rebuild:

1) Don't overwrite local files with those from the remote build, if
they are identical.
2) When tracking the contents of BuildRoot, take into account IDs
instead of HeaderSHA1.

There is a peculiarity with the first approach: if subtask #100 has
both arch and noarch subpackages, the decision to overwrite files
cannot be made locally / per architecture. If you need to overwrite
subpackages for at least one architecture, then you have to overwrite
for all architectures, otherwise there will be unmet dependencies
between arch and noarch subpackages.

I think we already have this problem: the decision to rebuild a
subtask is made locally (or rather remotely), per architecture. So
occasionally we've seen unmet dependencies due to disttag mismatch.
Has the problem been addressed?


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