Bug 1677253
| Summary: | Provide a way of removing all packages belonging to a stream | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Petr Pisar <ppisar> |
| Component: | dnf | Assignee: | Jaroslav Mracek <jmracek> |
| Status: | CLOSED ERRATA | QA Contact: | Eva Mrakova <emrakova> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | medium | ||
| Version: | 8.0 | CC: | amatej, emrakova, james.antill, jblazek, jmracek, jorton, ksrot, kwalker, lkuprova, mdomonko, tbaeder, tbowling, vslavik |
| Target Milestone: | rc | Keywords: | FutureFeature, Triaged |
| Target Release: | 8.1 | Flags: | pm-rhel:
mirror+
|
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | dnf-4.2.17-1.el8 | Doc Type: | Enhancement |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2020-04-28 16:47:40 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: | |||
| Bug Depends On: | 1681084 | ||
| Bug Blocks: | 1755139 | ||
|
Description
Petr Pisar
2019-02-14 11:34:46 UTC
To delivery the feature we suggest to use name of packages from artifact according to available metadata. I agree. A resounding +1 for this functionality. However, what is the plan for empty modules?
> To delivery the feature we suggest to use name of packages from artifact according to available metadata.
If a user leverages this functionality and removes a populated module stream[/profile], they would have the content removed. In the empty-module instance, you would get no effect:
Name : perl
Stream : 5.26 [d][e][a]
Version : 820181219174508
Context : 9edba152
Profiles : common [d] [i], minimal
Default profiles : common
Repo : rhel-8-for-x86_64-appstream-rpms
Summary : Practical Extraction and Report Language
Description : Perl is a high-level programming language with roots in C, sed, awk and shell scripting. Perl is good at handling processes and files, and is especially good at handling text. Perl's hallmark>
Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled, [a]ctive]
Though, the installation of the above module resulted in 155 packages being installed from the two primary repos:
# yum history info last | awk '/Install/ {counts[$NF]++} END {for(idx in counts) {printf("%3d - %s\n", counts[idx], idx)}}'
37 - @rhel-8-for-x86_64-baseos-rpms
118 - @rhel-8-for-x86_64-appstream-rpms
Are we going to uninstall a profile content or a module content? The first case calls for removing the packages listed in a profile no matter what module or a non-module they come from; the second case calls for removing artifacts belonging to the module. However, uninstalling profiles is not easy. A package can belong to multiple profiles. A package can be installed directly by a package name (or a RPM provide or a file name), not by a profile. And should keep removing transitively dependent packages from foreign modules or non-modules? And if not, why should we stop at a border of one module? Also uninstalling profiles is not enough for purging a module content. There can be artifacts not listed in any profile. I believe we should follow the rule that uninstalls all artifacts. Because if not, how deeply should we follow the dependency tree? Up to glibc? I woulnd't complicated this feature. It's goal is removing artifacts after resetting a stream. Nothing more. Actually DNF could simply ask after resetting a stream whether a user wants to uninstall the former stream content, so that the user does not have to issue yet another command just to follow recommendation of the same tool. I created a pull request (https://github.com/rpm-software-management/dnf/pull/1536) that adds --all option for module remove command. It also adds `module repoquery` command that can be used with --available and --installed options. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2020:1823 |