Notices


Reply
Thread Tools
Posts: 47 | Thanked: 78 times | Joined on May 2008
#1
Hello!

One of my friends got a N810 to use for a couple of weeks, and he has no Wi-Fi connection, and as many of you are aware, the g_ether driver doesn't work on ITOS2008 with Windows (it seems that the RNDIS part of it is broken). Thus he was quite frustrated of the fact that every package he wants to install requires other package, that one in turn wants some other package...

So he asked me if there's a way to get a list of URLs for every .deb file he wants to install... he found the thread with the suggestion to use the --print-uris switch of apt-get, but unfortunately that requires you first to do "apt-get update", and he couldn't because there was simply no Internet connection on tablet at all.

When all variants were exhausted, I sat down and wrote a simple Python script in a evening... which does exactly what one needs in such a situation: given a package name, or a .install file it will output a list of URLs.

The script is meant to be run on a PC with a Internet connection and will download the metainfo files from the repository(-ies), parse them, compute dependencies and so on. Not that it perfectly mimics apt-get (for example, it ignores the versions of the packages), but for most use cases this should be enough.

The script can be downloaded here:
https://garage.maemo.org/frs/?group_id=687

The usage is very simple:
0. Install Python, if not already (http://python.org/download/)
1. Unpack the zip archive
2. Copy /etc/apt/sources.list.d/hildon-application-manager.list from your tablet into the script directory, or use the file provided in the archive
3. On tablet, execute:

Code:
dpkg -l > installed-packages
and copy the result file installed-packages to the script directory.
4. Now try, for example:

Code:
python apt-getit.py maemo-mapper
It will first download a few metadata files from repositories in hildon-application-manager.list (don't worry, it does that only once and then uses the cached versions) and finally display a list of URLs to .deb files. Also, you could do something like this:

Code:
python apt-getit.py othello.install evince
Hope somebody finds this useful.
 

The Following 6 Users Say Thank You to anpaza For This Useful Post:
Benson's Avatar
Posts: 4,930 | Thanked: 2,272 times | Joined on Oct 2007
#2
One thing that might help; I think apt supports local repos, e.g. on the SD card. I haven't looked into it, but that might provide a decent workaround, if you could spare the SD space, and the time to get everything.
 
qwerty12's Avatar
Posts: 4,274 | Thanked: 5,358 times | Joined on Sep 2007 @ Looking at y'all and sighing
#3
It does, I keep reinstalling the first edition of diablo like that (because of things like nitro, ftd which have no disappeared from the repo)
 
Posts: 47 | Thanked: 78 times | Joined on May 2008
#4
Yes, but there are lots of repos and you will have to download them all
Besides, it's a bit overkill to download it all when you really need just a few.
 
Benson's Avatar
Posts: 4,930 | Thanked: 2,272 times | Joined on Oct 2007
#5
First, you don't need all repos; just the ones you want to install stuff from. For most people, that's about 5, I'd guess.

It's a bit of a pain to have to go transfer files over sneakernet every time you want to install something. So the overkill might be worth it...

I'm not bashing your script here; just pointing out an alternative, knowing that which one is best depends on your situation.
 
Reply


 
Forum Jump


All times are GMT. The time now is 14:16.