I installed the upgrades, and ran the script in the bug description and
see if it got fixed.

xenial python3-apt (1.1.0~beta1ubuntu0.16.04.4) verified - note that the one in 
-updates is fine too, it only broke for the previous upload in proposed.
bionic python3-apt (1.6.4) verified
cosmic python3-apt (1.7.1) verified


Full testing script for inside a lxd container:

while ! grep cloud-init /etc/apt/sources.list; do
        sleep 1
done
while ! ping -c1 google.com; do
        sleep 1
done
echo "deb http://archive.ubuntu.com/ubuntu $(lsb_release -cs)-proposed main" >> 
/etc/apt/sources.list
apt update
python3 - << EOF
#!/usr/bin/env python
import apt
import subprocess

cache = apt.Cache()
pkg = cache["hello"]
pkg.mark_install()
cache.commit()
subprocess.check_call(["apt", "remove", "--yes", "hello"])
EOF
apt install python3-apt
python3 - << EOF
#!/usr/bin/env python
import apt
import subprocess

cache = apt.Cache()
pkg = cache["hello"]
pkg.mark_install()
cache.commit()
subprocess.check_call(["apt", "remove", "--yes", "hello"])
EOF


Run like this:

( i=cosmic; lxc launch -e ubuntu:$i test-$i && lxc exec test-$i -- bash
-x - < ~/a.sh  ; lxc stop test-$i )


** Tags removed: verification-needed verification-needed-bionic 
verification-needed-cosmic verification-needed-xenial
** Tags added: verification-done verification-done-bionic 
verification-done-cosmic verification-done-xenial

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to python-apt in Ubuntu.
https://bugs.launchpad.net/bugs/1826870

Title:
  cache.commit() doesn't release the archives lock

Status in python-apt package in Ubuntu:
  Fix Released
Status in python-apt source package in Xenial:
  Fix Committed
Status in python-apt source package in Bionic:
  Fix Committed
Status in python-apt source package in Cosmic:
  Fix Committed
Status in python-apt package in Debian:
  Fix Released

Bug description:
  [Impact]
  cache.commit() does not release all the locks it acquires as part of 
committing. This is a regression of locking fixes in bug 1795407.

  [Test case]
  This script should work:

  #!/usr/bin/env python
  import apt
  import subprocess

  cache = apt.Cache()
  pkg = cache["hello"]
  pkg.mark_install()
  cache.commit()
  subprocess.check_call(["apt", "remove", "--yes", "hello"])

  [Regression potential]
  Other new locking bugs could pop up

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-apt/+bug/1826870/+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

Reply via email to