Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1461539
Summary: | Provide broken/missing group package behaviour identical to yum's (accept missing packages, fail on broken packages) | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Adam Williamson <awilliam> |
Component: | dnf | Assignee: | Daniel Mach <dmach> |
Status: | CLOSED EOL | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | 26 | CC: | dennis, dmach, jkonecny, kevin, mcepl, packaging-team-maint, rpm-software-management, samuel-rhbugs, vmukhame |
Target Milestone: | --- | Keywords: | Triaged |
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2018-05-29 12:00:51 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Adam Williamson
2017-06-14 17:50:01 UTC
This is also quite useful when porting package to new platform. E.g., I was porting OpenQA to EPEL7 (resulting in 88 packages in https://copr.fedorainfracloud.org/coprs/mcepl/openQA-EPEL7/ …). Then it is absolutely essential that I am able to run yum install long-list-of-required-packages with some of them failing to be installed (yum then reports "Package foo cannot be found" or something). yum-builddep behaved same as dnf now and that made it absolutely useless for me. This doesn't have to be a default behaviour, just something which could be achieved optionally, but without that my life would be a way more hard. So I've spent the last two goddamned hours just trying to even *remotely* understand how this stuff actually works in dnf, with somewhat limited success. Does it really have to be this...baroque? Anyway, where I have finally pitched up - by reverse engineering the CLI, since trying to figure this out from the other end just pitched me up in a gigantic twisted pile of indirection, C, and sadness - is here: https://github.com/rpm-software-management/dnf/blob/master/dnf/cli/output.py#L1030 which appears to be the bit which causes the CLI to log when a package is skipped from a transaction because of broken dependencies. I got *there* by actually doing it, in current F28: sudo dnf --disablerepo=* --enablerepo=fedora groupinstall 3d-printing which tells us: Skipping packages with broken dependencies: blender x86_64 1:2.79-6.fc28 fedora 35 M 'blender' is a default (not mandatory) package in the 3d-printing group. that's *basically* the kind of behaviour we want to make available to anaconda: be aware of when a package that otherwise would have been included in a transaction was left out because of broken dependencies. But looking at that code in dnf...how is anaconda supposed to do that? The dnf code uses a private attribute of the base, `_goal` - presumably dnf shouldn't do that. So what can it do instead? Note that oddly enough, doing sudo dnf --disablerepo=* --enablerepo=fedora --best groupinstall 3d-printing causes dnf to *silently* omit blender from the transaction. At this point I'm not entirely sure what I expected adding '--best' to do, but it probably wasn't that. So IMO all this behavior is stupid. Checking if package exists and then installing it is _S L O W_. We should get right behavior by _installing_ mandatory packages no matter what. 1. We still can't do something quite that simple because we know there are cases where packages are listed as mandatory that do not in fact exist at all. yum's historic behaviour was that 'package is listed but does not exist at all' was *never* fatal - no matter whether it was mandatory or default. So these cases exist. I'd like to clean them up, but we need to do that *before* making mandatory packages unavoidably 100% mandatory. 2. This isn't just about mandatory packages. yum used to fail on dependency error *for default packages too*. Not just mandatory. yum's behaviour was this: * 'package listed in group but doesn't exist' was always a skip * 'package listed in group and would be included in transaction, but has dependency errors' was always an error, *regardless of type* The 'type' *didn't matter* to yum in deciding whether there was an error or not. It was only significant in deciding which packages to try and install at all. The historic difference between 'default' and 'mandatory' was not "fail on mandatory, don't fail on default", but to do with *package selection tools*, specifically the old anaconda UI. When you selected a package group in the old anaconda UI, all 'mandatory' and 'default' packages in it were initially selected for install...but you could then *de*-select 'default' packages. You could *not* de-select mandatory packages. *That* was the difference and the initial reason why these 'types' exist at all. 'optional' packages were not selected by default, but were shown under the group and you could then *select* them if you chose. Once you'd made your choices, though, if *any* of the packages that ultimately wound up being selected had dependency errors, the install would fail. This is the behaviour dnf has never quite had, whatever permutations we've been through over the years. To be super clear: the fact that dnf happily skips default packages with dependency issues *is a problem*. Just recently, it's led to gnome-software being left off GNOME images, and cinnamon being left off Cinnamon images. I'm currently sending PRs to make some packages 'mandatory' in comps that probably should be mandatory, but there are some cases where it's not really correct to make the package mandatory in comps, but image composes should still probably fail if the package has dependency errors. I have a three-line patch (and a 100-line commit message...) that I think should actually do what we want here. Testing it now. This message is a reminder that Fedora 26 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 26. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '26'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 26 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. Fedora 26 changed to end-of-life (EOL) status on 2018-05-29. Fedora 26 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed. "We *have* made a change to comps which allows us to specify packages by arch, so we could in theory adjust comps such that the 'package named in group isn't available at all' situation never happens, but it'd probably involve quite a lot of trial and error to get to that point, eating up quite a lot of someone's time. So at least until we can spare a person to do that and verify it's correct, it'd be nice if we could have some way to make dnf behave the way yum did, during composes at least." Well, it took a few years, but I got there ;) https://pagure.io/fedora-comps/pull-request/767 https://github.com/rpm-software-management/dnf/pull/1848 |