Hi,
this series revealed another bug regarding source packages with same
name but different content:
Similar to upstream Debian, our kernel source packages are architecture
specific. By that, we also have to encode the architecture (or machine)
in the name of the package. Otherwise existing packages might get
reused on rebuilds with other targets (or multiarch)
In isar, this has ever been modeled incorrectly (the kernels .dsc file
was arch=any despite being arch specific). This is easy to fix, but
also depending on the kernels was done incorrectly (a KERNEL_NAME =
mainline is not specific enough, as mainline on arm64 is technically a
different kernel (source package) than mainline on amd64.
To fix this, we have the following options (which I tried):
1. encode the MACHINE or DISTRO_ARCH in KERNEL_NAME. Usually arch is
enough, but if a machine specific defconfig is used, the machine needs
to be encoded in the name => clean, works but might require downstream
changes
2. internally generate kernel source package with -${DISTRO_ARCH}
suffix, but keep DEPENDS / PROVIDES and binary package names as-is:
This is different to how Debian names the kernels. For the kernel build
itself this can be modeled, but the dependencies of custom modules back
to the "correct" kernel cannot be modeled, simply because the :native
and alike multiarch logic does not know about the internal changes and
is not able to dispatch to the correct kernel recipes. I tried various
workarounds, but it only got more and more complex without any solution
that is able to pass the CI.
3. Make DEPLOY_DIR_SRC architecture specific. This is a easy change,
but means we deploy all source packages multiple times. Along that, it
still means our deployed isar-apt is racy as the last built source
package wins.
Given that, I will send a fix based on (1), along with a an API
changelog. I'm pretty sure, most downstream layers don't have to change
anything. If they only build a single target in a single run, only a
single kernel is built and by that the bug has no effect.
Best regards,
Felix
Hi, after some extensive tests, I conclude that this is the only
feasible approach. The API change is also quite minimal, as we
technically don't even change an API. We just tell the users how to
correctly name their packages - which they theoretically should already
have done correctly.
>
> 2. internally generate kernel source package with -${DISTRO_ARCH}
> suffix, but keep DEPENDS / PROVIDES and binary package names as-is:
> This is different to how Debian names the kernels. For the kernel build
> itself this can be modeled, but the dependencies of custom modules back
> to the "correct" kernel cannot be modeled, simply because the :native
> and alike multiarch logic does not know about the internal changes and
> is not able to dispatch to the correct kernel recipes. I tried various
> workarounds, but it only got more and more complex without any solution
> that is able to pass the CI.
I tried this, but it does it comes with severe limitations. The main
issue is that we have to add additional provides, but just for the base
variant of the recipe. Detecting what the base variant is either
requires heuristics (bad!) or immediate expansion of BPN on first
parsing. This however breaks if kernel recipes are inherited / included
as then the immediate expansion always results in the first name
instead of the final one.
It also is problematic as we now create the conflicts on the binary
packages.
>
> 3. Make DEPLOY_DIR_SRC architecture specific. This is a easy change,
> but means we deploy all source packages multiple times. Along that, it
> still means our deployed isar-apt is racy as the last built source
> package wins.
Possible, but a lot of disk-space waste and against the single-source
package principles.
Felix
> --
> You received this message because you are subscribed to the Google Groups "isar-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/isar-users/b26fcda922ab9ab2341f11e5c951089ce8bc1fcc.camel%40siemens.com.