[wellylug] debian q's

JP jumbophut at yahoo.co.in
Fri Mar 26 09:33:00 NZST 2004


 --- Alex wrote: 
> 
> i want to run apt-get update against a source list
> that looks like 
> this:
> 
> #deb http://ftp.nz.debian.org/debian stable main
> contrib non-free
> #deb http://ftp.nz.debian.org/debian-non-US
> stable/non-US main 
> contrib
> 
> deb http://ftp.nz.debian.org/debian-security
> stable/updates 
> 
> ie force it to only update security and not the
> regular stable stuff
> 
> obviously i dont' want to manually edit sources.list
> everytime i just 
> want to get security stuff...any thoughts?
> -alex.
> 
Perhaps write a bash/perl script to add or remove the
comments (the #s) depending on whether or not you
specify security only?  It will imply additional time
for the apt-get update, but it removes the manual
change.

e.g. (this obviously won't work, but I'm sure you can
get the syntax right and fill in the details):

#!/bin/sh
#myaptupd -- utility to do apt-get

#If command line arg is sec, do security only
if ($1 == "sec")
  #backup sources.list file
  #sed sources.list file, deleting lines with
'security' in them
  #apt-get update
  #apt-get upgrade
  #restore sources.list
  #optionally, apt-get update
# Otherwise do a full update
else
  #apt-get update && apt-get upgrade
fi

Cheers
Tony

________________________________________________________________________
Yahoo! India Insurance Special: Be informed on the best policies, services, tools and more. 
Go to: http://in.insurance.yahoo.com/licspecial/index.html




More information about the wellylug mailing list