Re: marked_delete and "apt-mark remove"
On Thu, Sep 21, 2017 at 12:15:55PM -0700, Jack Bates wrote:
> On 21/09/17 05:03 AM, Julian Andres Klode wrote:
> > On Mi., 20. Sep. 2017, 23:03 Jack Bates <2g567n@nottheoilrig.com
> > <mailto:2g567n@nottheoilrig.com>> wrote:
> >
> > 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:
> >
> > Selections are ignored by apt, except for dselect-upgrade. Markings in
> > the depcache are a runtime only state.
>
> Ahh -- thank you for clarifying.
>
> What's the *right* way to get the persistent value? The first thing that
> comes to mind is grepping /var/lib/dpkg/status directly:
I think you should check that pkg.selected_state for an apt_pkg.Package
is apt_pkg.SELSTATE_DEINSTALL. It's not exposed in the higher level
bindings, though you could get the apt_pkg.Package using the private _pkg
attribute of an apt.Package (but might change in the future, of course).
--
Debian Developer - deb.li/jak | jak-linux.org - free software dev
| Ubuntu Core Developer |
When replying, only quote what is necessary, and write each reply
directly below the part(s) it pertains to ('inline'). Thank you.
Reply to: