Results 1 to 6 of 6

Thread: apt-get dist-upgrade --print-uris not working as expected

  1. #1
    Join Date
    May 2012
    Beans
    10

    Question apt-get dist-upgrade --print-uris not working as expected

    I can, for example, do this:
    Code:
    \sudo \apt-get --print-uris --yes --reinstall install bash
    Code:
     Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 7 not upgraded. Need to get 643 kB of archives. After this operation, 0 B of additional disk space will be used. 'http://archive.ubuntu.com/ubuntu/pool/main/b/bash/bash_4.2-5ubuntu3_amd64.deb' bash_4.2-5ubuntu3_amd64.deb 642968 MD5Sum:55770c1cfb19e0853ddc2f30d7eb114e
    I want to do the same thing with dist-upgrade. The other day I did this and could get _some_ URLs, but for some reason some packages were not included. Now those same packages refuse to print.
    Code:
    sudo apt-get dist-upgrade --print-uris --yes
    Code:
     Reading package lists... Done Building dependency tree        Reading state information... Done Calculating upgrade... Done The following packages will be upgraded:   dbus dbus-x11 libdbus-1-3 libdbus-1-3:i386 libfm-data libfm-gtk-data linux-libc-dev 7 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Need to get 0 B/1,771 kB of archives. After this operation, 67.6 kB of additional disk space will be used.
    Why would some packages not work the same as others? Do I need to pursue some other command-line way to do the same thing? I can get more information by comparing with Synaptic's "Generate package download script".
    Code:
     wget -c http://archive.ubuntu.com/ubuntu/pool/main/d/dbus/libdbus-1-3_1.6.8-1ubuntu6.1_i386.deb wget -c http://archive.ubuntu.com/ubuntu/pool/main/d/dbus/libdbus-1-3_1.6.8-1ubuntu6.1_amd64.deb wget -c http://archive.ubuntu.com/ubuntu/pool/main/d/dbus/dbus_1.6.8-1ubuntu6.1_amd64.deb wget -c http://archive.ubuntu.com/ubuntu/pool/main/d/dbus/dbus-x11_1.6.8-1ubuntu6.1_amd64.deb wget -c http://ppa.launchpad.net/mati75/lubuntu/ubuntu/pool/main/libf/libfm/libfm-data_1.1.0+git20130614-0ubuntu1_all.deb wget -c http://ppa.launchpad.net/mati75/lubuntu/ubuntu/pool/main/libf/libfm/libfm-gtk-data_1.1.0+git20130614-0ubuntu1_amd64.deb wget -c http://archive.ubuntu.com/ubuntu/pool/main/l/linux/linux-libc-dev_3.8.0-25.37_amd64.deb
    (No I do not want to use Synaptic for this process, it must be command-line) This reveals that these are valid packages to download, with dependencies which have been met. Could the two PPA packages be interfering with apt-get --print-uri ?
    Last edited by spiralofhope; June 17th, 2013 at 12:08 PM.

  2. #2
    Join Date
    Feb 2008
    Beans
    5,078
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: apt-get dist-upgrade --print-uris not working as expected

    I don't understand where you specify uri or url.

  3. #3
    Join Date
    May 2012
    Beans
    10

    Re: apt-get dist-upgrade --print-uris not working as expected

    Quote Originally Posted by gordintoronto View Post
    I don't understand where you specify uri or url.
    I don't. I'm not trying to.

  4. #4
    Join Date
    Mar 2010
    Location
    India
    Beans
    8,116

    Re: apt-get dist-upgrade --print-uris not working as expected

    Unless I'm missing something -

    The first command -
    Code:
    \sudo \apt-get --print-uris --yes --reinstall install bash
    ..is forcing the reinstallation of the package "bash". Since it is not already in the apt cache (obviously), it needs to be downloaded, hence the URI is returned.

    The second command -
    Code:
    sudo apt-get dist-upgrade --print-uris --yes
    ..only downloads those packages that are actually upgraded and are not already in the apt cache. So you will get relatively fewer URIs (or none if all the packages to be upgraded have already been downloaded and are present in apt cache.)

    In your example post, the output of the second command suggests to me that the packages needed to be upgraded are already in the apt cache, hence no URIs were returned -
    Code:
    The following packages will be upgraded:
      dbus dbus-x11 libdbus-1-3 libdbus-1-3:i386 libfm-data libfm-gtk-data linux-libc-dev
    7 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    Need to get 0 B/1,771 kB of archives.
    Varun
    Help others by marking threads as [SOLVED], if they are. (See how)
    Wireless Script | Use Code Tags

  5. #5
    Join Date
    May 2012
    Beans
    10

    Re: apt-get dist-upgrade --print-uris not working as expected

    Quote Originally Posted by varunendra View Post
    In your example post, the output of the second command suggests to me that the packages needed to be upgraded are already in the apt cache, hence no URIs were returned
    Aha.

    I deleted /var/cache/apt and now the command returns a list of URLs as I expected. I thought I had cleared the local cache already.. I'll have to check my scripting.

    Thanks for your help.

  6. #6
    Join Date
    Mar 2010
    Location
    India
    Beans
    8,116

    Re: apt-get dist-upgrade --print-uris not working as expected

    Quote Originally Posted by spiralofhope View Post
    I thought I had cleared the local cache already.. I'll have to check my scripting.

    Thanks for your help.
    Glad I could
    Surprises of automation scripts !
    Varun
    Help others by marking threads as [SOLVED], if they are. (See how)
    Wireless Script | Use Code Tags

Tags for this Thread

Bookmarks

Posting Permissions

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