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

Re: [ASK] Tracking Package Dependencies in /var/cache/apt/archives


First: dpkg has no special knowledge about this directory. It's just a
random directory the APT family of programs use to store downloads, which
will instruct dpkg to install this or that exact deb-file from there, so
dpkg can't help you here.

On Sat, Mar 9, 2013 at 4:54 AM, Ade Malsasa Akbar <teknoloid@gmail.com> wrote:
> Wish:
> I wanna track/filter/find DEB dependencies exactly for Netbeans (no others)
> from cache for doing sudo dpkg -i *.deb in my another PCs with same Ubuntu
> 12.04 version. Assume I have 30 PCs. I wanna install Netbeans offline,
> because no bandwidth for downloading again.

The thing is that netbeans has "different" dependencies on any given machine.
On machine A a package might already be installed in a new enough version,
while machine B has a too old version. It gets even more interesting for
or-groups like in the netbeans example java6 or java7 - both are able to
handle netbeans, but machine A and B not necessarily have the same setup …
So there is a good chance that with your approach you will hit a wall.

The "correct" thing to do is setup a local APT proxy (different
 implementations exist) so that all machines ask the proxy for a file and it
either serves it from its cache or downloads it from the internet into its
cache to serve it from the cache from now on.

The quick-and-dirty solution is to ensure that /etc/apt/sources.list(.d) use
the same mirrors on all machines and then just sync /var/lib/apt/lists and
/var/cache/apt/archives to the machine in question with rsync or similar.
(apt-get clean/autoclean are your friend)

Either way will ensure that you can use the APT family of tools to resolve the
problem rather than resorting to dpkg which assumes that you have solved it.

Best regards

David Kalnischkies

Reply to: