Bug 2308365 - Can't install/remove source packages from a repository: Argument... matches only source packages
Summary: Can't install/remove source packages from a repository: Argument... matches o...
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf5
Version: 45
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: rpm-software-management
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-08-28 18:42 UTC by David Koppelman
Modified: 2026-08-17 13:19 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2025-12-16 17:09:39 UTC
Type: ---
Embargoed:
fedora-admin-xmlrpc: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github rpm-software-management dnf5 issues 1663 0 None open Can't install/remove source packages from a repository: Argument... matches only source packages 2024-08-29 11:38:01 UTC

Description David Koppelman 2024-08-28 18:42:00 UTC
A source RPM file was successfully installed on F41 using the command:

    # dnf install /tmp/recoll-1.40.0-2.fc40.src.rpm

Weeks later, an attempt to remove the srpm failed with an unhelpful
error message:

    # dnf remove recoll.src
    Argument 'recoll.src' matches only source packages.

    Nothing to do.

Furthermore, any attempt to install recoll from the Fedora repo fails,
perhaps due to the build number of the file-installed srpm being taken
too seriously:

    # dnf install recoll
    Updating and loading repositories:
    Repositories loaded.
    Package                  Arch    Version                  Repository        Size
    Installing:
     recoll                  x86_64  1.40.0-1.fc41            fedora         7.2 MiB
    Installing dependencies:
     recoll-libs             x86_64  1.40.0-1.fc41            fedora         3.3 MiB

    Transaction Summary:
     Installing:        2 packages

[snip]

    Running transaction

    Transaction failed: Rpm transaction failed.
      - package recoll-1.40.0-2.fc40.x86_64 (which is newer than recoll-1.40.0-1.fc41.x86_64) is already installed


What I expected:

 The srpm is removed.

What I can live with:

 The "matches only source packages" error message should give some
 hint of the command(s) to use to remove an SRPM, if indeed separate
 commands are needed.



Reproducible: Always

Comment 1 Petr Pisar 2024-08-29 11:17:28 UTC
I confirm this strange behavior with developmental dnf5-5.2.5.0-20240810005644.33.g98e6b01b.fc41.x86_64.

Comment 2 Petr Pisar 2024-08-29 11:22:38 UTC
It seems that DNF5 unconditionally rejects any operation on source packages from repositories. (An installed package exists in a "system" repository.) The same happens when installing a source package from repository. They can only be installed as a local package. I believe it's a bug.

Comment 3 Petr Pisar 2024-08-29 11:25:28 UTC
You can uninstall that package with "rpm --erase recoll".

Comment 4 David Koppelman 2024-08-29 16:29:49 UTC
(In reply to Petr Pisar from comment #3)
> You can uninstall that package with "rpm --erase recoll".

Thank you for the workaround. Of course, I still think that dnf5 should be fixed in some way.

Comment 5 Adam Williamson (Red Hat non-Fedora) 2025-12-02 01:16:23 UTC
This message is a reminder that Fedora Linux 41 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 41 on 2025-12-15.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '41'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 41 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 6 Samyak Jain (RedHat) 2025-12-16 17:09:39 UTC
Fedora Linux 41 entered end-of-life (EOL) status on 2025-12-15.

Fedora Linux 41 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of Fedora Linux
please feel free to reopen this bug against that version. Note that the version
field may be hidden. Click the "Show advanced fields" button if you do not see
the version field.

If you are unable to reopen this bug, please file a new report against an
active release.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 7 Aoife Moloney 2026-08-17 13:19:23 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 45 development cycle.
Changing version to 45.


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