Open karuboniru opened 4 months ago
I run into the same error as you. The problem is as follows:
akmod-nvidia
.akmod-nvidia
will run as part of the %post
section during RPM install the build of nvidia-kmod
which defines gcc
, kernel-devel-uname-r
and some others. 3. Although they might be already installed on the system (I suspect) the RPM DB is not yet updated to reflect them being installed, leading to the system thinking they are not and then failing.akmod-nvidia
RPM that is able to be installed during OSTree compose. This involves moving nvidia-kmod
BuildRequires
into akmod-nvidia
Requires
definitions.In my eyes this is not the optimal solution since I would expect rpm-ostree compose handling this as it's done on all other systems as well. This would then allow installation of any other akmod kernel module during compose as well without having to patch it first.
Here is a fixed RPM that works during rpm-ostree compose
: https://github.com/COM8/nvidia-kmod
rpm-ostree will not pull BuildRequires dependencies as those are only installed when the package is built, not on normal installations.
@travier I'm fine with closing this, but this is not the point.
The point is, you define something as Requires
or even Requires(post)
in an RPM spec. Then, inside the %post
section of that RPM, you call rpmbuild
(e.g. the process that happens during an akmod
install) and there it fails to find the RPM dependency you previously defined as Requires(post)
during the BuildRequires
check of the RPM you are building.
Ah, I think I understand what you meant now.
Describe the bug
Different from the ublue way, I am trying to include
akmod-nvidia
during therpm-ostree compose image
step. But I failed with:I believe all those "missing dependencies" are actually present in the system as it should be direct dependency from akmods. It seems that things in
post
step just don't see them.Reproduction steps
*.repo
to a rpm-ostree compose projectrpm-ostree compose image ...
Expected behavior
I was expecting that the akmods could be installed to the image.
Actual behavior
It failed in
akmod-nvidia.post
System details
Additional information
Maybe at the stage of
akmod-nvidia.post
, the whole rpmdb is not ready? Or this usecase will never be supported? Or even if I could workaround the dependency issue there would be more issues behind (as I can think of, theakmod-nvidia.post
will install the newly built kmods as rpm, and I am unsure if this is possible inrpm-ostree
case