Version: 2.6.1
Severity: normal
Tags: upstream
Dear Maintainer,
*** Reporter, please consider answering these questions, where appropriate ***
* What led up to the situation?
I have to simultaneously launch the upgrade of 2 software that have package dependencies.
They then both run some apt-get commands.
Obviously when I run them, one of them fail because of the DPkg::Lock file.
* What exactly did you do (or not do) that was effective (or
ineffective)?
Then I looked for an integrated solution for that in apt : DPkg::Lock::Timeout seemed perfect.
Then I use apt like this in my script:
apt-get -o DPkg::Lock::Timeout=360 update
apt-get -o DPkg::Lock::Timeout=360 -y upgrade
apt-get -o DPkg::Lock::Timeout=360 -y autoremove
apt-get -o DPkg::Lock::Timeout=360 -y install gcc python3-dev portaudio19-dev ffmpeg
Same in the other upgrade script.
I also tried to configure directly the DPkg::Lock::Timeout=360 a config file of the /etc/apt/apt.conf.d directory:
```
$ cat apt.conf.d/10dpkg-lock-timeout
DPkg::Lock::Timeout "360";
```
The result for example here:
```
+ sudo ./bin/pre-upgrade
+ tee /tmp/anc-server-pre-upgrade
+ export DEBIAN_FRONTEND=noninteractive
+ apt-config dump
+ grep Timeout
DPkg::Lock::Timeout "360";
Binary::apt::DPkg::Lock::Timeout "-1";
+ apt-get -y update
Reading package lists...
E: Could not get lock /var/lib/apt/lists/lock. It is held by process 14439 (apt-get)
E: Unable to lock directory /var/lib/apt/lists/
```
So, it seems the option is correctly took into account, but just not working...
* What was the outcome of this action?
I still get the get lock error on one of the script. Here is an example
* What outcome did you expect instead?
One of the script should just wait for the other to finish.
*** End of the template - remove these template lines ***