Mirrored focal-updates repository not seen by apt

Sam Varshavchik mrsam at courier-mta.com
Wed Mar 9 23:59:17 UTC 2022


I'm trying to mirror updates locally, for updating multiple machines rather  
than having each one download the same updates.

I added this to mirror.list:

deb http://mirror.math.princeton.edu/pub/ubuntu focal-security main restricted universe multiverse
deb http://mirror.math.princeton.edu/pub/ubuntu focal-updates main restricted universe multiverse
deb http://mirror.math.princeton.edu/pub/ubuntu focal-backports main restricted universe multiverse

clean http://mirror.math.princeton.edu/pub/ubuntu

I ran apt-mirror. I added this at the beginnning of sources.list:

deb file:///var/spool/apt-mirror/mirror/mirror.math.princeton.edu/pub/ubuntu  
focal-security main restricted universe multiverse
deb file:///var/spool/apt-mirror/mirror/mirror.math.princeton.edu/pub/ubuntu  
focal-updates main restricted universe multiverse
deb file:///var/spool/apt-mirror/mirror/mirror.math.princeton.edu/pub/ubuntu  
focal-backports main restricted universe multiverse

With this in place I ran apt-get update.

With this I would expect that I should be able to ensure that my updates  
will hit only my local mirror by disabling all the other sources. However  
this does not appear to be the case. I'm getting dependency errors, and can  
narrow it down to a simple example:

apt-cache show gcc-9

If I have the following in sources.list commented out:

# deb http://us.archive.ubuntu.com/ubuntu/ focal-updates main restricted

then apt-cache shows me:

Package: gcc-9
Architecture: amd64
Version: 9.3.0-10ubuntu2

If I leave the main focal-updates source enabled I get

Package: gcc-9
Architecture: amd64
Version: 9.4.0-1ubuntu1~20.04

It looks to me like my mirror is not getting picked up. However, when I ran  
apt-get update I saw in its output:

Get:2 file:/var/spool/apt-mirror/mirror/mirror.math.princeton.edu/pub/ubuntu  
focal-updates InRelease [114 kB]

and others, and in the ~/.../pub/ubuntu/dists/focal-updates/main/binary- 
amd64/Packages I can see:

Package: gcc-9
Architecture: amd64
Version: 9.4.0-1ubuntu1~20.04

it's there, I mirrored it. But apt is not seeing this, anyone ideas why?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20220309/458b24b4/attachment.sig>


More information about the ubuntu-users mailing list