Offline apt-get

The place to post if you need help or advice

Moderators: ChrisThornett, LXF moderators

Offline apt-get

Postby tuxmando » Thu Dec 06, 2007 10:26 am

Hi, I don't currently have a net connection to by ubuntu box, but i have fast connection at college. Is there a tool i can use on the box and under windows for grabbing dependencies? What I'm after is, say, installing anjuta requires thispackage.deb and writes it to a list, same list can be run in windows program to fetch the file and any others that the next one depends on.
tuxmando
 
Posts: 98
Joined: Fri Jul 27, 2007 1:35 pm

RE: Offline apt-get

Postby pootman » Thu Dec 06, 2007 10:37 am

Doesn't Synaptic have an option in the file menu to create a download script?
This signature has been produced using traditional writing methods on behalf of The Campaign For Real Slogans.
To enjoy this signature at its best, adjust your monitor's resolution to 1024x768.
User avatar
pootman
LXF regular
 
Posts: 430
Joined: Tue Jan 09, 2007 12:25 pm
Location: Scotland, North of England

RE: Offline apt-get

Postby Dutch_Master » Thu Dec 06, 2007 10:40 am

Goto http://www.debian.org/distrib/packages#search_packages then select whatever package you want to know the dependencies of and get them from there.
Dutch_Master
LXF regular
 
Posts: 2445
Joined: Tue Mar 27, 2007 1:49 am

RE: Offline apt-get

Postby tuxmando » Thu Dec 06, 2007 10:54 am

Thanks for the quick replies.
pootman, i'll check that at home.
dutch_master, that page will let me do it one file at a time but what i'm after is more complicated, don't think i explained properly.

What i want is this:

On ubuntu I create a list of installed debs and their versions and store this on my usb key.
I decide to install mypackage.deb and all dependencies, with all their dependencies, and so on. I've used the dependency finder but i have to download a package at a time, go home try to install again and get another package needed. or, i have to click through following all the dependencies on the download site which gets me lost and takes ages. What i'm kind of after is a version of apt for windows which won't install the packages but will download them ready for my ubuntu box to install.
tuxmando
 
Posts: 98
Joined: Fri Jul 27, 2007 1:35 pm

RE: Offline apt-get

Postby nelz » Thu Dec 06, 2007 12:02 pm

You could use APTonCD.
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8495
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

RE: Offline apt-get

Postby tuxmando » Thu Dec 06, 2007 12:13 pm

Thanks, that looks great for when I have the packages and I'll use it for reinstalls, but i'm after an easier way of getting them in the first place. thinking i might make something myself
tuxmando
 
Posts: 98
Joined: Fri Jul 27, 2007 1:35 pm

RE: Offline apt-get

Postby nelz » Thu Dec 06, 2007 2:26 pm

What if you run "apt-get --download --simulate pkgname"? I'm not near a Debian system now, but that should show you which packages it wants to download.
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8495
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

RE: Offline apt-get

Postby tuxmando » Fri Dec 07, 2007 10:09 am

thanks for trying but i'm not sure i can do what i'm after. i can do what your suggesting but it means doing it for every extra that has dependencies. what i could do with is an ubuntu install running on the college comp in a virtual machine but we're not allowed them. i had thought of knocking up a sort of pseudo synaptic for windows which would download the file i want, check the control file for deps then download them as needed, but i think it's beyond my abilities at the moment. do you know where best i could look for the method of checking the control file then downloading debs? i'd probably do it in c# because that's what we're learning but i've done some c++ before. is there a resource you'd recommend or is it a google job?
tuxmando
 
Posts: 98
Joined: Fri Jul 27, 2007 1:35 pm

RE: Offline apt-get

Postby tuxmando » Fri Dec 07, 2007 10:11 am

that looks kind of crazy, looking at it! what i mean is how do i find out the steps from querying a site for a giving dependencies to downloading it from the site?
tuxmando
 
Posts: 98
Joined: Fri Jul 27, 2007 1:35 pm

RE: Offline apt-get

Postby nelz » Fri Dec 07, 2007 1:22 pm

It seems you didn't look closely enough. apt-get will automatically install dependencies, and the --print-uris option will output the URIs of all the files it needs. You can use grep and cut to extract the URIs fro the output with

Code: Select all
apt-get --print-uris --yes install pkgspec | grep ^\' | cut -d\' -f2


For example, running this with "postgrey" as the pkgspec gives this output

Code: Select all
http://security.ubuntu.com/ubuntu/pool/universe/libn/libnet-dns-perl/libnet-dns-perl_0.59-1build1.1_i386.deb
http://gb.archive.ubuntu.com/ubuntu/pool/universe/libb/libberkeleydb-perl/libberkeleydb-perl_0.31-1_i386.deb
http://gb.archive.ubuntu.com/ubuntu/pool/main/libd/libdigest-sha1-perl/libdigest-sha1-perl_2.11-1build1_i386.deb
http://gb.archive.ubuntu.com/ubuntu/pool/main/libd/libdigest-hmac-perl-dfsg/libdigest-hmac-perl_1.01-5_all.deb
http://gb.archive.ubuntu.com/ubuntu/pool/universe/libi/libio-multiplex-perl/libio-multiplex-perl_1.08-3_all.deb
http://gb.archive.ubuntu.com/ubuntu/pool/universe/libn/libnet-cidr-perl/libnet-cidr-perl_0.11-1_all.deb
http://gb.archive.ubuntu.com/ubuntu/pool/universe/libn/libnet-ip-perl/libnet-ip-perl_1.25-2_all.deb
http://gb.archive.ubuntu.com/ubuntu/pool/universe/libn/libnet-server-perl/libnet-server-perl_0.94-1_all.deb
http://gb.archive.ubuntu.com/ubuntu/pool/universe/p/postgrey/postgrey_1.27-4_all.deb


All the debs needed to install postgrey and its dependencies.

You can give more than one package name as pkgspec. However, you do need to run the apt-get update from time to time to keep up to date. If you are using another connection because your home computer is on a slow dialup, there is no problem as apt-get update doesn't download much. If you have no Internet access at all, you can run

Code: Select all
apt-get --print-uris update


and download the files elsewhere. Then copy, unpack and rename the Sources files in /var/lib/apt/lists.

When using apt-get --print-uris, redirect the output to a file and copy this to a USB flash drive to take it to the Internet connected computer. Some FTP programs will read the URLs to download from a file, such as

Code: Select all
wget --input-file myurilist
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8495
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

RE: Offline apt-get

Postby tuxmando » Wed Dec 12, 2007 1:28 pm

thanks so much, i'll try that
tuxmando
 
Posts: 98
Joined: Fri Jul 27, 2007 1:35 pm


Return to Help!

Who is online

Users browsing this forum: No registered users and 1 guest