How to deal with dependencies in leapp-repository¶
First, read this document to better understand the difficulties related to package dependencies in the Leapp project.
When talking about RHEL 7 to RHEL 8 upgrade, the goal is to cover dependencies of all Leapp project-related packages, including the leapp-repository packages, for both RHEL 7 and RHEL 8. Since the situation with dependencies of the leapp packages is similar to the situation with the leapp-repository dependencies, this document focuses on the leapp-repository specifics only.
Currently there are two SPEC files for leapp-repository:
- The leapp-repository.spec file is used to build leapp-repository packages and their dependency metapackage leapp-repository-deps for RHEL 7.
- The leapp-el7toel8-deps.spec file is used to build dependency metapackages leapp-deps-el8 and leapp-repository-deps-el8 for RHEL 8 whose purpose is to replace the RHEL 7 dependency metapackages leapp-deps and leapp-repository-deps during the upgrade.
What to do in leapp-repository when dependencies of leapp change?¶
Go to the section below the line %package -n %{ldname}
in the
leapp-el7toel8-deps.spec.
This section creates the RHEL 8 leapp-deps-el8 metapackage that replaces the
RHEL7 leapp-deps metapackage. So when the leapp package dependencies change
in the leapp.spec
together with incrementing version of the leapp-framework-dependencies
capability, it‘s necessary to:
- provide the same leapp-framework-dependencies capability version by leapp-deps-el8
- decide if this dependency change also applies to RHEL 8 and if so, update the dependencies of the leapp-deps-el8 metapackage accordingly.
There can be another case when we need to modify dependencies of leapp on RHEL 8, e.g. when a RHEL 7 package is renamed or split on RHEL 8. In such case we don‘t need to modify the capability value, just update dependencies of the leapp-deps-el8 metapackage, commenting it properly. Nothing else.
What to do when leapp-repository dependencies need to change?¶
When you want to modify outer dependencies of leapp-repository packages, do that similarly to instructions related to Leapp packages, following the same rules. Just take care of the leapp-repository-dependencies capability instead of the leapp-framework-dependencies capability. Everything else is the same. Interesting parts of the SPEC files are highlighted in the same way as described in the leapp dependencies document.