Bug 1327812 - Bug in dependency resolution
Summary: Bug in dependency resolution
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm-ostree
Version: 25
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Colin Walters
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-16 02:12 UTC by Patrick Uiterwijk
Modified: 2017-11-03 15:45 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-11-03 15:45:54 UTC
Type: Bug


Attachments (Terms of Use)
compose log 2016-04-15 (222.21 KB, text/plain)
2016-04-16 02:12 UTC, Patrick Uiterwijk
no flags Details
Generated treefile for 2016-04-15 (6.94 KB, text/plain)
2016-04-18 14:49 UTC, Patrick Uiterwijk
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1327786 0 unspecified CLOSED iptables-services should not Provide "iptables" 2021-02-22 00:41:40 UTC

Internal Links: 1327786

Description Patrick Uiterwijk 2016-04-16 02:12:32 UTC
Created attachment 1147840 [details]
compose log 2016-04-15

Description of problem:
I have managed to get a compose that has firewalld-0.4.0-4.fc24 in it, but not iptables.
Previously, iptables was pulled in through systemd, but after RHBZ#1323161 this is no longer the case.


Version-Release number of selected component (if applicable):
rpm-ostree-2016.1-3.fc23


How reproducible:
??


Steps to Reproduce:
1. Compose a tree from https://github.com/puiterwijk/puiterwijk-Atomic/blob/a5dbcd1121f836119f7ba4b20ed303af4247544b/puiterwijk-trees-laptop.json.in.

Actual results:
A compose that contains firewalld, but does NOT contain iptables.

Expected results:
A compose that has both firewalld and iptables in it.


Additional info:

Comment 1 Colin Walters 2016-04-18 14:03:49 UTC
firewalld `Requires: iptables`, so I'm not sure what's going on offhand.

Although I don't see firewalld in your input set?

Comment 2 Patrick Uiterwijk 2016-04-18 14:49:23 UTC
Created attachment 1148230 [details]
Generated treefile for 2016-04-15

Comment 3 Patrick Uiterwijk 2016-04-18 14:50:21 UTC
firewalld is in the "core" comps group.

The attached treefile is the full treefile that's passed on to rpm-ostree compose after being run through https://github.com/puiterwijk/puiterwijk-Atomic/blob/a5dbcd1121f836119f7ba4b20ed303af4247544b/treefile-expander.py

Comment 4 Colin Walters 2016-04-18 17:04:25 UTC
Ah...you could have mentioned you have a large partial reimplementation of the frontend of rpm-ostree running before it =)

So it's hard to say, but e.g. the depsolver seems to ignore broken packages?  Needs debugging.

Comment 5 Patrick Uiterwijk 2016-04-18 17:07:14 UTC
"large partial reimplementation of the frontend"? All this script does is expand the @-groups in the treefile, something that rpm-ostree explicitly doesn't do, and other than removing lines that start with # is the only thing that the script does :-)

That last attachment is the final treefile that I fed directly into rpm-ostree compose, resulting to the compose log in the first comment.

Do you need any more information from me at this point?

Comment 6 Adam Williamson 2016-04-22 18:47:29 UTC
puiterwijk mentioned this to me, and we noticed there's some...oddness in the iptables spec. It has an 'iptables-services' subpackage, with these lines:

%package services
Summary: iptables and ip6tables services for iptables
Group: System Environment/Base
Requires: %{name} = %{version}-%{release}
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
# provide and obsolete old main package
Provides: %{name} = 1.4.16.1
Obsoletes: %{name} < 1.4.16.1

I think that "Provides: %{name} = 1.4.16.1" is clearly bunk and should go. If the intent is to make sure that updates from older versions install both iptables and iptables-services but newer installs do not require iptables-services , the correct way to do this is just to have *both* the main package and services do:

Obsoletes: %{name} < 1.4.16.1

however, ultimately, the services package's "Requires: %{name} = %{version}-%{release}" should be honored - even though it itself provides "iptables", it doesn't provide it in the correct version-release, so it should still pull in the real 'iptables' packages. I can see this mess confusing some dependency solver or other, though.

Comment 7 Patrick Uiterwijk 2016-04-22 18:51:22 UTC
Might be related to #1327786

Comment 8 Jan Kurik 2016-07-26 05:11:58 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 25 development cycle.
Changing version to '25'.

Comment 9 Colin Walters 2017-11-03 15:45:54 UTC
I think this one is fixed, or at least...not a bug in rpm-ostree.  Since this was reported though we now correctly handle Provides etc: https://github.com/projectatomic/rpm-ostree/pull/513


Note You need to log in before you can comment on or make changes to this bug.