[Apt-Rpm] updating sources.list through lua script

Johan Huysmans johan.huysmans at inuits.be
Fri Apr 18 07:36:21 PDT 2008


Hi All,

I want to achieve following situation.
You run "apt-get update".
When running that command it will check that the a specific system 
variable is set, if it is that case, that server must be used.
If it is not set it must check that server 1 is available, if so it must 
use that server, if not check and use the 2nd server.

I'm running a lua script in "Scripts::AptGet::Update::Pre" that updates 
the sources.list file.
The file gets updated, but the actual apt-get update still happens with 
the old server configured, running apt-get update again uses the correct 
server.
Apparently this is because the configuration (including the sources.list 
file) gets read before the Pre script got executed.

Is there a way to tell in the lua script to re-read the configuration?
Or can you adapt the configuration loaded in APT?
Or any other feasible solution?

Thx,
Johan Huysmans





More information about the Apt-Rpm mailing list