Bug 1762262
| Summary: | [RFE] DNF transaction with strict=False should report skipped packages | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Jiri Konecny <jkonecny> |
| Component: | dnf | Assignee: | Marek Blaha <mblaha> |
| Status: | NEW --- | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | rawhide | CC: | edgar.hoch, jmracek, jrohel, mblaha, mhatina, mkolman, packaging-team-maint, pkratoch, rpm-software-management, vmukhame |
| Target Milestone: | --- | Keywords: | Triaged |
| Target Release: | --- | Flags: | fedora-admin-xmlrpc:
mirror+
|
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 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
Jiri Konecny
2019-10-16 10:54:32 UTC
I think it would be a good idea to show (or log, in case of pykickstart) which packages are skipped and why, even with strict disabled. I often missed this information when using dnf. DNF code base allows to re-run the transaction with strict rules -
We use internally following code:
```
def _skipped_packages(self, report_problems, transaction):
"""returns set of conflicting packages and set of packages with broken dependency that would
be additionally installed when --best and --allowerasing"""
if self._goal.actions & (hawkey.INSTALL | hawkey.UPGRADE | hawkey.UPGRADE_ALL):
best = True
else:
best = False
ng = deepcopy(self._goal)
params = {"allow_uninstall": self._allow_erasing,
"force_best": best,
"ignore_weak": True}
ret = ng.run(**params)
if not ret and report_problems:
msg = dnf.util._format_resolve_problems(ng.problem_rules())
logger.warning(msg)
```
In DNF5 event-logges should provide the message by default.
|