dnf and yum seeing different updates
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2007
    Location
    Los Angeles, CA
    Posts
    128
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    dnf and yum seeing different updates

    I'm seeing weird issues with the new dnf package manager today, and most interestingly is that yum and dnf see different available updates.

    Code:
    [noah@aerelon ~]$ sudo dnf check-update
    kmod-nvidia.x86_64               1:331.20-10.fc20.1    rpmfusion-nonfree-updates
    kernel-devel.x86_64              3.12.5-302.fc20       updates                  
    kernel-modules-extra.x86_64      3.12.5-302.fc20       updates                  
    python-hawkey.x86_64             0.4.7-1.fc20          updates                  
    iso-codes.noarch                 3.49-1.fc20           updates                  
    lohit-devanagari-fonts.noarch    2.93.0-1.fc20         updates                  
    hawkey.x86_64                    0.4.7-1.fc20          updates                  
    usb_modeswitch-data.noarch       20131113-1.fc20       updates                  
    kernel-debug-devel.x86_64        3.12.5-302.fc20       updates                  
    kernel.x86_64                    3.12.5-302.fc20       updates                  
    kernel-headers.x86_64            3.12.5-302.fc20       updates                  
    
    [noah@aerelon ~]$ yum check-update
    Loaded plugins: langpacks
    
    kmod-nvidia.x86_64         1:331.20-10.fc20.1          rpmfusion-nonfree-updates
    The results given by check-update are the same that are seen when I actually try to `dnf update` / `yum update`.... i.e., if I try to yum update, I get dependency conflicts because it sees a new kmod-nvidia, but no new kernels to go along with it. `dnf update` works though because it sees the kernel.

    I've done `yum clean all` and `dnf clean all` (they appear to use different caches?), and the issue is still there. After reloading the repo information, they show the same lists of available updates.

    A smaller issue I noticed with dnf is that it can not `check-update` unless you run it with sudo:

    Code:
    [noah@aerelon ~]$ dnf check-update
    [noah@aerelon ~]$ echo $?
    0
    [noah@aerelon ~]$ sudo dnf check-update
    [sudo] password for noah: 
    
    kmod-nvidia.x86_64               1:331.20-10.fc20.1    rpmfusion-nonfree-updates
    kernel-devel.x86_64              3.12.5-302.fc20       updates                  
    kernel-modules-extra.x86_64      3.12.5-302.fc20       updates                  
    python-hawkey.x86_64             0.4.7-1.fc20          updates                  
    iso-codes.noarch                 3.49-1.fc20           updates                  
    lohit-devanagari-fonts.noarch    2.93.0-1.fc20         updates                  
    hawkey.x86_64                    0.4.7-1.fc20          updates                  
    usb_modeswitch-data.noarch       20131113-1.fc20       updates                  
    kernel-debug-devel.x86_64        3.12.5-302.fc20       updates                  
    kernel.x86_64                    3.12.5-302.fc20       updates                  
    kernel-headers.x86_64            3.12.5-302.fc20       updates                  
    [noah@aerelon ~]$ echo $?
    100
    I understand that dnf is an experimental future-replacement for yum, but its weird that dnf is able to update my system and yum can't.

  2. #2
    Join Date
    Jul 2008
    Posts
    1,348
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: dnf and yum seeing different updates

    Did you clear caches beforehand? Though that may not make a difference.
    You could simply be running into the fact that yum and dnf are polling different
    mirror repo's and one may be more up-to-date then the other. That's the
    best guess off the top of my head anyways.

  3. #3
    PabloTwo's Avatar
    PabloTwo is offline "Registered User" T-Shirt Winner
    Join Date
    Mar 2007
    Location
    Seville, FL
    Posts
    8,069
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)

    Re: dnf and yum seeing different updates

    Quote Originally Posted by Cuvou
    A smaller issue I noticed with dnf is that it can not `check-update` unless you run it with sudo:
    And thank goodness for that. And here is why:

    With yum, you can do anything as a regular user with the exception of actually installing software (though I think there might be some exceptions to even that nowdays). Run as root, yum keeps it's repository info here:
    Code:
    $ ls -ld /var/cache/yum/x86_64/20/*
    drwxr-xr-x. 4 root root 4096 Dec 21 10:13 /var/cache/yum/x86_64/20/adobe-linux-x86_64
    drwxr-xr-x. 4 root root 4096 Dec 21 10:13 /var/cache/yum/x86_64/20/fedora
    drwxr-xr-x. 4 root root 4096 Dec  6 20:30 /var/cache/yum/x86_64/20/fedora-debuginfo
    drwxr-xr-x. 4 root root 4096 Oct 27 15:46 /var/cache/yum/x86_64/20/fedora-source
    drwxr-xr-x. 4 root root 4096 Nov  5 16:40 /var/cache/yum/x86_64/20/google-earth
    drwxr-xr-x. 4 root root 4096 Dec 21 10:13 /var/cache/yum/x86_64/20/infinality
    drwxr-xr-x. 4 root root 4096 Dec 21 10:13 /var/cache/yum/x86_64/20/infinality-noarch
    drwxr-xr-x. 4 root root 4096 Dec 21 10:13 /var/cache/yum/x86_64/20/rpmfusion-free
    drwxr-xr-x. 4 root root 4096 Dec 17 10:11 /var/cache/yum/x86_64/20/rpmfusion-free-rawhide
    drwxr-xr-x. 4 root root 4096 Oct 27 15:46 /var/cache/yum/x86_64/20/rpmfusion-free-rawhide-source
    drwxr-xr-x. 4 root root 4096 Dec 21 10:13 /var/cache/yum/x86_64/20/rpmfusion-free-updates
    drwxr-xr-x. 4 root root 4096 Dec 19 19:12 /var/cache/yum/x86_64/20/rpmfusion-free-updates-testing
    drwxr-xr-x. 4 root root 4096 Dec 21 10:13 /var/cache/yum/x86_64/20/rpmfusion-nonfree
    drwxr-xr-x. 4 root root 4096 Dec 17 10:11 /var/cache/yum/x86_64/20/rpmfusion-nonfree-rawhide
    drwxr-xr-x. 4 root root 4096 Oct 27 15:46 /var/cache/yum/x86_64/20/rpmfusion-nonfree-rawhide-source
    drwxr-xr-x. 4 root root 4096 Dec 21 10:13 /var/cache/yum/x86_64/20/rpmfusion-nonfree-updates
    drwxr-xr-x. 4 root root 4096 Dec 19 19:12 /var/cache/yum/x86_64/20/rpmfusion-nonfree-updates-testing
    -rw-r--r--. 1 root root 3335 Dec 21 10:13 /var/cache/yum/x86_64/20/timedhosts
    drwxr-xr-x. 4 root root 4096 Dec 21 10:13 /var/cache/yum/x86_64/20/updates
    drwxr-xr-x. 4 root root 4096 Oct 27 15:46 /var/cache/yum/x86_64/20/updates-source
    drwxr-xr-x. 4 root root 4096 Dec 19 19:13 /var/cache/yum/x86_64/20/updates-testing
    drwxr-xr-x. 4 root root 4096 Oct 27 15:46 /var/cache/yum/x86_64/20/updates-testing-source
    ..and other package/group and metadata/database info here:
    Code:
    $ ls -ld /var/lib/yum/*
    drwxrwxr-x.  2 root root 4096 Dec 21 10:15 /var/lib/yum/groups
    drwxrwxr-x.  3 root root 4096 Oct 26 16:36 /var/lib/yum/history
    drwxr-xr-x.  3 root root 4096 Oct 27 15:35 /var/lib/yum/plugins
    drwxr-xr-x.  3 root root 4096 Oct 26 16:28 /var/lib/yum/repos
    drwxr-xr-x.  2 root root 4096 Dec 21 10:15 /var/lib/yum/rpmdb-indexes
    -rw-r--r--.  1 root root   36 Oct 26 16:28 /var/lib/yum/uuid
    drwxr-xr-x. 34 root root 4096 Oct 26 17:52 /var/lib/yum/yumdb
    Please note the permissions: none of this is user writable. So, when you do, as a regular user:
    Code:
    $ yum check-update
    an entire new set of yum repo files is created, just for that particular user. It just duplicates what is already on the disk for yum as root, and is put down at:

    /var/tmp/yum-$USER-<ID-code>
    Code:
    $ ll -d /var/tmp/yum-*
    drwx------. 2 PabloTwo PabloTwo 4096 Dec  7 19:44 /var/tmp/yum-PabloTwo-LZ3Gev
    drwx------. 3 paul     paul     4096 Nov 22 22:00 /var/tmp/yum-paul-LTLo0U
    So, did you ever wonder, after doing "$ yum check-update" and then shortly after doing "sudo yum check-update", it downloads the data all over again? Well, that's why. Once for the user, then again for root. Totally wasted time, disk space and bandwidth. Try this on an excruciatingly slow 28.8Kps dialup account and you'll really understand the folly here.

    It's why I always try and remember to always preface any yum command with "sudo", to keep from generating that non-essential second (and/or third) set of yum repo/database files. As you can see, I don't always remember.
    Code:
    $ sudo du -sh /var/tmp/yum-paul-LTLo0U
    184M	/var/tmp/yum-paul-LTLo0U
    And then clean it up after I discover it..
    Code:
    $ rm -r /var/tmp/yum-paul-LTLo0U
    $ sudo rm -r /var/tmp/yum-PabloTwo-LZ3Gev
    I'm sure most folks with plenty of internet speed and gobs of storage space just don't care about such trivia, and maybe I'm a bit persnickety about this issue, but that's just me. I point it out here just because I know that the typical user has no clue that this is happening. dnf, if it requires to be run as root, seems to have found a way to prevent this "duplication of files" by just demanding it be run as root, period.

    And while I'm on my "mini-rant" about the usage of yum, I might as well touch on this:

    Yum has a setting called "metadata_expire", which resets a timer (default is 6 hours) after you run a command such as "# yum check-update". After that command, running the command again before the 6 hours is up, will not actually check for any "new" updates that might have come along since the last time you checked. The resounding chorus of "yum clean all" is total overkill and unnecessary here if all you want to do is make "yum check-update" actually do a real check-update before the timer has expired.

    Answer: "yum clean expire-cache"

    This doesn't remove the megabytes of files that "yum clean all" does, which just have all be re-downloaded on your very next yum command. It just sets the timer to "expired" so a fresh "yum check-update" does actually query the repos for any new updates.
    Code:
    sudo yum clean expire-cache
    sudo yum check-update
    Simple, quick, and many megabytes of data now not unnecessarily deleted and then re-downloaded.
    Last edited by PabloTwo; 21st December 2013 at 06:40 PM.

  4. #4
    PabloTwo's Avatar
    PabloTwo is offline "Registered User" T-Shirt Winner
    Join Date
    Mar 2007
    Location
    Seville, FL
    Posts
    8,069
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)

    Re: dnf and yum seeing different updates

    Quote Originally Posted by Cuvou
    A smaller issue I noticed with dnf is that it can not `check-update` unless you run it with sudo:
    Ah, after all that, no, dnf does not require to be run a root to "check-update". Just tested that:
    Code:
    $ dnf check-update
    determining the fastest mirror (81 hosts).. done.
    Fedora 20 - x86_64                                                                                662 kB/s |  36 MB     00:55    
    Infinality                                                                                        219 kB/s |  64 kB     00:00    
    determining the fastest mirror (1 hosts).. done.
    RPM Fusion for Fedora 20 - Free - Updates                                                          27 kB/s | 5.6 kB     00:00    
    Adobe Systems Incorporated                                                                         13 kB/s | 1.8 kB     00:00    
    RPM Fusion for Fedora 20 - Nonfree - Updates                                                       19 kB/s | 3.9 kB     00:00    
    RPM Fusion for Fedora 20 - Free                                                                   133 kB/s | 487 kB     00:03    
    determining the fastest mirror (11 hosts).. done.
    Fedora 20 - x86_64 - Updates                                                                      641 kB/s | 6.7 MB     00:10    
    RPM Fusion for Fedora 20 - Nonfree                                                                 90 kB/s | 289 kB     00:03    
    Infinality - noarch                                                                                24 kB/s | 3.7 kB     00:00    
    
    kmod-nvidia-304xx-3.12.5-302.fc20.x86_64.x86_64                     304.117-1.fc20.1                     rpmfusion-nonfree-updates
    And just like yum...
    Code:
    $ ls -ld /var/tmp/dnf-paul-p1rFQ9
    drwx------. 3 paul paul 4096 Dec 21 12:36 /var/tmp/dnf-paul-p1rFQ9

  5. #5
    Join Date
    Jul 2015
    Location
    Belfast
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: dnf and yum seeing different updates

    I know this is an old thread, but I would just like to report that on f22 apper and dnf continue to see different updates (apper generally reporting newly available updates while dnf reports nothing new).

    A workaround is to dnf clean all then dnf update, but still I'd expect dnf to see new updates when they become available.

Similar Threads

  1. when dnf is done, will yumex use dnf right away?
    By marko in forum Fedora Focus
    Replies: 6
    Last Post: 4th October 2014, 11:22 PM
  2. Help with Yum Error: File /var/cache/yum/i386/17/updates/metalink.xml does not exist
    By Jamwa in forum Installation, Upgrades and Live Media
    Replies: 4
    Last Post: 21st December 2012, 07:40 AM
  3. Are you using dnf?
    By hadrons123 in forum F18 Development
    Replies: 13
    Last Post: 20th December 2012, 11:50 PM
  4. Yum Updates and Update manager updates differ.
    By Trapper in forum Alpha, Beta & Snapshots Discussions (Fedora 11 Only)
    Replies: 7
    Last Post: 21st May 2009, 11:13 PM
  5. Replies: 3
    Last Post: 13th February 2007, 04:13 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •