Bug 1506907

Summary: DNF claims "Some packages have invalid cache" for packages coming from command line
Product: [Fedora] Fedora Reporter: Miroslav Suchý <msuchy>
Component: dnfAssignee: rpm-software-management
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 26CC: dmach, ignatenko, jmracek, mhatina, packaging-team-maint, rpm-software-management, vmukhame
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-11-01 12:05:22 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:

Description Miroslav Suchý 2017-10-27 07:04:25 UTC
Description of problem:

When I tried to install packages from the command line, I get:
Error: Some packages have invalid cache, but cannot be downloaded due to "--cacheonly" option
This is weird as there should be no cache for packages from command line.

$ sudo dnf install -C -y /tmp/tito/noarch/mock-1.4.6-1.git.22.5fe7961.fc26.noarch.rpm /tmp/tito/noarch/mock-scm-1.4.6-1.git.22.5fe7961.fc26.noarch.rpm /tmp/tito/noarch/mock-lvm-1.4.6-1.git.22.5fe7961.fc26.noarch.rpm
[sudo] password for mirek: 
Last metadata expiration check: 0:01:11 ago on Fri Oct 27 08:39:01 2017.
Dependencies resolved.
================================================================================
 Package            Arch     Version                       Repository      Size
================================================================================
Upgrading:
 mock               noarch   1.4.6-1.git.22.5fe7961.fc26   @commandline   151 k
 mock-lvm           noarch   1.4.6-1.git.22.5fe7961.fc26   @commandline    31 k
 mock-scm           noarch   1.4.6-1.git.22.5fe7961.fc26   @commandline    26 k
Installing dependencies:
 python3-pyroute2   noarch   0.4.13-1.fc26                 fedora         354 k

Transaction Summary
================================================================================
Install  1 Package
Upgrade  3 Packages

Total size: 561 k
Total download size: 354 k
Downloading Packages:
Package "mock-lvm-1.4.6-1.git.22.5fe7961.fc26.noarch" from repository "@commandline" has invalid cache
Error: Some packages have invalid cache, but cannot be downloaded due to "--cacheonly" option



Version-Release number of selected component (if applicable):
dnf-2.7.4-1.fc26.noarch

Comment 1 Miroslav Suchý 2017-10-27 07:06:52 UTC
Of course manually doing
$ sudo dnf install python3-pyroute2
$ sudo rpm -Uvh /tmp/tito/noarch/mock-1.4.6-1.git.22.5fe7961.fc26.noarch.rpm /tmp/tito/noarch/mock-scm-1.4.6-1.git.22.5fe7961.fc26.noarch.rpm /tmp/tito/noarch/mock-lvm-1.4.6-1.git.22.5fe7961.fc26.noarch.rpm

Works without problem.

Comment 2 Igor Gnatenko 2017-11-01 12:05:22 UTC

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