Bug 19480

Summary: dnf search command fails to find out some packages
Product: Mageia Reporter: jcl darkc <jcldc13>
Component: RPM PackagesAssignee: Neal Gompa <ngompa13>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: Normal CC: marja11
Version: Cauldron   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Source RPM: CVE:
Status comment:

Description jcl darkc 2016-09-28 16:58:01 CEST
Description of problem:

dnf command fails to find out some packages

Version-Release number of selected component (if applicable):
python3-dnf-1.1.10-2.mga6
dnf-plugins-core-0.1.21-3.mga6
dnf-conf-1.1.10-2.mga6
mageia-dnf-conf-1.0-1.mga6
python3-dnf-plugins-core-0.1.21-3.mga6
dnf-1.1.10-2.mga6
dnf-yum-1.1.10-2.mga6

How reproducible:

Example with nvidia package :

1) with dnf
------------

dnf search *nvidia* 
============================================================================= N/S Matched: *nvidia* ==============================================================================
dkms-nvidiabl.noarch : DKMS-ready driver for nvidia display back-lights
nvtv.x86_64 : Enable TV-Out on Linux for NVIDIA cards
nvclock.x86_64 : Overclocking tool for NVIDIA graphic boards
x11-driver-video-nouveau.x86_64 : Accelerated open source driver for NVIDIA cards
lib64nvtvsimple0.x86_64 : Library to enable TV-Out on Linux for NVIDIA cards
lib64nvtvsimple-devel.x86_64 : Library to enable TV-Out on Linux for NVIDIA cards

2) with urpmq
--------------

urpmq -y nvidia
bumblebee-nvidia
dkms-nvidia-current
dkms-nvidia304
dkms-nvidia340
dkms-nvidiabl
nvidia-cuda-toolkit
nvidia-cuda-toolkit-devel
nvidia-cuda-toolkit-samples
nvidia-current-cuda-opencl
nvidia-current-devel
nvidia-current-doc-html
nvidia-nsight
nvidia-visual-profiler
nvidia304-cuda-opencl
nvidia304-devel
nvidia304-doc-html
nvidia340-cuda-opencl
nvidia340-devel
nvidia340-doc-html
primus-nvidia
x11-driver-video-nvidia-current
x11-driver-video-nvidia304
x11-driver-video-nvidia340

Steps to Reproduce:
1. urpmi dnf
2. dnf search nvidia
3.
Comment 1 Marja Van Waes 2016-09-28 17:29:49 CEST
I can't reproduce that here, here "dnf search nvidia" returns a list of over 54 packages (in fact 27 packages, but every package for 2 arches)

Maybe something went wrong when synchronizing the metadata after you installed dnf??


Note that I did _not_ put asterixes around the search string.

CC: (none) => marja11
Assignee: bugsquad => ngompa13

Comment 2 jcl darkc 2016-09-28 17:32:56 CEST
Hum,
I tried with and without * and I the same.
Is there a way to update dnf database ?
Note that my running mga6 is an upgrade from  mga5 (inside a virtual box)
Comment 3 Neal Gompa 2016-09-28 17:39:25 CEST
To delete all the cached data, just do "dnf clean all"

The next command will repull the repodata for everything.
Comment 4 Neal Gompa 2016-09-28 17:46:03 CEST
You most likely don't have the nonfree and tainted repositories enabled in DNF.

See https://wiki.mageia.org/en/Using_DNF for details on how to enable and disable repositories.

Enabling the nonfree repository gives me this:

[ngompa@mgacauldron-dev ~]$ dnf --enablerepo="mageia-x86_64-nonfree" search nvidia  
Last metadata expiration check: 0:01:23 ago on Wed Sep 28 11:41:37 2016.
============================================================================================================ N/S Matched: nvidia ============================================================================================================
nvidia-nsight.x86_64 : NVIDIA Nsight IDE
nvidia-visual-profiler.x86_64 : NVIDIA Visual Profiler
nvidia-cuda-toolkit.x86_64 : NVIDIA CUDA runtime libraries
nvidia-cuda-toolkit-samples.x86_64 : NVIDIA CUDA Toolkit samples
primus-nvidia.x86_64 : primusrun script adapted to nvidia driver
nvidia304-doc-html.x86_64 : NVIDIA html documentation (nvidia304)
nvidia340-doc-html.x86_64 : NVIDIA html documentation (nvidia340)
dkms-nvidiabl.noarch : DKMS-ready driver for nvidia display back-lights
nvidia-cuda-toolkit-devel.x86_64 : NVIDIA CUDA Toolkit development files
nvidia-current-doc-html.x86_64 : NVIDIA html documentation (nvidia-current)
nvidia340-devel.x86_64 : NVIDIA OpenGL/CUDA development liraries and headers
dkms-nvidia-current.x86_64 : NVIDIA kernel module for GeForce 420 and later cards
nvidia-current-devel.x86_64 : NVIDIA OpenGL/CUDA development liraries and headers
nvidia304-devel.x86_64 : NVIDIA XvMC/OpenGL/CUDA development liraries and headers
dkms-nvidia304.x86_64 : NVIDIA kernel module for GeForce 6xxx and GeForce 7xxx cards
nvidia304-cuda-opencl.x86_64 : CUDA and OpenCL libraries for NVIDIA proprietary driver
nvidia340-cuda-opencl.x86_64 : CUDA and OpenCL libraries for NVIDIA proprietary driver
dkms-nvidia340.x86_64 : NVIDIA kernel module for GeForce 8xxx, 9xxx and 100 to 415 cards
nvidia-current-cuda-opencl.x86_64 : CUDA and OpenCL libraries for NVIDIA proprietary driver
bumblebee-nvidia.x86_64 : Bumblebee configuration files and binaries for nvidia-current driver
x11-driver-video-nvidia-current.x86_64 : NVIDIA proprietary X.org driver and libraries for GeForce 420 and later cards
x11-driver-video-nvidia304.x86_64 : NVIDIA proprietary X.org driver and libraries for GeForce 6xxx and GeForce 7xxx cards
x11-driver-video-nvidia340.x86_64 : NVIDIA proprietary X.org driver and libraries for GeForce 8xxx, 9xxx and 100 to 415 cards
python-pycuda.x86_64 : Python wrapper for NVIDIA CUDA
python3-pycuda.x86_64 : Python wrapper for NVIDIA CUDA
nvtv.x86_64 : Enable TV-Out on Linux for NVIDIA cards
nvclock.x86_64 : Overclocking tool for NVIDIA graphic boards
x11-driver-video-nouveau.x86_64 : Accelerated open source driver for NVIDIA cards
lib64nvtvsimple-devel.x86_64 : Library to enable TV-Out on Linux for NVIDIA cards
lib64nvtvsimple0.x86_64 : Library to enable TV-Out on Linux for NVIDIA cards
bumblebee.x86_64 : Daemon managing Nvidia Optimus hybrid graphics cards

Status: NEW => RESOLVED
Resolution: (none) => INVALID

Comment 5 jcl darkc 2016-09-28 18:54:11 CEST
Thanks Neal, you are right, it works after adding non-free respository. 
BUT it would be great if DNF repositories  could be set  automatically as URPMI respositories, when we install dnf via urmpi command, no ?
Comment 6 jcl darkc 2016-10-03 15:32:02 CEST
Well....

if I do a :
urpmi --auto-update (today at 3:21PM), I get:

The following package has to be removed for others to be upgraded:
thunderbird-fr-45.3.0-1.mga6.noarch
 (due to unsatisfied thunderbird == 0:45.3.0) (y/N) y
To satisfy dependencies, the following packages are going to be installed:
  Package                        Version      Release       Arch    
(medium "Core Release")
  breeze-icons                   5.26.0       2.mga6        noarch  
  lib64hogweed4                  3.3          1.mga6        x86_64  
  lib64nettle6                   3.3          1.mga6        x86_64  
  thunderbird                    45.4.0       1.mga6        x86_64 

(then I cancel the action)

and then, if I do
dnf check-update
or
dnf update
or 
dnf upgrade
I get nothing..... no updates !

In order to get updates via DNF, I must run 
dnf clean all

dnf check-update
Last metadata expiration check: 0:02:17 ago on Mon Oct  3 15:27:01 2016.

breeze-icons.noarch                  1:5.26.0-2.mga6                 mageia-x86_64  
breeze-icons.noarch                  1:5.26.0-2.mga6                 cauldron-x86_64
lib64hogweed4.x86_64                 1:3.3-1.mga6                    cauldron-x86_64
lib64nettle6.x86_64                  1:3.3-1.mga6                    cauldron-x86_64
thunderbird.x86_64                   45.4.0-1.mga6                   mageia-x86_64  
thunderbird.x86_64                   45.4.0-1.mga6                   cauldron-x86_64

and then 
dnf update

Why do I have run "dnf clean all" before running "dnf check-update" to get list of updates ?
Am I doing something wrong, or is it a bug/feature ?

Thanks, JC

Status: RESOLVED => REOPENED
Resolution: INVALID => (none)

Comment 7 Neal Gompa 2016-10-03 15:35:19 CEST
DNF does not expire metadata on every run like Yum did (for what it's worth, urpmi doesn't either). In order to get the behavior you're expecting, you just need to add "--refresh" to your command. For example: "dnf --refresh check-update".

I believe that DNF reuses the metadata for up to 72 hours by default unless told otherwise.

Status: REOPENED => RESOLVED
Resolution: (none) => INVALID

Comment 8 jcl darkc 2016-10-03 15:47:29 CEST
ok great, good to know !

but... it takes a lot  more time to run
dnf --refresh check-update
than
urpmi --auto-update

JC

PS : so far I don't see any advantage to use dnf instead of urpmi