Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conflict satellite-maintain < 0.0.3 #11378

Merged
merged 1 commit into from
Oct 25, 2024
Merged

Conflict satellite-maintain < 0.0.3 #11378

merged 1 commit into from
Oct 25, 2024

Conversation

evgeni
Copy link
Member

@evgeni evgeni commented Oct 24, 2024

In foreman_maintain 1.8.0 we moved some Satellite-specific metadata to
the Satellite-specific satellite-maintain package, but the normal
upgrade procedure doesn't enforce the right satellite-maintain version
to be present, thus leading to upgrade errors. Let's enforce this
requirement at the package level.

@evgeni
Copy link
Member Author

evgeni commented Oct 24, 2024

No satellite-maintain:

# dnf install ./rubygem-foreman_maintain-1.8.1-2.el9.noarch.rpm 
Last metadata expiration check: 0:00:38 ago on Thu Oct 24 06:26:40 2024.
Dependencies resolved.
=======================================================================================================================================================================================================================================
 Package                                                           Architecture                                    Version                                                 Repository                                             Size
=======================================================================================================================================================================================================================================
Upgrading:
 rubygem-foreman_maintain                                          noarch                                          1:1.8.1-2.el9                                           @commandline                                          148 k

Transaction Summary
=======================================================================================================================================================================================================================================
Upgrade  1 Package

Total size: 148 k

satellite-maintain-0.0.2:

# dnf install ./rubygem-foreman_maintain-1.8.1-2.el9.noarch.rpm 
Last metadata expiration check: 0:01:27 ago on Thu Oct 24 06:26:40 2024.
Error: 
 Problem: package rubygem-foreman_maintain-1:1.8.1-2.el9.noarch from @commandline requires (satellite-maintain >= 0.0.3 if satellite-maintain), but none of the providers can be installed
  - conflicting requests
  - problem with installed package satellite-maintain-0.0.2-1.el9sat.noarch
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

satellite-maintain-0.0.3:

# dnf install ./rubygem-foreman_maintain-1.8.1-2.el9.noarch.rpm 
Last metadata expiration check: 0:02:32 ago on Thu Oct 24 06:26:40 2024.
Dependencies resolved.
=======================================================================================================================================================================================================================================
 Package                                                           Architecture                                    Version                                                 Repository                                             Size
=======================================================================================================================================================================================================================================
Upgrading:
 rubygem-foreman_maintain                                          noarch                                          1:1.8.1-2.el9                                           @commandline                                          148 k

Transaction Summary
=======================================================================================================================================================================================================================================
Upgrade  1 Package

Total size: 148 k

@evgeni
Copy link
Member Author

evgeni commented Oct 24, 2024

Repoclosure complains about this, which I don't understand, as the if satellite-maintain part should filter it out…

We could use the same "hack" we did in foreman_theme_satellite:

%global downstream_build ("%{?dist}" == ".el8sat" || "%{?dist}" == ".el9sat")

But I hoped this is not necessary 😞

@pcreech
Copy link
Member

pcreech commented Oct 24, 2024

Looks like the repoclosure issue is a "known issue" in DNF world at least: rpm-software-management/dnf-plugins-core#549

Copy link
Member

@pcreech pcreech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK!

I'm liking the conditional dependencies!

@evgeni
Copy link
Member Author

evgeni commented Oct 24, 2024

Okay, but we gate our publishing on repoclosure (not like some other projects cough), so that means we need the if downstream_build hack to make this work without breaking publishing?

@ekohl
Copy link
Member

ekohl commented Oct 24, 2024

I actually kind of like the downstream_build approach in that we shouldn't have visible traces of downstream specifics in upstream whenever possible.

Just throwing another thought out there: would using Conflicts: satellite-maintain < 0.0.3 also solve it without breaking repoclosure?

@evgeni
Copy link
Member Author

evgeni commented Oct 24, 2024

Just throwing another thought out there: would using Conflicts: satellite-maintain < 0.0.3 also solve it without breaking repoclosure?

I am not sure what DNF would do about that (prefer to upgrade s-m vs keep the old f-m package), but certainly can try?

@evgeni evgeni changed the title Require satellite-maintain >= 0.0.3 if present Conflict satellite-maintain < 0.0.3 Oct 25, 2024
@evgeni
Copy link
Member Author

evgeni commented Oct 25, 2024

update not available:

[root@3429dcb9afa6 /]# dnf install ./rubygem-foreman_maintain-1.8.1-2.el9.noarch.rpm 
Last metadata expiration check: 0:00:14 ago on Fri Oct 25 10:08:37 2024.
Error: 
 Problem: package rubygem-foreman_maintain-1:1.8.1-2.el9.noarch from @commandline conflicts with satellite-maintain < 0.0.3 provided by satellite-maintain-0.0.2-1.el9sat.noarch from @System
  - conflicting requests
  - problem with installed package satellite-maintain-0.0.2-1.el9sat.noarch
(try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

update available:

[root@3429dcb9afa6 /]# dnf update ./rubygem-foreman_maintain-1.8.1-2.el9.noarch.rpm 
Last metadata expiration check: 0:00:13 ago on Fri Oct 25 10:09:28 2024.
Dependencies resolved.
=======================================================================================================================================================================================================================================
 Package                                                  Architecture                           Version                                        Repository                                                                        Size
=======================================================================================================================================================================================================================================
Upgrading:
 rubygem-foreman_maintain                                 noarch                                 1:1.8.1-2.el9                                  @commandline                                                                     148 k
 satellite-maintain                                       noarch                                 0.0.3-1.el9sat                                 brew-task-repo-satellite-maintain-0.0.3-1.el9sat                                 7.5 k

Transaction Summary
=======================================================================================================================================================================================================================================
Upgrade  2 Packages

Total size: 156 k
Total download size: 7.5 k

In foreman_maintain 1.8.0 we moved some Satellite-specific metadata to
the Satellite-specific satellite-maintain package, but the normal
upgrade procedure doesn't enforce the right satellite-maintain version
to be present, thus leading to upgrade errors. Let's enforce this
requirement at the package level.
@evgeni evgeni merged commit 947cb96 into rpm/develop Oct 25, 2024
4 checks passed
@evgeni evgeni deleted the maintain-with-sat branch October 25, 2024 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants