Bug 1194735 - DNF doesn't respect the --exclude option during distro-sync
Summary: DNF doesn't respect the --exclude option during distro-sync
Keywords:
Status: CLOSED DUPLICATE of bug 1099342
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-02-20 16:14 UTC by Mathieu Bridon
Modified: 2015-09-29 15:45 UTC (History)
10 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-07-20 14:21:27 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Requested debugdata (5.74 MB, application/x-xz)
2015-03-11 18:00 UTC, Mathieu Bridon
no flags Details

Description Mathieu Bridon 2015-02-20 16:14:49 UTC
Description of problem:

Running Fedora 22, just tried updating my system:

    # dnf distro-sync
    [...]
    Erreur : nothing provides libcdio.so.15()(64bit) needed by mednafen-0.9.33.3-2.fc21.x86_64

That error is actually expected, as I rebuilt the mednafen package locally with a newer version from what is in RPMFusion (they haven't rebuilt for the libcdio bump). So DNF tries to downgrade to the package in the repositories, which fails due to the missing libcdio.

So until here everything is fine, let's try excluding mednafen so I can proceed with the update:

    # dnf distro-sync --exclude=mednafen
    [...]
    Erreur : package mednafen-0.9.33.3-2.fc21.x86_64 is not installable

Huh?

Clearly something happens when I specify --exclude, given that the error message changes.

However, that is totally unexpected: if I tell DNF to exclude this package from the transaction, it shouldn't try downgrading it at all.

Just to compare:

    # yum distro-sync --exclude=mednafen
    [...]
    --> Résolution des dépendances terminée
    
    Dépendances résolues

    ===========================================================================
    Package            Architecture       Version             Dépôt      Taille
    ===========================================================================
    Installation :
    [...]

So Yum works as expected, completely ignoring mednafen when passed as --exclude.

Back to Yum for this update, then...

    dnf-0.6.4-1.fc22.noarch
    hawkey-0.5.3-1.fc22.x86_64
    yum-3.4.3-155.fc22.noarch

Comment 1 Honza Silhan 2015-03-11 11:38:05 UTC
Thanks for the report. Can you attach the debug data [1], please?
I guess you have to exclude libcdio too to make distro-sync work.

[1] https://github.com/rpm-software-management/dnf/wiki/Bug-Reporting#depsolving-problem

Comment 2 Mathieu Bridon 2015-03-11 17:59:43 UTC
> Can you attach the debug data [1], please?

Sure.

> I guess you have to exclude libcdio too to make distro-sync work.

I don't see why, libcdio doesn't change in the current transaction.

The situation is as follows:

* libcdio got updated in Fedora 22, bumping the soname
* mednafen (from a third-party repository) hasn't been rebuilt to account for this soname bump
* I rebuilt mednafen locally and installed that

So when running distro-sync, both dnf and yum try to downgrade mednafen to the version available in that third-party repository, which fails due to the libcdio soname bump.

But I expect this error, it is perfectly consistent with the current situation, which is why I'm using --exclude=mednafen.

But when I'm using --exclude=mednafen, I'm expecting dnf to completely ignore the mednafen package, not try to do anything with it at all.

This is what yum does, and as a result yum allows me to keep my system updated.

However, dnf continues to somehow consider mednafen for the transaction, and fails to do anything useful with it, as shown in the second error message from comment 0.

Really, if I say --exclude=mednafen, then dnf should completely ignore mednafen and do everything else, if possible.

And in this case, everything else is possible, as yum shows.

Comment 3 Mathieu Bridon 2015-03-11 18:00:33 UTC
Created attachment 1000596 [details]
Requested debugdata

Comment 4 Mathieu Bridon 2015-03-11 18:06:51 UTC
Here, this shows perfectly the whole problem I explained in comment 2:

# yum distro-sync 
Loaded plugins: auto-update-debuginfo, langpacks
Resolving Dependencies
--> Running transaction check
---> Package mednafen.x86_64 0:0.9.33.3-2.fc21 will be a downgrade
--> Processing Dependency: libcdio.so.15(CDIO_15)(64bit) for package: mednafen-0.9.33.3-2.fc21.x86_64
--> Processing Dependency: libcdio.so.15()(64bit) for package: mednafen-0.9.33.3-2.fc21.x86_64
---> Package mednafen.x86_64 0:0.9.38.2-0.1.fc22.bochecha will be erased
--> Finished Dependency Resolution
Error: Package: mednafen-0.9.33.3-2.fc21.x86_64 (rpmfusion-nonfree-rawhide)
           Requires: libcdio.so.15(CDIO_15)(64bit)
Error: Package: mednafen-0.9.33.3-2.fc21.x86_64 (rpmfusion-nonfree-rawhide)
           Requires: libcdio.so.15()(64bit)
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

# yum distro-sync --exclude=mednafen
Loaded plugins: auto-update-debuginfo, langpacks
No packages marked for distribution synchronization

# dnf distro-sync
Using metadata from Wed Mar 11 16:50:59 2015
Error: nothing provides libcdio.so.15()(64bit) needed by mednafen-0.9.33.3-2.fc21.x86_64

# dnf distro-sync --exclude=mednafen
Using metadata from Wed Mar 11 16:50:59 2015
Error: package mednafen-0.9.33.3-2.fc21.x86_64 is not installable

Comment 5 Damian Wrobel 2015-03-21 16:28:22 UTC
For me the --exclude doesn't work for package removal. I've tried to remove the 389-\* packages but not to remove the httpd\* packages:

$ sudo dnf remove 389-\* --exclude=httpd\* | awk '/^ / { print $1}'
Package
389-admin
389-admin-console
389-admin-console-doc
389-adminutil
389-console
389-ds
389-ds-base
389-ds-base-libs
389-ds-console
389-ds-console-doc
389-dsgw
aajohan-comfortaa-fonts
apr
apr-util
audit-libs-python
checkpolicy
cyrus-sasl-gssapi
cyrus-sasl-md5
fedora-logos-httpd
httpd
httpd-filesystem
httpd-tools
idm-console-framework
jss
ldapjdk
libcgroup
libsemanage-python
lm_sensors-libs
mailcap
mod_nss
net-snmp-agent-libs
net-snmp-libs
openldap-clients
perl-Archive-Tar
perl-CGI
perl-Compress-Raw-Bzip2
perl-Compress-Raw-Zlib
perl-DB_File
perl-Data-Dumper
perl-IO-Compress
perl-IO-Zlib
perl-Mozilla-LDAP
perl-NetAddr-IP
policycoreutils-python
setools-libs
svrcore

However yum seems to work as expected:

$ sudo yum remove 389-\* --exclude=httpd\* | awk '/^ / { print $1}'
Package
389-admin
389-admin-console
389-admin-console-doc
389-adminutil
389-console
389-ds
389-ds-base
389-ds-base-libs
389-ds-console
389-ds-console-doc
389-dsgw

dnf, yum versions:
$ rpm -qv dnf yum
dnf-0.6.4-1.fc21.noarch
yum-3.4.3-153.fc21.noarch

Comment 6 Ahmad Samir 2015-04-12 12:06:36 UTC
IINM this is a duplicate of bug 1099342.

Comment 7 Honza Silhan 2015-07-20 14:21:27 UTC
If you still experience this issue, please, reopen.

*** This bug has been marked as a duplicate of bug 1099342 ***


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