RE: How to find package name of a *.deb file?
Thanks for the info! I tried with your method, and it went pretty fast
in doing the right thing. But then apt-get had a segmentation fault.
From: Wouter Verhelst [mailto:firstname.lastname@example.org]
Sent: Sunday, February 15, 2009 3:20 AM
To: Matthew Palmer
Subject: Re: How to find package name of a *.deb file?
On Sat, Feb 07, 2009 at 09:15:01AM +1100, Matthew Palmer wrote:
> [DO NOT Cc me on list replies, and knock off the top-posting]
> On Fri, Feb 06, 2009 at 10:55:36AM -0800, Weidong Li wrote:
> > sudo apt-get -d install iceweasel=3.0.5-1
> > It downloads files and gives me dependency package lists. However,
> > does not download the correct versions of dependency packages - it
> > downloads versions for x386 architecture, not for armel.
> > What should I do to let apt-get know that all my packages should be
> > armel, not for x386? Or should I use a different tool to get the
> > packages?
> apt-get is designed to manage packages on your running system only.
> need to download the package and it's dependencies by hand, and unpack
> by hand.
Actually, apt-get *can* download packages for a different architecture,
if you wish. If you're doing this, you'd also use an option that checks
for installed packages on a different place than does the 'normal' apt,
otherwise dependencies would be checked against the installed packages
on your system.
Something like this in a script should work:
apt-get -o Apt::Architecture=armel -o Debug::NoLocking \
-o Dir::State::status=~/foo/var/lib/dpkg/status \
-o Dir::Etc::sourcelist=~/foo/etc/apt/ \
-o Dir::Cache::pkgcache=~/foo/var/cache/apt/archives "$@"
You'd then run that script like you run 'regular' apt-get. Note that
you'll have to create apt's cache directories and config files, and that
you'll also have to create an empty ~/foo/var/lib/dpkg/status file. If
you forget one, apt will complain about the missing files, so creating
them should be easy.