Linux Format forums Forum Index Linux Format forums
Help, discussion, magazine feedback and more
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Offline apt-get

 
Post new topic   Reply to topic    Linux Format forums Forum Index -> Help!
View previous topic :: View next topic  
Author Message
tuxmando



Joined: Fri Jul 27, 2007 2:35 pm
Posts: 98

PostPosted: Thu Dec 06, 2007 10:26 am    Post subject: Offline apt-get Reply with quote

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.
Back to top
View user's profile Send private message
pootman
LXF regular


Joined: Tue Jan 09, 2007 12:25 pm
Posts: 430
Location: Scotland, North of England

PostPosted: Thu Dec 06, 2007 10:37 am    Post subject: RE: Offline apt-get Reply with quote

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.
Back to top
View user's profile Send private message
Dutch_Master
LXF regular


Joined: Tue Mar 27, 2007 2:49 am
Posts: 2422

PostPosted: Thu Dec 06, 2007 10:40 am    Post subject: RE: Offline apt-get Reply with quote

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.
Back to top
View user's profile Send private message
tuxmando



Joined: Fri Jul 27, 2007 2:35 pm
Posts: 98

PostPosted: Thu Dec 06, 2007 10:54 am    Post subject: RE: Offline apt-get Reply with quote

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.
Back to top
View user's profile Send private message
nelz
Site admin


Joined: Mon Apr 04, 2005 12:52 pm
Posts: 8364
Location: Warrington, UK

PostPosted: Thu Dec 06, 2007 12:02 pm    Post subject: RE: Offline apt-get Reply with quote

You could use APTonCD.
_________________
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
Back to top
View user's profile Send private message
tuxmando



Joined: Fri Jul 27, 2007 2:35 pm
Posts: 98

PostPosted: Thu Dec 06, 2007 12:13 pm    Post subject: RE: Offline apt-get Reply with quote

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
Back to top
View user's profile Send private message
nelz
Site admin


Joined: Mon Apr 04, 2005 12:52 pm
Posts: 8364
Location: Warrington, UK

PostPosted: Thu Dec 06, 2007 2:26 pm    Post subject: RE: Offline apt-get Reply with quote

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)
Back to top
View user's profile Send private message
tuxmando



Joined: Fri Jul 27, 2007 2:35 pm
Posts: 98

PostPosted: Fri Dec 07, 2007 10:09 am    Post subject: RE: Offline apt-get Reply with quote

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?
Back to top
View user's profile Send private message
tuxmando



Joined: Fri Jul 27, 2007 2:35 pm
Posts: 98

PostPosted: Fri Dec 07, 2007 10:11 am    Post subject: RE: Offline apt-get Reply with quote

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?
Back to top
View user's profile Send private message
nelz
Site admin


Joined: Mon Apr 04, 2005 12:52 pm
Posts: 8364
Location: Warrington, UK

PostPosted: Fri Dec 07, 2007 1:22 pm    Post subject: RE: Offline apt-get Reply with quote

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:
apt-get --print-uris --yes install pkgspec | grep ^\' | cut -d\' -f2


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

Code:
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:
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:
wget --input-file myurilist

_________________
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
Back to top
View user's profile Send private message
tuxmando



Joined: Fri Jul 27, 2007 2:35 pm
Posts: 98

PostPosted: Wed Dec 12, 2007 1:28 pm    Post subject: RE: Offline apt-get Reply with quote

thanks so much, i'll try that
Back to top
View user's profile Send private message
View previous topic :: View next topic  
Display posts from previous:   
Post new topic   Reply to topic    Linux Format forums Forum Index -> Help! All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Linux Format forums topic RSS feed 


Powered by phpBB © 2001, 2005 phpBB Group


Copyright 2011 Future Publishing, all rights reserved.


Web hosting by UKFast