LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices



Reply
 
Search this Thread
Old 06-20-2004, 02:39 PM   #1
Abject
Member
 
Registered: Mar 2002
Location: Studio City, CA
Distribution: Debian (Sarge-Sid)
Posts: 76

Rep: Reputation: 15
apt-proxy and cron-apt - download once for the whole LAN


First, a long story about how I got here, since there is no mention of apt-proxy in the forum.
First reply is my question for you cron and bash experts.

I have 2 desktops, a laptop and a server all running mixed sarge/sid on my home LAN, behind a 384/128 DSL connection. Of course, doing apt-get update / apt-get upgrade makes all 4 of them gobble up bandwidth and, because I'm too nervous to apt-get clean the old ones (just in case...) I end up with 4 copies of every package ever downloadedl

I thought: There's got to be a better way! and there is!

I looked at building a local mirror and rsyncing, etc., but this path looks to be complex and error-prone. Bleh.

apt-proxy is a dandy little package, available from your local Debian mirror, that allows you to set one node up as the "proxy" for all your apt-getting. This node fetches from a mirror the first time anyone asks for a specific version of a package and keeps a local copy. After that, anytime another node requests that package, the local copy is supplied (at LAN speeds). Way cool. The package includes a script that will convert your carefully hand-crafted sources.list into apt-proxy's equivalent config file.

So, then, being greedy of my limited primetime bandwidth, I started looking for something that would prime the pump for apt-get update / upgrade in the dark of night. As usual, I wasn't the first one to have this problem.

cron-apt (also at your nearby Debian mirror) is a cron job that runs every night (week, hour, 5 minutes, whatever) and, essentially does an apt-get update / upgrade in the background. Just the thing.

Just one problem ... (see my first reply)
 
Old 06-20-2004, 02:53 PM   #2
Abject
Member
 
Registered: Mar 2002
Location: Studio City, CA
Distribution: Debian (Sarge-Sid)
Posts: 76

Original Poster
Rep: Reputation: 15
how to cron-apt with mixed sarge/sid?

I'm sure this is an easy one... just not for me.

cron-apt (out of the box) has 2 "action" files, one for [apt-get] updating and one for downloading - as in
Code:
# apt-get -d -y upgrade
i.e., download-only and answer Yes to all questions.

If you keep a mixed sarge/sid (testing/unstable) environment (like me), then you probably do the three-step apt-get, like so:
Code:
# apt-get update    # update your package lists
# apt-get install `apt-show-versions -u -b | grep unstable` # upgrade the unstable ones first
# apt-get upgrade   # upgrade the testing ones
So, I added that middle line to the 3-download file for cron-apt. But, it doesn't like the substitution of the output from apt-show-versions. The log file says:
Code:
...
CRON-APT ACTION: 3-download, Sun Jun 20 08:28:06 PDT 2004
CRON-APT LINE: install -d -y `apt-show-versions -u -b | grep unstable`, Sun Jun
 20 08:28:05 PDT 2004
Reading Package Lists...
Building Dependency Tree...
E: Couldn't find package `apt-show-versions
SO: What's the right syntax to make the apt-show-versions work in cron?

Thanks!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to set up proxy in Apt-Get's apt.conf? rykel Fedora 9 10-09-2013 04:24 AM
apt via digest proxy HSukirman Linux - Newbie 1 06-26-2005 10:30 PM
running apt-get in cron firefly2442 Debian 2 04-29-2004 11:50 PM
APT behind a proxy geniarse Debian 4 04-14-2004 10:26 PM
apt-get through a proxy connection? Shade Linux - Software 8 09-13-2003 12:21 PM


All times are GMT -5. The time now is 12:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration