Please ignore Chris (well, do upgrade though, 20.10 is oooold, it hasn't seen security updates in months)
I understand your report, I only implemented lock waiting for the dpkg lock, not for the list lock that update holds. Note that apt-get generally doesn't wait for the lock, only apt does (you can pass/set options to make apt-get behave the same). I'm not sure update lock waiting is necessary - there's little point in running update again if you are already updating. It makes sense for install, because you might just want to schedule two installs. OTOH, I can see you writing a script that does update and install, and which breaks because apt-daily.service is running in the background. ** Changed in: apt (Ubuntu) Status: Invalid => Triaged ** Changed in: apt (Ubuntu) Importance: Undecided => Wishlist -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to apt in Ubuntu. https://bugs.launchpad.net/bugs/1939665 Title: "apt-get update" fails if another instance is running Status in apt package in Ubuntu: Triaged Bug description: This snippet: sudo apt-get update & sudo apt-get update & wait; wait will result in one apt-get run succeeding and the other failing on the lock: [1] 3006473 [2] 3006474 Hit:1 http://ports.ubuntu.com/ubuntu-ports groovy InRelease Hit:2 http://ports.ubuntu.com/ubuntu-ports groovy-backports InRelease Hit:3 http://ports.ubuntu.com/ubuntu-ports groovy-security InRelease Hit:4 http://ports.ubuntu.com/ubuntu-ports groovy-updates InRelease Reading package lists... Done E: Could not get lock /var/lib/apt/lists/lock. It is held by process 3006476 (apt-get) N: Be aware that removing the lock file is not a solution and may break your system. E: Unable to lock directory /var/lib/apt/lists/ Reading package lists... Done [1]- Done sudo apt-get update [2]+ Exit 100 sudo apt-get update Note that apt-get upgrade will correctly wait. ProblemType: Bug DistroRelease: Ubuntu 20.10 Package: apt 2.1.10ubuntu0.3 ProcVersionSignature: Ubuntu 5.8.0-48.54-generic 5.8.18 Uname: Linux 5.8.0-48-generic aarch64 ApportVersion: 2.20.11-0ubuntu50.7 Architecture: arm64 CasperMD5CheckResult: skip Date: Thu Aug 12 07:50:16 2021 ProcEnviron: LC_TIME=C.UTF-8 TERM=xterm-256color PATH=(custom, no user) LANG=C.UTF-8 SHELL=/bin/bash SourcePackage: apt UpgradeStatus: Upgraded to groovy on 2021-03-25 (139 days ago) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1939665/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp