marked_delete and "apt-mark remove"
Where does the StateCache::Delete() i.e. StateCache::Mode data get read
from?
I'm trying to debug a problem with the Python marked_delete property --
I expect it to be True after "apt-mark remove", but if I run:
$ apt-mark remove python-apt
And then the following Python code:
>>> import apt
>>> cache = apt.Cache()
>>> package = cache['python-apt']
>>> package.marked_delete
False
>>>
It's False. (Is this a known issue? or the wrong expectation?)
I traced marked_delete as far as StateCache::Delete() (in libapt-pkg,
depcache.h) but then I got lost ... Where does that data get loaded from?
(Assuming marked_delete ought to be True) I suppose the issue could lie
in either libapt-pkg or the Python bindings -- but I suspect libapt-pkg.
I confirmed that "apt-mark remove" does successfully update
/var/lib/dpkg/status and "dpkg --get-selections":
$ dpkg --get-selections | grep python-apt
python-apt deinstall
$
"aptitude search" also picks up the updated status:
$ aptitude search ^python-apt$
id python-apt - Python interface to libapt-pkg
$
Reply to: