Bug 1762262 - [RFE] DNF transaction with strict=False should report skipped packages
Summary: [RFE] DNF transaction with strict=False should report skipped packages
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Marek Blaha
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-10-16 10:54 UTC by Jiri Konecny
Modified: 2023-08-23 09:31 UTC (History)
10 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1642013 0 unspecified CLOSED kickstart installation aborted because of conflicting packages, there should be an option to ignore conflicting packages 2021-02-22 00:41:40 UTC

Internal Links: 1642013

Description Jiri Konecny 2019-10-16 10:54:32 UTC
Description of problem:
When you disable strict option in DNF it will skip all the packages with a conflict, that is desired behavior. However, from my understanding there is no information about what packages were skipped. This information should be available for further debugging of the transaction.

Justification:
Anaconda wants to add a possibility for kickstart automated installation to skip conflicting packages automatically. For this we have to disable the strict option. However, it's impossible to debug problematic behavior of the resulting system when there is no information of what packages were skipped because of the strict option.

Version-Release number of selected component (if applicable):
dnf-4.2.11-2.fc32

How reproducible:
Always

Actual results:
No log messages when packages are skipped because of disabled strict option.

Expected results:
Information about what packages were skipped with ideally a reason why there were skipped.

Comment 1 Edgar Hoch 2019-10-18 12:49:30 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.

Comment 2 Jaroslav Mracek 2023-08-23 09:31:08 UTC
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.


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