[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: An INCOMPLETE solution - was [Re: Where is data stored when Synaptic scans DVDs?]



On Fri 24 Mar 2017 at 16:31:25 -0500, David Wright wrote:

> On Thu 23 Mar 2017 at 11:29:38 (+0000), Brian wrote:
> > On Thu 23 Mar 2017 at 10:12:57 +0000, Darac Marjal wrote:
> > 
> > > On Wed, Mar 22, 2017 at 08:08:28PM -0500, Richard Owlett wrote:
> > > >On 03/17/2017 08:47 AM, Richard Owlett wrote:
> > > >>As I have limited bandwidth, I install from DVDs.
> > > >>Also I frequently experiment with various options by doing a fresh
> > > >>install to a different partition.
> > > >>It is annoying to keep re-scanning a set of 13 DVDs.
> > > >>Where is the information stored?
> > > >>/etc/apt/sources.list is obvious, but where is the data about contents
> > > >>of each DVD stored?
> > > >>TIA
> > > >
> > > >It had been suggested that all the needed information might be in
> > > >/etc/apt/sources.list
> > > >    PLUS
> > > >the /var/lib/apt directory
> > > >
> > > >It ain't :{
> > > 
> > > Looking at the source, apt-cdrom does a bunch of checks and then calls into
> > > pkgCdrom::Add()[1]. That does some more checks and then the interesting
> > > stuff seems to start around line 746.
> > > 
> > > The Configuration Database (TODO: Find where this is stored... Ah, I *think*
> > > that's the /var/lib/apt/cdroms.list mentioned earlier) is checked for
> > > existance of the CD and updated, if necessary.  The next interesting part is
> > > at line 838 where the packages are copied.  This seems to happen in
> > > IndexCopy::CopyPackages()[2] which, at line 97, creates a file in
> > > /var/cache/apt/archives/partial/ containing the contents of the cdrom.
> > > 
> > > [1] http://sources.debian.net/src/apt/1.4~rc2/apt-pkg/cdrom.cc/
> > > [2] http://sources.debian.net/src/apt/1.4~rc2/apt-pkg/indexcopy.cc/
> > > 
> > > 
> > > So, in summary, I think you need /etc/apt/sources.list, /var/lib/apt *AND*
> > > /var/cache/apt/archives.
> > 
> > Suppose /var/cache/apt/archives is empty because 'apt-get clean' has
> > been run. What then?
> 
> Good point. I noticed that the two .bin files in /var/cache/apt/ that
> https://lists.debian.org/debian-user/2017/03/msg00722.html
> mentioned, come and go with apt-get update and clean respectively.
> I had overlooked how ephemeral they are. They're built from scratch at
> the "Reading package lists... Done" line after the Fetched line.
> 
> If your only sources are the DVDs then I can't see a problem with just
> adding those files (or whatever the names are of any files that
> appear—they could differ with apt-cdrom) to your list of files you
> (OP) share between systems. It's tricky to check what's actually
> in them as they're binary databases (what I called "hidden"
> information previously).

It probably does no harm to transfer them to the target system but they
can be generated there from 'apt-get update'.

-- 
Brian.


Reply to: