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

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, it
> > 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 for
> > 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.  You
> need to download the package and it's dependencies by hand, and unpack them
> 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.

-- 
<Lo-lan-do> Home is where you have to wash the dishes.
  -- #debian-devel, Freenode, 2004-09-22


Reply to: