Bug 1371639 - "dnf autoremove" tries remove dnf
Summary: "dnf autoremove" tries remove dnf
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: rpm-software-management
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-30 17:14 UTC by Tomasz Kłoczko
Modified: 2016-08-31 11:19 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-08-31 10:12:11 UTC
Type: Bug


Attachments (Terms of Use)
debugdata (14.44 MB, application/x-tar)
2016-08-31 10:02 UTC, Tomasz Kłoczko
no flags Details

Description Tomasz Kłoczko 2016-08-30 17:14:27 UTC
Description of problem:

Few days ago I've removed yum package as I don't need it any more and now I see "dnf autoremove" is a bit useless :)
I think that dnf themselves should be blacklisted by definition from list of packages which can possibly be removed.

# dnf autoremove
Last metadata expiration check: 0:38:04 ago on Tue Aug 30 17:31:04 2016.
Dependencies resolved.
Error: The operation would result in removing the following protected packages: dnf.

Comment 1 Igor Gnatenko 2016-08-31 05:47:59 UTC
bascially it tries to remove some dependency of DNF.

run dnf with --debugsolver and attach created directory "debugdata".

Comment 2 Tomasz Kłoczko 2016-08-31 10:02:32 UTC
Created attachment 1196283 [details]
debugdata

debug data directory is in attachment

Comment 3 Igor Gnatenko 2016-08-31 10:12:11 UTC
try something like:
# dnf mark install dnf NetworkManager-wifi kernel-devel
and all other packages which you want explicitly to keep.

I think you were using yum-deprecated or/and PackageKit (until some release). Those 2 do not write to DNF database, so DNF thinks that it's not user-installed packages.

Comment 4 Tomasz Kłoczko 2016-08-31 11:19:38 UTC
Just in case .. I've been generating debugdata on fully updated few minuter earlier system to latest rawhide.

# dnf mark install dnf
dnf-1.1.10-1.fc26.noarch marked as user installed.

and after this "dnf autoremove" is producing now list of possibly to remove list of packages.
Nevertheless if it is possible to mark package X to not be listed in atoremove  list IMO dnf should be on such list OOTB.


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