Fix works fine:
root@bionic:~# python3 -c "import apt; c=apt.Cache(); p=c['aptitude'];
c.open(); p.mark_install()"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3/dist-packages/apt/package.py", line 1469, in
mark_install
self._pcache._depcache.mark_install(self._pkg, auto_inst, from_user)
ValueError: Object of different cache passed as argument to apt_pkg.DepCache
method
root@bionic:~# dpkg -i python3-apt_1.6.1_amd64.deb
(Reading database ... 29845 files and directories currently installed.)
Preparing to unpack python3-apt_1.6.1_amd64.deb ...
Unpacking python3-apt (1.6.1) over (1.6.0) ...
Setting up python3-apt (1.6.1) ...
root@bionic:~# python3 -c "import apt; c=apt.Cache(); p=c['aptitude'];
c.open(); p.mark_install()"
another check:
root@bionic:~# python3 -c "import apt; c=apt.Cache(); p=c['aptitude'];
c.open(); p.mark_delete(); print(c.get_changes()); c.commit()"
[<Package: name:'aptitude' architecture='amd64' id:257>]
(Reading database ... 29852 files and directories currently installed.)
Removing aptitude (0.8.10-6ubuntu1) ...
** Tags removed: verification-needed verification-needed-bionic
** Tags added: verification-done verification-done-bionic
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1773316
Title:
Object of different cache passed as argument to apt_pkg.DepCache
method
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-apt/+bug/1773316/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs