Web lists-archives.com

Re: Optimizing use of /var/cache/apt/archives/ by Synaptic &/or apt-get

On Thu 24 Jan 2019 at 07:25:46 (-0600), Richard Owlett wrote:
> On 01/23/2019 08:53 AM, Pascal Hambourg wrote:
> > Le 23/01/2019 à 15:43, Richard Owlett a écrit :
> > > 
> > > 1. If /var/cache/apt/archives/ has the same or later version
> > > version of a package, will Synaptic and apt-get automatically
> > > use contents of /var/cache/apt/archives/ in preference to
> > > downloading whatever is at location specified by sources.list?
> > 
> > Same version : yes. Later version : no.
> > 
> > > 2. If there is no internet connection at the moment, will
> > > Synaptic and apt-get  use the latest version in
> > > /var/cache/apt/archives/ ?
> > 
> > apt-get uses a version in the cache if and only if it matches the
> > requested version, regardless of the internet connectivity.
> > 
> > 1) apt decides which version of a package it wants.
> > 2) If that package version is present in the cache, it uses it.
> > 3) Otherwise, it selects a mirror and downloads it from there.
> > 
> I may have some re-thinking to do. Due to bandwidth I avoid downloads
> whenever possible. Instead I purchase DVD sets. That's no real problem
> for the machine whose purpose resembles a typical user's.
> I have a couple of machines set aside for experimentation. The
> explicitly have no connectivity to the outside world. My mental image
> resembled using the cache contents as an local pseudo-repository. I
> may have to create a real one.

I would take a look at apt-move and apt-offline. Both look as though
they could be of help.

But don't forget that you can just stuff the cache, copying the files
from one /var/cache/apt/archives to another. Just remember to set
noclean wherever necessary.

While you're reading   man dpkg, realise that dpkg can (and sometimes
must) install more than one package.


   -i, --install package-file...
           Install the package. If --recursive or -R option is specified,
           package-file must refer to a directory instead.

           Installation consists of the following steps:

           1. Extract the control files of the new package.


Back when dpkg was a more frequent topic of conversation here,
people would get tripped up by mutual dependencies (A depends
on B and vice versa) not realising that   dpkg -i A B   works.
Perhaps a sprinkling of (s) suffixes would improve the man page.