diff options
author | Julian Andres Klode <julian.klode@canonical.com> | 2020-01-08 12:44:38 +0100 |
---|---|---|
committer | Julian Andres Klode <julian.klode@canonical.com> | 2020-01-08 12:44:38 +0100 |
commit | 84176f6cde1fda522a3aad21d8238c7bd603da87 (patch) | |
tree | f62c2c43b1b5282dd9662e98cb2807198eb888a6 | |
parent | d3636f2666b77eb17b261300cb91eb912e2789c6 (diff) |
acquire: Move queue startup after calling log's Start()
Startup() was checking for bad items and failing them, but
we did not actually call Start() in the log, so the log might
not be setup correctly.
This caused a crash in python-apt when items were being
failed on queue startup, as it released the GIL when Start()
is being called and re-acquires it when running callbacks.
-rw-r--r-- | apt-pkg/acquire.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/apt-pkg/acquire.cc b/apt-pkg/acquire.cc index dd7dedb03..8ebac6d2a 100644 --- a/apt-pkg/acquire.cc +++ b/apt-pkg/acquire.cc @@ -691,12 +691,12 @@ pkgAcquire::RunResult pkgAcquire::Run(int PulseIntervall) CheckDropPrivsMustBeDisabled(*this); Running = true; - - for (Queue *I = Queues; I != 0; I = I->Next) - I->Startup(); - + if (Log != 0) Log->Start(); + + for (Queue *I = Queues; I != 0; I = I->Next) + I->Startup(); bool WasCancelled = false; |