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

apt-get source question



Is there a way to find out exactly from where apt-get is planning to
fetch a particular package?

The reason I need to know this is because of a bug in apt-get, found
and reported by a few people before me, that goes something like
this:

----------- Begin bug description -------------
1) I enter "apt-get install foo" at the console
  * Package foo is on the first binary CD
  * Package foo depends on packages bar and bob
  * Package bar is on the second binary CD
  * Package bob is on the first binary CD
2) apt-get prompts for the first binary CD
3) I insert the first binary CD and press <Enter>
4) apt-get unpacks foo
5) apt-get then tries to find bar and can't
6) apt-get says "Wrong CD", gives up and tries to fetch bar from
   the debian site instead. If I'm connected it works, otherwise
   it fails. Wasted bandwith if it did succeed, as I already have
   bar on the second CD.
------------ End bug description --------------

I have found one workaround, however, which would be improved if
I knew exactly where the packages would be coming from:

-------------- Begin workaround ---------------
One workaround is to find out which packages are going to be 
installed by using the "-s" flag with "apt-get install", and then
installing them in the order when they can be installed one by one.
This means that apt-get will prompt for the correct CD each time.
--------------- End workaround ----------------

What I want to do is to make a list of the packages that are going
to be installed, together with the intended fetch location and the
relevant dependencies. A bit like this:

foo is located on "Debian 2.2r0 Binary 1"
-> bar is located on "Debian 2.2r0 Binary 2"
-> bob is located on "Debian 2.2r0 Binary 1"

Where foo depends on bar and bob, but bob doesn't depend on bar.
Armed with this information I would do "apt-get install bar" then
"apt-get install foo", and it would work, as foo and bob are on
the same CD.

Any script ideas gratefully received!

--
Best regards,

Peter Hugosson-Miller
"Faber est suae quisque fortunae."



Reply to: