Bug 1244175

Summary: distro-sync removes orphaned packages in certain cases (kernel update)
Product: [Fedora] Fedora Reporter: Kamil Páral <kparal>
Component: dnfAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: andreas.tunek, awilliam, bruno, bugzilla, decathorpe, dmach, dmaley, hcamp, johannespfrang, jsilhan, jzeleny, mluscon, packaging-team-maint, pnemade, robatino, s, tim.lauridsen, timur.kristof, travneff, vmukhame, zbyszek
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: AcceptedBlocker
Fixed In Version: libsolv-0.6.14-2.fc24 dnf-1.1.3-1.fc23 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-10-17 15:52:04 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:    
Bug Blocks: 1170821    
Attachments:
Description Flags
verbose output of distro-sync
none
debugdata from dnf
none
distro-sync with --setopt=clean_requirements_on_remove=0
none
minimal debug data from dnf --debugsolver none

Description Kamil Páral 2015-07-17 11:48:38 UTC
Description of problem:
I use "dnf distro-sync" often, because I use updates-testing. A few weeks back, it started occurring that distro-sync wants to remove some of my packages without any good reason. The affected packages always seem to be orphans - in my case skype, atom and hamster-applet - they are not available in any repositories, but their dependencies are fine and there's no reason to remove them. Dnf seems to be doing something similar to remove-or-distro-sync, even though only distro-sync is run. This also happens only in certain cases, most probably when kernel update is involved.

Today's example:

$ dnf distro-sync
Last metadata expiration check performed 0:20:11 ago on Fri Jul 17 13:09:21 2015.
Dependencies resolved.
================================================================================
 Package                      Arch   Version              Repository       Size
================================================================================
Installing:
 kernel                       x86_64 4.0.8-300.fc22       updates-testing  67 k
 kernel-core                  x86_64 4.0.8-300.fc22       updates-testing  19 M
 kernel-modules               x86_64 4.0.8-300.fc22       updates-testing  18 M
 kernel-modules-extra         x86_64 4.0.8-300.fc22       updates-testing 2.2 M
Upgrading:
 NetworkManager               x86_64 1:1.0.4-0.4.git20150713.38bf2cb0.fc22
                                                          updates-testing 2.0 M
 NetworkManager-adsl          x86_64 1:1.0.4-0.4.git20150713.38bf2cb0.fc22
                                                          updates-testing 111 k
 NetworkManager-bluetooth     x86_64 1:1.0.4-0.4.git20150713.38bf2cb0.fc22
                                                          updates-testing 134 k
 NetworkManager-config-connectivity-fedora
                              x86_64 1:1.0.4-0.4.git20150713.38bf2cb0.fc22
                                                          updates-testing 101 k
 NetworkManager-glib          x86_64 1:1.0.4-0.4.git20150713.38bf2cb0.fc22
                                                          updates-testing 366 k
 NetworkManager-libnm         x86_64 1:1.0.4-0.4.git20150713.38bf2cb0.fc22
                                                          updates-testing 476 k
 NetworkManager-wifi          x86_64 1:1.0.4-0.4.git20150713.38bf2cb0.fc22
                                                          updates-testing 141 k
 NetworkManager-wwan          x86_64 1:1.0.4-0.4.git20150713.38bf2cb0.fc22
                                                          updates-testing 134 k
 abrt                         x86_64 2.6.1-1.fc22         updates-testing 517 k
 abrt-addon-ccpp              x86_64 2.6.1-1.fc22         updates-testing 187 k
 abrt-addon-coredump-helper   x86_64 2.6.1-1.fc22         updates-testing 105 k
 abrt-addon-kerneloops        x86_64 2.6.1-1.fc22         updates-testing 122 k
 abrt-addon-pstoreoops        x86_64 2.6.1-1.fc22         updates-testing 100 k
 abrt-addon-python            x86_64 2.6.1-1.fc22         updates-testing 101 k
 abrt-addon-python3           x86_64 2.6.1-1.fc22         updates-testing  99 k
 abrt-addon-vmcore            x86_64 2.6.1-1.fc22         updates-testing 110 k
 abrt-addon-xorg              x86_64 2.6.1-1.fc22         updates-testing 101 k
 abrt-cli                     x86_64 2.6.1-1.fc22         updates-testing  91 k
 abrt-dbus                    x86_64 2.6.1-1.fc22         updates-testing 126 k
 abrt-desktop                 x86_64 2.6.1-1.fc22         updates-testing  91 k
 abrt-gui                     x86_64 2.6.1-1.fc22         updates-testing 188 k
 abrt-gui-libs                x86_64 2.6.1-1.fc22         updates-testing 101 k
 abrt-libs                    x86_64 2.6.1-1.fc22         updates-testing 118 k
 abrt-plugin-bodhi            x86_64 2.6.1-1.fc22         updates-testing 100 k
 abrt-python                  x86_64 2.6.1-1.fc22         updates-testing 114 k
 abrt-python3                 x86_64 2.6.1-1.fc22         updates-testing 115 k
 abrt-retrace-client          x86_64 2.6.1-1.fc22         updates-testing 127 k
 abrt-tui                     x86_64 2.6.1-1.fc22         updates-testing 103 k
 autocorr-cs                  noarch 1:4.4.4.3-4.fc22     updates         161 k
 autocorr-en                  noarch 1:4.4.4.3-4.fc22     updates         175 k
 bind-libs                    x86_64 32:9.10.2-3.P2.fc22  updates-testing 149 k
 bind-libs-lite               x86_64 32:9.10.2-3.P2.fc22  updates-testing 1.0 M
 bind-license                 noarch 32:9.10.2-3.P2.fc22  updates-testing  87 k
 bind-utils                   x86_64 32:9.10.2-3.P2.fc22  updates-testing 400 k
 devscripts-minimal           x86_64 2.15.5-6.fc22        updates-testing  38 k
 environment-modules          x86_64 3.2.10-16.fc22       updates-testing 113 k
 evolution                    x86_64 3.16.4-1.fc22        updates-testing 8.6 M
 evolution-data-server        x86_64 3.16.4-1.fc22        updates-testing 3.0 M
 firefox                      x86_64 39.0-8.fc22          updates          70 M
 glibc                        i686   2.21-7.fc22          updates-testing 4.2 M
 glibc                        x86_64 2.21-7.fc22          updates-testing 3.5 M
 glibc-common                 x86_64 2.21-7.fc22          updates-testing  11 M
 glibc-devel                  x86_64 2.21-7.fc22          updates-testing 903 k
 glibc-headers                x86_64 2.21-7.fc22          updates-testing 494 k
 glusterfs                    x86_64 3.6.4-1.fc22         updates-testing 1.3 M
 glusterfs-api                x86_64 3.6.4-1.fc22         updates-testing  73 k
 glusterfs-fuse               x86_64 3.6.4-1.fc22         updates-testing 102 k
 glusterfs-libs               x86_64 3.6.4-1.fc22         updates-testing 295 k
 gnome-abrt                   x86_64 1.2.0-3.fc22         updates-testing 235 k
 gnutls                       i686   3.3.16-1.fc22        updates-testing 616 k
 gnutls                       x86_64 3.3.16-1.fc22        updates-testing 627 k
 gnutls-dane                  x86_64 3.3.16-1.fc22        updates-testing  36 k
 gnutls-utils                 x86_64 3.3.16-1.fc22        updates-testing 238 k
 gzip                         x86_64 1.6-8.fc22           updates         155 k
 jwhois                       x86_64 4.0-41.fc22          updates-testing 119 k
 kernel-headers               x86_64 4.0.8-300.fc22       updates-testing 996 k
 libgusb                      x86_64 0.2.6-1.fc22         updates-testing  43 k
 libidn                       i686   1.31-1.fc22          updates-testing 229 k
 libidn                       x86_64 1.31-1.fc22          updates-testing 228 k
 libinput                     x86_64 0.19.0-3.fc22        updates-testing  80 k
 libipa_hbac                  x86_64 1.13.0-1.fc22        updates-testing  71 k
 libreoffice-calc             x86_64 1:4.4.4.3-4.fc22     updates         8.5 M
 libreoffice-core             x86_64 1:4.4.4.3-4.fc22     updates          77 M
 libreoffice-draw             x86_64 1:4.4.4.3-4.fc22     updates         677 k
 libreoffice-emailmerge       x86_64 1:4.4.4.3-4.fc22     updates          80 k
 libreoffice-filters          x86_64 1:4.4.4.3-4.fc22     updates          66 k
 libreoffice-graphicfilter    x86_64 1:4.4.4.3-4.fc22     updates         445 k
 libreoffice-impress          x86_64 1:4.4.4.3-4.fc22     updates         1.3 M
 libreoffice-langpack-cs      x86_64 1:4.4.4.3-4.fc22     updates         6.7 M
 libreoffice-math             x86_64 1:4.4.4.3-4.fc22     updates         1.0 M
 libreoffice-opensymbol-fonts noarch 1:4.4.4.3-4.fc22     updates         241 k
 libreoffice-pdfimport        x86_64 1:4.4.4.3-4.fc22     updates         306 k
 libreoffice-pyuno            x86_64 1:4.4.4.3-4.fc22     updates         516 k
 libreoffice-ure              x86_64 1:4.4.4.3-4.fc22     updates         2.6 M
 libreoffice-writer           x86_64 1:4.4.4.3-4.fc22     updates         4.2 M
 libreoffice-xsltfilter       x86_64 1:4.4.4.3-4.fc22     updates         408 k
 libreport                    x86_64 2.6.1-1.fc22         updates-testing 459 k
 libreport-cli                x86_64 2.6.1-1.fc22         updates-testing  56 k
 libreport-fedora             x86_64 2.6.1-1.fc22         updates-testing  50 k
 libreport-filesystem         x86_64 2.6.1-1.fc22         updates-testing  43 k
 libreport-gtk                x86_64 2.6.1-1.fc22         updates-testing 108 k
 libreport-plugin-bugzilla    x86_64 2.6.1-1.fc22         updates-testing  87 k
 libreport-plugin-kerneloops  x86_64 2.6.1-1.fc22         updates-testing  54 k
 libreport-plugin-logger      x86_64 2.6.1-1.fc22         updates-testing  59 k
 libreport-plugin-reportuploader
                              x86_64 2.6.1-1.fc22         updates-testing  65 k
 libreport-plugin-ureport     x86_64 2.6.1-1.fc22         updates-testing  62 k
 libreport-python             x86_64 2.6.1-1.fc22         updates-testing  77 k
 libreport-python3            x86_64 2.6.1-1.fc22         updates-testing  78 k
 libreport-web                x86_64 2.6.1-1.fc22         updates-testing  60 k
 libseccomp                   x86_64 2.2.3-0.fc22         updates-testing  55 k
 libsss_idmap                 x86_64 1.13.0-1.fc22        updates-testing  76 k
 libsss_nss_idmap             x86_64 1.13.0-1.fc22        updates-testing  75 k
 libtirpc                     x86_64 0.3.2-2.0.fc22       updates-testing 100 k
 libunwind                    x86_64 1.1-10.fc22          updates-testing  64 k
 meld                         noarch 3.13.3-1.fc22        updates-testing 717 k
 openssl                      x86_64 1:1.0.1k-11.fc22     updates         496 k
 openssl-libs                 i686   1:1.0.1k-11.fc22     updates         944 k
 openssl-libs                 x86_64 1:1.0.1k-11.fc22     updates         941 k
 pam_pkcs11                   x86_64 0.6.8-6.fc22         updates-testing 213 k
 pango                        i686   1.36.8-6.fc22        updates-testing 296 k
 pango                        x86_64 1.36.8-6.fc22        updates-testing 294 k
 pango-devel                  x86_64 1.36.8-6.fc22        updates-testing 327 k
 perl-HTTP-Message            noarch 6.08-1.fc22          updates-testing  87 k
 php-cli                      x86_64 5.6.11-1.fc22        updates-testing 4.0 M
 php-common                   x86_64 5.6.11-1.fc22        updates-testing 1.1 M
 php-gd                       x86_64 5.6.11-1.fc22        updates-testing  96 k
 php-pdo                      x86_64 5.6.11-1.fc22        updates-testing 150 k
 php-process                  x86_64 5.6.11-1.fc22        updates-testing  86 k
 php-xml                      x86_64 5.6.11-1.fc22        updates-testing 257 k
 polkit                       x86_64 0.113-2.fc22         updates-testing 127 k
 polkit-libs                  x86_64 0.113-2.fc22         updates-testing  70 k
 python                       x86_64 2.7.10-4.fc22        updates-testing  93 k
 python-ipython-console       noarch 2.4.1-6.fc22         updates-testing 1.5 M
 python-ipython-notebook      noarch 2.4.1-6.fc22         updates-testing 874 k
 python-libs                  x86_64 2.7.10-4.fc22        updates-testing 5.8 M
 python-sssdconfig            noarch 1.13.0-1.fc22        updates-testing  98 k
 python-tornado               x86_64 3.2.2-2.fc22         updates-testing 628 k
 python3                      x86_64 3.4.2-6.fc22         updates-testing  53 k
 python3-libs                 x86_64 3.4.2-6.fc22         updates-testing 6.6 M
 rpmlint                      noarch 1.7-1.fc22           updates         250 k
 satyr                        x86_64 0.19-1.fc22          updates-testing 105 k
 sg3_utils-libs               x86_64 1.41-1.fc22          updates-testing  68 k
 tkinter                      x86_64 2.7.10-4.fc22        updates-testing 381 k
 unoconv                      noarch 0.7-1.fc22           updates-testing  58 k
 webkitgtk4                   x86_64 2.8.4-2.fc22         updates-testing  20 M
 xorg-x11-drv-libinput        x86_64 0.11.0-3.fc22        updates-testing  28 k
Removing:
 atom                         x86_64 1.0.0-0.1.fc21       @System         198 M
 hamster-applet               x86_64 2.32.1-3.fc17        @System         2.2 M
 kernel                       x86_64 4.0.5-300.fc22       @System           0  
 kernel-core                  x86_64 4.0.5-300.fc22       @System          41 M
 kernel-modules               x86_64 4.0.5-300.fc22       @System          17 M
 kernel-modules-extra         x86_64 4.0.5-300.fc22       @System         2.1 M
 skype                        i586   4.3.0.37-fc16        @System          42 M

Transaction Summary
================================================================================
Install    4 Packages
Upgrade  126 Packages
Remove     7 Packages

Total download size: 307 M


Note that atom, hamster-applet and skype are marked for removal. However, look what happens when I exclude kernel:

$ dnf distro-sync --exclude kernel*
Last metadata expiration check performed 0:20:21 ago on Fri Jul 17 13:09:21 2015.
Dependencies resolved.
================================================================================
 Package                      Arch   Version              Repository       Size
================================================================================
Upgrading:
 NetworkManager               x86_64 1:1.0.4-0.4.git20150713.38bf2cb0.fc22
                                                          updates-testing 2.0 M
 NetworkManager-adsl          x86_64 1:1.0.4-0.4.git20150713.38bf2cb0.fc22
                                                          updates-testing 111 k
 NetworkManager-bluetooth     x86_64 1:1.0.4-0.4.git20150713.38bf2cb0.fc22
                                                          updates-testing 134 k
 NetworkManager-config-connectivity-fedora
                              x86_64 1:1.0.4-0.4.git20150713.38bf2cb0.fc22
                                                          updates-testing 101 k
 NetworkManager-glib          x86_64 1:1.0.4-0.4.git20150713.38bf2cb0.fc22
                                                          updates-testing 366 k
 NetworkManager-libnm         x86_64 1:1.0.4-0.4.git20150713.38bf2cb0.fc22
                                                          updates-testing 476 k
 NetworkManager-wifi          x86_64 1:1.0.4-0.4.git20150713.38bf2cb0.fc22
                                                          updates-testing 141 k
 NetworkManager-wwan          x86_64 1:1.0.4-0.4.git20150713.38bf2cb0.fc22
                                                          updates-testing 134 k
 abrt                         x86_64 2.6.1-1.fc22         updates-testing 517 k
 abrt-addon-ccpp              x86_64 2.6.1-1.fc22         updates-testing 187 k
 abrt-addon-coredump-helper   x86_64 2.6.1-1.fc22         updates-testing 105 k
 abrt-addon-kerneloops        x86_64 2.6.1-1.fc22         updates-testing 122 k
 abrt-addon-pstoreoops        x86_64 2.6.1-1.fc22         updates-testing 100 k
 abrt-addon-python            x86_64 2.6.1-1.fc22         updates-testing 101 k
 abrt-addon-python3           x86_64 2.6.1-1.fc22         updates-testing  99 k
 abrt-addon-vmcore            x86_64 2.6.1-1.fc22         updates-testing 110 k
 abrt-addon-xorg              x86_64 2.6.1-1.fc22         updates-testing 101 k
 abrt-cli                     x86_64 2.6.1-1.fc22         updates-testing  91 k
 abrt-dbus                    x86_64 2.6.1-1.fc22         updates-testing 126 k
 abrt-desktop                 x86_64 2.6.1-1.fc22         updates-testing  91 k
 abrt-gui                     x86_64 2.6.1-1.fc22         updates-testing 188 k
 abrt-gui-libs                x86_64 2.6.1-1.fc22         updates-testing 101 k
 abrt-libs                    x86_64 2.6.1-1.fc22         updates-testing 118 k
 abrt-plugin-bodhi            x86_64 2.6.1-1.fc22         updates-testing 100 k
 abrt-python                  x86_64 2.6.1-1.fc22         updates-testing 114 k
 abrt-python3                 x86_64 2.6.1-1.fc22         updates-testing 115 k
 abrt-retrace-client          x86_64 2.6.1-1.fc22         updates-testing 127 k
 abrt-tui                     x86_64 2.6.1-1.fc22         updates-testing 103 k
 autocorr-cs                  noarch 1:4.4.4.3-4.fc22     updates         161 k
 autocorr-en                  noarch 1:4.4.4.3-4.fc22     updates         175 k
 bind-libs                    x86_64 32:9.10.2-3.P2.fc22  updates-testing 149 k
 bind-libs-lite               x86_64 32:9.10.2-3.P2.fc22  updates-testing 1.0 M
 bind-license                 noarch 32:9.10.2-3.P2.fc22  updates-testing  87 k
 bind-utils                   x86_64 32:9.10.2-3.P2.fc22  updates-testing 400 k
 devscripts-minimal           x86_64 2.15.5-6.fc22        updates-testing  38 k
 environment-modules          x86_64 3.2.10-16.fc22       updates-testing 113 k
 evolution                    x86_64 3.16.4-1.fc22        updates-testing 8.6 M
 evolution-data-server        x86_64 3.16.4-1.fc22        updates-testing 3.0 M
 firefox                      x86_64 39.0-8.fc22          updates          70 M
 glibc                        i686   2.21-7.fc22          updates-testing 4.2 M
 glibc                        x86_64 2.21-7.fc22          updates-testing 3.5 M
 glibc-common                 x86_64 2.21-7.fc22          updates-testing  11 M
 glibc-devel                  x86_64 2.21-7.fc22          updates-testing 903 k
 glibc-headers                x86_64 2.21-7.fc22          updates-testing 494 k
 glusterfs                    x86_64 3.6.4-1.fc22         updates-testing 1.3 M
 glusterfs-api                x86_64 3.6.4-1.fc22         updates-testing  73 k
 glusterfs-fuse               x86_64 3.6.4-1.fc22         updates-testing 102 k
 glusterfs-libs               x86_64 3.6.4-1.fc22         updates-testing 295 k
 gnome-abrt                   x86_64 1.2.0-3.fc22         updates-testing 235 k
 gnutls                       i686   3.3.16-1.fc22        updates-testing 616 k
 gnutls                       x86_64 3.3.16-1.fc22        updates-testing 627 k
 gnutls-dane                  x86_64 3.3.16-1.fc22        updates-testing  36 k
 gnutls-utils                 x86_64 3.3.16-1.fc22        updates-testing 238 k
 gzip                         x86_64 1.6-8.fc22           updates         155 k
 jwhois                       x86_64 4.0-41.fc22          updates-testing 119 k
 libgusb                      x86_64 0.2.6-1.fc22         updates-testing  43 k
 libidn                       i686   1.31-1.fc22          updates-testing 229 k
 libidn                       x86_64 1.31-1.fc22          updates-testing 228 k
 libinput                     x86_64 0.19.0-3.fc22        updates-testing  80 k
 libipa_hbac                  x86_64 1.13.0-1.fc22        updates-testing  71 k
 libreoffice-calc             x86_64 1:4.4.4.3-4.fc22     updates         8.5 M
 libreoffice-core             x86_64 1:4.4.4.3-4.fc22     updates          77 M
 libreoffice-draw             x86_64 1:4.4.4.3-4.fc22     updates         677 k
 libreoffice-emailmerge       x86_64 1:4.4.4.3-4.fc22     updates          80 k
 libreoffice-filters          x86_64 1:4.4.4.3-4.fc22     updates          66 k
 libreoffice-graphicfilter    x86_64 1:4.4.4.3-4.fc22     updates         445 k
 libreoffice-impress          x86_64 1:4.4.4.3-4.fc22     updates         1.3 M
 libreoffice-langpack-cs      x86_64 1:4.4.4.3-4.fc22     updates         6.7 M
 libreoffice-math             x86_64 1:4.4.4.3-4.fc22     updates         1.0 M
 libreoffice-opensymbol-fonts noarch 1:4.4.4.3-4.fc22     updates         241 k
 libreoffice-pdfimport        x86_64 1:4.4.4.3-4.fc22     updates         306 k
 libreoffice-pyuno            x86_64 1:4.4.4.3-4.fc22     updates         516 k
 libreoffice-ure              x86_64 1:4.4.4.3-4.fc22     updates         2.6 M
 libreoffice-writer           x86_64 1:4.4.4.3-4.fc22     updates         4.2 M
 libreoffice-xsltfilter       x86_64 1:4.4.4.3-4.fc22     updates         408 k
 libreport                    x86_64 2.6.1-1.fc22         updates-testing 459 k
 libreport-cli                x86_64 2.6.1-1.fc22         updates-testing  56 k
 libreport-fedora             x86_64 2.6.1-1.fc22         updates-testing  50 k
 libreport-filesystem         x86_64 2.6.1-1.fc22         updates-testing  43 k
 libreport-gtk                x86_64 2.6.1-1.fc22         updates-testing 108 k
 libreport-plugin-bugzilla    x86_64 2.6.1-1.fc22         updates-testing  87 k
 libreport-plugin-kerneloops  x86_64 2.6.1-1.fc22         updates-testing  54 k
 libreport-plugin-logger      x86_64 2.6.1-1.fc22         updates-testing  59 k
 libreport-plugin-reportuploader
                              x86_64 2.6.1-1.fc22         updates-testing  65 k
 libreport-plugin-ureport     x86_64 2.6.1-1.fc22         updates-testing  62 k
 libreport-python             x86_64 2.6.1-1.fc22         updates-testing  77 k
 libreport-python3            x86_64 2.6.1-1.fc22         updates-testing  78 k
 libreport-web                x86_64 2.6.1-1.fc22         updates-testing  60 k
 libseccomp                   x86_64 2.2.3-0.fc22         updates-testing  55 k
 libsss_idmap                 x86_64 1.13.0-1.fc22        updates-testing  76 k
 libsss_nss_idmap             x86_64 1.13.0-1.fc22        updates-testing  75 k
 libtirpc                     x86_64 0.3.2-2.0.fc22       updates-testing 100 k
 libunwind                    x86_64 1.1-10.fc22          updates-testing  64 k
 meld                         noarch 3.13.3-1.fc22        updates-testing 717 k
 openssl                      x86_64 1:1.0.1k-11.fc22     updates         496 k
 openssl-libs                 i686   1:1.0.1k-11.fc22     updates         944 k
 openssl-libs                 x86_64 1:1.0.1k-11.fc22     updates         941 k
 pam_pkcs11                   x86_64 0.6.8-6.fc22         updates-testing 213 k
 pango                        i686   1.36.8-6.fc22        updates-testing 296 k
 pango                        x86_64 1.36.8-6.fc22        updates-testing 294 k
 pango-devel                  x86_64 1.36.8-6.fc22        updates-testing 327 k
 perl-HTTP-Message            noarch 6.08-1.fc22          updates-testing  87 k
 php-cli                      x86_64 5.6.11-1.fc22        updates-testing 4.0 M
 php-common                   x86_64 5.6.11-1.fc22        updates-testing 1.1 M
 php-gd                       x86_64 5.6.11-1.fc22        updates-testing  96 k
 php-pdo                      x86_64 5.6.11-1.fc22        updates-testing 150 k
 php-process                  x86_64 5.6.11-1.fc22        updates-testing  86 k
 php-xml                      x86_64 5.6.11-1.fc22        updates-testing 257 k
 polkit                       x86_64 0.113-2.fc22         updates-testing 127 k
 polkit-libs                  x86_64 0.113-2.fc22         updates-testing  70 k
 python                       x86_64 2.7.10-4.fc22        updates-testing  93 k
 python-ipython-console       noarch 2.4.1-6.fc22         updates-testing 1.5 M
 python-ipython-notebook      noarch 2.4.1-6.fc22         updates-testing 874 k
 python-libs                  x86_64 2.7.10-4.fc22        updates-testing 5.8 M
 python-sssdconfig            noarch 1.13.0-1.fc22        updates-testing  98 k
 python-tornado               x86_64 3.2.2-2.fc22         updates-testing 628 k
 python3                      x86_64 3.4.2-6.fc22         updates-testing  53 k
 python3-libs                 x86_64 3.4.2-6.fc22         updates-testing 6.6 M
 rpmlint                      noarch 1.7-1.fc22           updates         250 k
 satyr                        x86_64 0.19-1.fc22          updates-testing 105 k
 sg3_utils-libs               x86_64 1.41-1.fc22          updates-testing  68 k
 tkinter                      x86_64 2.7.10-4.fc22        updates-testing 381 k
 unoconv                      noarch 0.7-1.fc22           updates-testing  58 k
 webkitgtk4                   x86_64 2.8.4-2.fc22         updates-testing  20 M
 xorg-x11-drv-libinput        x86_64 0.11.0-3.fc22        updates-testing  28 k

Transaction Summary
================================================================================
Upgrade  125 Packages

Total download size: 266 M


Dnf no longer wants to remove them. Something is wrong in there.



Version-Release number of selected component (if applicable):
rpm-4.12.0.1-12.fc22.x86_64
libsolv-0.6.11-1.fc22.x86_64
librepo-1.7.16-1.fc22.x86_64
hawkey-0.5.7-1.fc22.x86_64
dnf-1.0.1-2.fc22.noarch


How reproducible:
sometimes, but once it happens, it is 100% reproducible (until I perform the operation, I guess update the kernel)

Steps to Reproduce (not tested):
1. install some packages outside of system repos
2. run distro-sync when there is a kernel update, so that one of the existing kernel is to be removed

Comment 1 Kamil Páral 2015-07-17 11:50:46 UTC
Created attachment 1053045 [details]
verbose output of distro-sync

Comment 2 Kamil Páral 2015-07-17 11:52:20 UTC
Created attachment 1053046 [details]
debugdata from dnf

Comment 3 Kamil Páral 2015-07-17 12:06:45 UTC
$ dnf list kernel*
Last metadata expiration check performed 0:55:06 ago on Fri Jul 17 13:09:21 2015.
Installed Packages
kernel.x86_64                             4.0.5-300.fc22         @System        
kernel.x86_64                             4.0.6-300.fc22         @System        
kernel.x86_64                             4.0.7-300.fc22         @System        
kernel-core.x86_64                        4.0.5-300.fc22         @System        
kernel-core.x86_64                        4.0.6-300.fc22         @System        
kernel-core.x86_64                        4.0.7-300.fc22         @System        
kernel-headers.x86_64                     4.0.7-300.fc22         @System        
kernel-modules.x86_64                     4.0.5-300.fc22         @System        
kernel-modules.x86_64                     4.0.6-300.fc22         @System        
kernel-modules.x86_64                     4.0.7-300.fc22         @System        
kernel-modules-extra.x86_64               4.0.5-300.fc22         @System        
kernel-modules-extra.x86_64               4.0.6-300.fc22         @System        
kernel-modules-extra.x86_64               4.0.7-300.fc22         @System        
Available Packages
kernel.x86_64                             4.0.8-300.fc22         updates-testing
kernel-core.x86_64                        4.0.8-300.fc22         updates-testing
kernel-debug.x86_64                       4.0.8-300.fc22         updates-testing
kernel-debug-core.x86_64                  4.0.8-300.fc22         updates-testing
kernel-debug-devel.x86_64                 4.0.8-300.fc22         updates-testing
kernel-debug-modules.x86_64               4.0.8-300.fc22         updates-testing
kernel-debug-modules-extra.x86_64         4.0.8-300.fc22         updates-testing
kernel-devel.x86_64                       4.0.8-300.fc22         updates-testing
kernel-headers.x86_64                     4.0.8-300.fc22         updates-testing
kernel-modules.x86_64                     4.0.8-300.fc22         updates-testing
kernel-modules-extra.x86_64               4.0.8-300.fc22         updates-testing
kernel-rpm-macros.noarch                  28-1.fc22              updates        
kernel-tools.x86_64                       4.0.8-300.fc22         updates-testing
kernel-tools-libs.i686                    4.0.8-300.fc22         updates-testing
kernel-tools-libs.x86_64                  4.0.8-300.fc22         updates-testing
kernel-tools-libs-devel.i686              4.0.8-300.fc22         updates-testing
kernel-tools-libs-devel.x86_64            4.0.8-300.fc22         updates-testing
kernelshark.x86_64                        2.2.1-5.fc22           fedora

Comment 4 Kamil Páral 2015-07-17 12:07:31 UTC
Created attachment 1053050 [details]
distro-sync with --setopt=clean_requirements_on_remove=0

The same happens with --setopt=clean_requirements_on_remove=0.

Comment 5 Kamil Páral 2015-07-17 12:19:07 UTC
Created attachment 1053060 [details]
minimal debug data from dnf --debugsolver

I tried to update everything except kernel, and the minimal case really seems to be orphan packages + kernel update:

Last metadata expiration check performed 1:07:19 ago on Fri Jul 17 13:09:21 2015.
Dependencies resolved.
================================================================================
 Package                 Arch      Version             Repository          Size
================================================================================
Installing:
 kernel                  x86_64    4.0.8-300.fc22      updates-testing     67 k
 kernel-core             x86_64    4.0.8-300.fc22      updates-testing     19 M
 kernel-modules          x86_64    4.0.8-300.fc22      updates-testing     18 M
 kernel-modules-extra    x86_64    4.0.8-300.fc22      updates-testing    2.2 M
Upgrading:
 kernel-headers          x86_64    4.0.8-300.fc22      updates-testing    996 k
Removing:
 atom                    x86_64    1.0.0-0.1.fc21      @System            198 M
 hamster-applet          x86_64    2.32.1-3.fc17       @System            2.2 M
 kernel                  x86_64    4.0.5-300.fc22      @System              0  
 kernel-core             x86_64    4.0.5-300.fc22      @System             41 M
 kernel-modules          x86_64    4.0.5-300.fc22      @System             17 M
 kernel-modules-extra    x86_64    4.0.5-300.fc22      @System            2.1 M
 skype                   i586      4.3.0.37-fc16       @System             42 M

Transaction Summary
================================================================================
Install  4 Packages
Upgrade  1 Package
Remove   7 Packages

Total download size: 40 M


Attaching new debug data, just for this minimal case.

Comment 6 Kamil Páral 2015-07-17 12:21:25 UTC
The same case with `dnf update` is absolutely fine:

$ sudo dnf update
Last metadata expiration check performed 1:10:51 ago on Fri Jul 17 13:09:21 2015.
Dependencies resolved.
==================================================================================================================================
 Package                              Arch                   Version                        Repository                       Size
==================================================================================================================================
Installing:
 kernel                               x86_64                 4.0.8-300.fc22                 updates-testing                  67 k
 kernel-core                          x86_64                 4.0.8-300.fc22                 updates-testing                  19 M
 kernel-modules                       x86_64                 4.0.8-300.fc22                 updates-testing                  18 M
 kernel-modules-extra                 x86_64                 4.0.8-300.fc22                 updates-testing                 2.2 M
Upgrading:
 kernel-headers                       x86_64                 4.0.8-300.fc22                 updates-testing                 996 k
Removing:
 kernel                               x86_64                 4.0.5-300.fc22                 @System                           0  
 kernel-core                          x86_64                 4.0.5-300.fc22                 @System                          41 M
 kernel-modules                       x86_64                 4.0.5-300.fc22                 @System                          17 M
 kernel-modules-extra                 x86_64                 4.0.5-300.fc22                 @System                         2.1 M

Transaction Summary
==================================================================================================================================
Install  4 Packages
Upgrade  1 Package
Remove   4 Packages

Total download size: 40 M

Comment 7 Kamil Páral 2015-07-22 11:33:10 UTC
I see exactly the same problem on a different machine as well. Once there is a kernel update, it wants to remove 'atom'. This does not seem to be a rare issue.

Comment 8 Honza Silhan 2015-07-29 15:09:11 UTC
How does `dnf distro-sync -x <all orphaned pkgs>` work? Maybe we can add switch to distro-sync to preserve orphans.

Comment 9 Kamil Páral 2015-08-04 08:08:58 UTC
(In reply to Jan Silhan from comment #8)
> How does `dnf distro-sync -x <all orphaned pkgs>` work? 

That doesn't help. Only excluding kernel helps.

> Maybe we can add
> switch to distro-sync to preserve orphans.

I don't follow. Distro-sync always did, and still does preserve orphans. The only bug is when kernel is in the set (and probably wants to remove an older one), in this case it regressed, and behaves like remove-or-distro-sync (which is available for repository-packages command).

I suggest this could deserve a higher priority in the Devel Whiteboard. It is basically a scenario resulting in user data loss. Many people using updates-testing are used to running distro-sync instead of update, because it is a must in that case. If they don't read the installation summary properly every time, or have it run automatically, this will remove important packages from their system.

Comment 10 Kamil Páral 2015-09-08 10:33:17 UTC
I want to ring the alarm bell when it's still time - this bug might be very problematic during system upgrade. Because fedup got converted into a dnf plugin, this bug now affects system upgrade as well, if it runs in distro-sync mode (which is not yet the default, but I'm trying to push to have it as the default [1]). Because there is always a kernel update during system upgrade, this is always going to affect system upgrade. And the result is that due to this bug, all packages not found in the FN+1 repository will be simply erased from the system. The user can't work around it, except for disabling distro-sync mode, which is problematic for other reasons (when upgrade path is not satisfied for critical packages, it will only half-upgrade your system and potentially break it completely).

So, this means that all user third-party packages (without repos, or without functional FN+1 repos) will be missing from the upgraded system. I.e. skype gone, steam gone, dropbox gone, atom gone, etc.

This seems to violate our upgrade criteria:
" The upgraded system must include all packages that would be present on the system after a default installation from install media, plus any packages the user previously had (minus any obsolete content). "
https://fedoraproject.org/wiki/Fedora_23_Beta_Release_Criteria#Upgrade_requirements

Once dnf-plugin-system-upgrade switches to distro-sync mode, I'm going to propose this as a blocker.

[1] https://github.com/rpm-software-management/dnf-plugin-system-upgrade/issues/10

Comment 11 Honza Silhan 2015-09-08 11:00:43 UTC
Fair argument -> raising priority. With combination with bug 1259175 the system upgrades would be even funnier.

Comment 12 Kamil Páral 2015-10-01 11:29:32 UTC
FESCo decided distro-sync will be the default upgrade behavior [1] and it will get implemented as part of bug 1263677. I'm therefore proposing this as a final blocker, due to reasons stated in comment 10.

[1] https://fedorahosted.org/fesco/ticket/1481

Comment 13 Adam Williamson 2015-10-05 22:23:17 UTC
Discussed at 2015-10-05 blocker review meeting: https://meetbot-raw.fedoraproject.org/fedora-blocker-review/2015-10-05/f23-blocker-review.2015-10-05-16.00.html . Accepted as a Final blocker, on the assumption that this will affect pretty much all dnf-system-upgrade runs once it's adjusted to default to distro-sync behaviour.

Comment 14 Honza Silhan 2015-10-13 14:14:58 UTC
*** Bug 1253825 has been marked as a duplicate of this bug. ***

Comment 15 Honza Silhan 2015-10-13 16:31:29 UTC
This bug was fixed in libsolv-0.6.14-1 which was build for F23 and F24 (we will add it to updates along with DNF). Do we need the build for F22 and F21 too?

Comment 16 Kamil Páral 2015-10-14 10:02:46 UTC
(In reply to Jan Silhan from comment #15)
> This bug was fixed in libsolv-0.6.14-1 which was build for F23 and F24 (we
> will add it to updates along with DNF). Do we need the build for F22 and F21
> too?

Does system-upgrade for F22->F23 use F22 libraries or F23 libraries during the offline upgrade? If F22 ones, we need to fix F22.

Even if it used F23 libraries during the actual upgrade, system-upgrade still displays the upgrade summary (which packages are going to get upgraded and which packages are going to get skipped or removed) on a F22 system, so this summary would be incorrect and might unnecessarily scare the user (we would claim we're going to remove packages which we wouldn't afterwards). So even in this case, F22 fix would be appropriate.

As for F21, I don't know what the official plans for system-upgrade are. If system-upgrade is intended to work only for F22 upwards (and people should use fedup to go F21->F22), we don't need F21 fixed. But since system-upgrade package is present in F21 updates-testing (still not pushed stable, though), I assume the opposite is the case, and in that case we need the same approach for F21 as we do for F22.

Comment 17 Fedora Update System 2015-10-14 17:11:25 UTC
dnf-1.1.3-1.fc23 dnf-plugins-core-0.1.13-1.fc23 dnf-plugins-extras-0.0.11-1.fc23 hawkey-0.6.2-1.fc23 libsolv-0.6.14-2.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-a011ac001a

Comment 18 Honza Silhan 2015-10-14 17:13:44 UTC
* It was fixed in libsolv-0.6.14-2. builds for f21+ has been made.

Comment 19 Fedora Update System 2015-10-14 22:52:30 UTC
dnf-1.1.3-1.fc23, dnf-plugins-core-0.1.13-1.fc23, dnf-plugins-extras-0.0.11-1.fc23, hawkey-0.6.2-1.fc23, libsolv-0.6.14-2.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update hawkey dnf-plugins-core dnf-plugins-extras dnf libsolv'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-a011ac001a

Comment 20 Kamil Páral 2015-10-15 13:31:04 UTC
I have tested this with F22, the problem seems to be fixed. Thanks.

Comment 21 Fedora Update System 2015-10-17 15:51:31 UTC
dnf-1.1.3-1.fc23, dnf-plugins-core-0.1.13-1.fc23, dnf-plugins-extras-0.0.11-1.fc23, hawkey-0.6.2-1.fc23, libsolv-0.6.14-2.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 22 Honza Silhan 2015-10-19 09:03:59 UTC
*** Bug 1259175 has been marked as a duplicate of this bug. ***