PDA

View Full Version : Where to put deb files for synaptic to use


phorque
May 8th, 2006, 02:54 AM
Instead of down mass update downloads for dapper at home, I've come to university and used a script generated by synaptic to wget all the updates from my university's local repositories. Very nice. Getting 263MB of updates took less than 5 mins.

However, I figured that going home and "sudo dpkg -i *.deb"-ing them would be 7 kinds of stupid. So I asked around and the suggestion I got was to put the debs in /var/cache/apt/ and then run synaptic. Is this the right thing to do?

I was just wondering if anyone had experience with this and could confirm, as this was only a l33t linux buddy's best guess. So if anyone has gotten this kinda thing to work in one way or another, let me know.

aysiu
May 8th, 2006, 03:15 AM
Unfortunately, it's not as easy as just plopping them into /var/cache/apt/archives

Why is sudo dpkg -i *.deb stupid, by the way?

If that doesn't work (if it is, in fact, stupid), try this:
https://wiki.ubuntu.com/AptMoveHowto

charlie.
May 8th, 2006, 03:43 AM
In South Africa (I see "Cape Town" as your location, mine is "Port Elizabeth) bandwidth is limited. I reload frequently. Ten times a day is not unusual when I am testing distros. (Yesterday I reloaded Ubuntu three times and Debian twice!) I use both Debian and Ubuntu - both based on APT. To save downloads, I have a spare disk that I mount on each system. Before reloading, I copy /var/cache/apt/archives/*.deb to this disk. After reloading I copy all these files back to /var/cache/apt/archives. When I install anything with APT, it only downloads the files from the Internet if the .deb is damaged or a new version is available. (Just don't "apt-get clean") I never mix the Debian and Ubuntu files. This appears to work very well.

From my observations, I would assume that you could drop them into "/var/cache/apt/archives" and then update or upgrade or install normally. Don't do a "clean", I say again, that will delete them! If you find that APT is downloading the file again, the version on the server has probably been updated.

Remember that APT looks for a .DEB file that matches its indexes and downloads the file if it is not cached. Placing the files in the cache folder will not solve your problems unless you update your indexes (apt-get update) and the resultant indexes mention the files that you have. You might find that some files are still downloaded because the indexes changed between University and your PC.

Don't listen to advice: try it and fix it if you break it!

phorque
May 8th, 2006, 09:18 AM
OK, I did put them in the archive folder and that saved me from about 282 downloads, but of course there's about 20 new ones for today (such is life, I guess). An apt-update made the files available to synaptic and things went well. So back to university tomorrow with another script of updates to download.

As for just dpkg -i on all the deb files at once, I figured that would be stupid because I also downloaded a bunch of files I thought I might need but wasn't sure of dependencies etc. Wouldn't I just end up with more mass downloads from that?

jobezone
May 14th, 2006, 03:40 PM
OK, I did put them in the archive folder and that saved me from about 282 downloads, but of course there's about 20 new ones for today (such is life, I guess). An apt-update made the files available to synaptic and things went well. So back to university tomorrow with another script of updates to download.

As for just dpkg -i on all the deb files at once, I figured that would be stupid because I also downloaded a bunch of files I thought I might need but wasn't sure of dependencies etc. Wouldn't I just end up with more mass downloads from that?
If those extra .deb packages had dependencies not provided in the bunch of .deb's your telling dpkg to install, then it would probably complain. But you then could ask apt-get to fix it for you and get the needed dependencies from the net, using:

sudo apt-get -f install

But then again, this would download files from your home conection, which you don't want.
I guess it's best for you to select first in synaptic the extra programs you'll want, then tell synaptic to create the "wget" script.

phorque
May 15th, 2006, 04:29 PM
If those extra .deb packages had dependencies not provided in the bunch of .deb's your telling dpkg to install, then it would probably complain. But you then could ask apt-get to fix it for you and get the needed dependencies from the net, using:

sudo apt-get -f install

But then again, this would download files from your home conection, which you don't want.
I guess it's best for you to select first in synaptic the extra programs you'll want, then tell synaptic to create the "wget" script.

It's actually been working great, I've been getting 80-250MB a day and then taking them back home on my flash disk to dump and install.