DNF command re-installing same packages
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 8 of 8
  1. #1
    Join Date
    Sep 2006
    Posts
    1,666

    DNF command re-installing same packages

    Hi,

    I am using Fedora 22 Workstation 32+ bit. But it seems that
    Code:
    dnf update
    command is downloading the same packages again whenever I have to stop it with Ctrl+c. Even i I restart the pc, and use dnf to update the system, it re-installs already installed packages. Please help, thanks.
    fedoralinuxcommands.blogspot.com


    All the forces in the world are not so powerful as an idea whose time has come - Victor Hugo

  2. #2
    Join Date
    Mar 2004
    Location
    In your closet
    Posts
    15,745

    Re: DNF command re-installing same packages

    I've added the line
    PHP Code:
    keepcache=true 
    to /etc/dnf/dnf.conf. That appears to have done the trick for me.

    I now have some 500 packages in the cache folders and I don't believe that I see that "re-download" behavior that you speak of.
    Glenn
    The Bassinator

  3. #3
    Join Date
    Sep 2006
    Posts
    1,666

    Re: DNF command re-installing same packages

    Quote Originally Posted by glennzo
    I've added the line

    PHP Code:
    keepcache=true 

    Thanks, I did the following and it worked, no re-downloading of same packages any more.

    Code:
    [root@localhost john]#  echo 'keepcache=true' >> /etc/dnf/dnf.conf
    Now,

    Code:
    [root@localhost john]# cat /etc/dnf/dnf.conf 
    [main]
    gpgcheck=1
    installonly_limit=3
    clean_requirements_on_remove=true
    keepcache=true
    [root@localhost john]
    fedoralinuxcommands.blogspot.com


    All the forces in the world are not so powerful as an idea whose time has come - Victor Hugo

  4. #4
    Join Date
    Jun 2004
    Location
    Maryland, US
    Posts
    7,448

    Re: DNF command re-installing same packages

    I'm not sure what you're meaning here, dnf shouldn't ever be downloading the same packages if there's no update to be done. But what is different
    between dnf and yum is that if you get partway through downloading N packages (say to package X < N ) and yum is interrupted you don't have to
    redownload the 1 - X packages that were successfully downloaded, yum starts at X+1 and downloads to N and quits, then updates them (or in the
    worst case you just type "yum-complete-transaction")


    dnf seems to to get to package X's download, then if you trip over the lan cable and have to plug it back in, kill dnf and restart dnf downloading again,
    you have to start at package 1 even though you'd think it would be on the disk somewhere under /var/cache/dnf. So dnf doesn't seem to cache
    transactions, so I think the keepcache=1 is sort of a workaround for a bigger design difference.

    REF:
    https://ask.fedoraproject.org/en/que...lled-download/

    bugzilla
    https://bugzilla.redhat.com/show_bug.cgi?id=1220074

    I personally don't like the "keepcache=1" because that seems to be overkill, those rpms then sit on the hard drive
    forever until you delete them. I want the old yum behavior where the transaction is cached, then when it's done then
    the rpms are removed. The discussion at that ask.fedoraproject.org thread impiles that dnf redownloads the metadata but not
    the rpm packages, that's not what I've seen happen. I've seen dnf redownload the actual rpm files, my experience is much
    more like the poster describes in the bugzilla 1220074, and it looks like this is recent bug post and might end up fixed.
    Last edited by marko; 10th July 2015 at 11:20 AM.

  5. #5
    Join Date
    Jun 2005
    Location
    Montreal, Que, Canada
    Posts
    5,608

    Re: DNF command re-installing same packages

    Quote Originally Posted by marko
    I'm not sure what you're meaning here, dnf shouldn't ever be downloading the same packages if there's no update to be done. But what is different
    between dnf and yum is that if you get partway through downloading N packages (say to package X < N ) and yum is interrupted you don't have to
    redownload the 1 - X packages that were successfully downloaded, yum starts at X+1 and downloads to N and quits, then updates them (or in the
    worst case you just type "yum-complete-transaction")


    dnf seems to to get to package X's download, then if you trip over the lan cable and have to plug it back in, kill dnf and restart dnf downloading again,
    you have to start at package 1 even though you'd think it would be on the disk somewhere under /var/cache/dnf. So dnf doesn't seem to cache
    transactions, so I think the keepcache=1 is sort of a workaround for a bigger design difference.

    REF:
    https://ask.fedoraproject.org/en/que...lled-download/

    bugzilla
    https://bugzilla.redhat.com/show_bug.cgi?id=1220074

    I personally don't like the "keepcache=1" because that seems to be overkill, those rpms then sit on the hard drive
    forever until you delete them. I want the old yum behavior where the transaction is cached, then when it's done then
    the rpms are removed. The discussion at that ask.fedoraproject.org thread impiles that dnf redownloads the metadata but not
    the rpm packages, that's not what I've seen happen. I've seen dnf redownload the actual rpm files, my experience is much
    more like the poster describes in the bugzilla 1220074, and it looks like this is recent bug post and might end up fixed.
    If you restart dnf within the 12 hour window, it will not download the same packages again. (I tested this on my own system). However, if you delay too long, dnf assumes that some repository updates to already downloaded packages has occurred, and will redo the download.

    I've actually cancelled dnf half way through downloads and then reran to confirm my last paragraph.
    Leslie in Montreal

    Interesting web sites list
    http://forums.fedoraforum.org/showth...40#post1697840

  6. #6
    Join Date
    Jun 2004
    Location
    Maryland, US
    Posts
    7,448

    Re: DNF command re-installing same packages

    Well, just tonight I had a set of 74 updates, I waited until it got to #56 and hit Ctrl+C.

    Then restarting dnf it said that four files were already downloaded and would be skipped (but I had actually downloaded 55)

    It then started at package drpm #5 and stopped at #74, so in that package set dnf re-downloaded 51 some files.

  7. #7
    Join Date
    Sep 2006
    Posts
    1,666

    Re: DNF command re-installing same packages

    Quote Originally Posted by marko
    It then started at package drpm #5 and stopped at #74, so in that package set dnf re-downloaded 51 some files.
    Well, in my own case, glennzo's suggestion worked well. Good luck.
    fedoralinuxcommands.blogspot.com


    All the forces in the world are not so powerful as an idea whose time has come - Victor Hugo

  8. #8
    Join Date
    Jan 2008
    Posts
    8

    Re: DNF command re-installing same packages

    I haven't tried yet, but it should be possible to cherry-pick this commit:

    https://github.com/jsilhan/dnf/commi...7?diff=unified

    to return the old yum-like behavior.

Similar Threads

  1. Replies: 0
    Last Post: 27th June 2010, 03:49 AM
  2. how to recompile in fedora 9 if the packages installed through yum insatall command
    By kapilmanoj in forum Installation, Upgrades and Live Media
    Replies: 2
    Last Post: 7th March 2009, 08:19 AM
  3. Installing packages with yum and rpm
    By kumarannair in forum Installation, Upgrades and Live Media
    Replies: 3
    Last Post: 6th December 2004, 12:29 PM

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
  •