NickJP
Posts: 4
Joined: Fri Jul 17, 2020 7:34 am

Apt not retrieving all package files

Sun Jul 26, 2020 1:02 am

Rpi4 running buster and pihole. Previously, when I ran "sudo apt update", apt retrieved three package source files:

Code: Select all

pi@pihole:~ $ sudo apt update
Get:1 http://raspbian.raspberrypi.org/raspbian buster InRelease [15.0 kB]
Hit:2 http://archive.raspberrypi.org/debian buster InRelease
Get:3 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages [13.0               MB]
Fetched 13.0 MB in 18s (707 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
pi@pihole:~ $
However, when I ran apt this morning, it only retrieved two package source files, with no errors indicated:

Code: Select all

pi@pihole:~ $ sudo apt update
Hit:1 http://archive.raspberrypi.org/debian buster InRelease
Hit:2 http://raspbian.raspberrypi.org/raspbian buster InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
pi@pihole:~ $
I haven't made any changes to /etc/apt/sources.list or /etc/apt/sources.list.d/raspi.list (contents shown below). Any suggestions on why the main packages source file is being ignored? I rebooted the Rpi and ran "sudo apt update" again, but with the same result that only two source files were retrieved.

Code: Select all

pi@pihole:~ $ cat /etc/apt/sources.list
deb http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi

pi@pihole:~ $ cat /etc/apt/sources.list.d/raspi.list
deb http://archive.raspberrypi.org/debian/ buster main
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspberrypi.org/debian/ buster main
pi@pihole:~ $

trejan
Posts: 2118
Joined: Tue Jul 02, 2019 2:28 pm

Re: Apt not retrieving all package files

Sun Jul 26, 2020 1:19 am

It isn't being ignored. apt is seeing that it already has the latest repo metadata so it doesn't bother downloading it again. Hit is comparing its cached copy of the InRelease file with what is on the server. If doesn't match then it'll go into the Get step where it'll download the rest of the repo metadata. If the cached InRelease matches with the server InRelease then it doesn't bother doing the Get step at all hence you only seeing the Hit steps.

NickJP
Posts: 4
Joined: Fri Jul 17, 2020 7:34 am

Re: Apt not retrieving all package files

Sun Jul 26, 2020 5:07 am

Yes, I know the difference between Hit and Get. But now apt is not showing the Hit step for the third file, only for the first two. Previously, all three would be listed, regardless of whether Get was required for any of them or not.

User avatar
jojopi
Posts: 3268
Joined: Tue Oct 11, 2011 8:38 pm

Re: Apt not retrieving all package files

Sun Jul 26, 2020 6:15 am

You have two base repositories: http://raspbian.raspberrypi.org/raspbian/ and http://archive.raspberrypi.org/debian/.

If neither InRelease file has changed, then there is no need to check anything else.

When the repos have been updated, there may be considerably more than three individual files to Get:

Code: Select all

Get:1 http://archive.raspberrypi.org/debian buster InRelease [32.6 kB]
Get:2 http://raspbian.raspberrypi.org/raspbian buster InRelease [15.0 kB]      
Get:3 http://raspbian.raspberrypi.org/raspbian buster/main Sources [11.4 MB]   
Get:4 http://archive.raspberrypi.org/debian buster/main armhf Packages [330 kB]
Get:5 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages [13.0 MB]

Return to “Troubleshooting”