Re: python-apt problem
On Wed, Mar 23, 2005 at 11:32:14AM +0100, Alex Polite wrote:
> On Wed, 23 Mar 2005 02:09:59 +0100, Michael Vogt <mvogt@acm.org> wrote:
> >
> > Could you please try:
> > - apt_pkg.ReadConfigFile(Cnf,"/tmp/myapt.conf")
> > - apt_pkg.init()
> > + apt_pkg.InitSystem()
> > + apt_pkg.ReadConfigFile(apt_pkg.Config, "/tmp/myapt.conf")
> >
> > apt_pkg.init() calls the normal pkgInitConfig() and that will read all
> > of the configuration.
>
>
> Thanks but no go.
>
> It gives this output:
>
> Traceback (most recent call last):
> File "/tmp/test4.py", line 17, in ?
> cache = apt_pkg.GetCache()
> SystemError: The list of sources could not be read.
Does "Dir::Etc::SourceList" point to a sources.list file in your
myapt.conf file? Have you checked with:
"strace -e trace=open python your_script.py" that it acutally opens
the correct one? I did a quick check here and it seems to work.
Cheers,
Michael
--
Linux is not The Answer. Yes is the answer. Linux is The Question. - Neo
Reply to: