[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: synaptic: Cannot change mark from "complete removal" to "removal"



On Wed, Apr 17, 2024 at 12:14:14PM -0700, Philip Chung wrote:
> > If I mark a package for complete removal, I cannot change the mark
> > directly to simple removal.
> > 
> > Steps to reproduce:
> > 
> > 1. Select a package.
> > 
> > 2. Mark the package for complete removal.[1]
> > 
> > 3. Mark the package for removal.[1]
[…]
> In the implementation of that method (source file apt-pkg/depcache.cc),
> there is a particular check that suggests a deliberate design decision to
> disallow moving from purging (complete removal) to simple removal but allow
> moving in the other direction:

I think the idea is that code that explicitly decided to mark a package
for complete removal should not be overridden later on by code that just
happens to want a package removed due to a Conflicts relation or some
such.

That could be resolved by looking at FromUser but the check you quoted
is from 1999, while the FromUser parameter (that I added I might add)
is "only" from 2009. After a quarter century of this behaviour, I am
not sure it is worthwhile to "fix" this given, if I really tried, I
could probably argue in favour of either way.

I could frame that "decision" from 2009 a compat one given that FromUser
was a new parameter and defaults to true, so that would have been a
behaviour change if I had changed that… but I doubt I was thinking about
that back then. So, absolutely not a fundamental design decision; just
something that happened due to dumb luck/cosmic intervention/reasons.


> I've CC'ed the APT team on this e-mail to get their input. If there are good

(That CC'ed worked & the Fwd reached us a bit later, too. Some hop in
 between you, mailing list and you has probably greylisted the mail for
 a while making it look like it didn't reach us I suppose. No worries
 anyhow.)


> fix." (I don't think there is a compelling reason for Synaptic to work
> around this design decision in APT.)

I think for an interactive graphical tool like Synaptic this behaviour
of libapt might be unfortunate, but easy to work around: If you see in
Step 3 that a package is marked for complete removal already, just
MarkKeep it first before MarkDelete it again.


Best regards

David Kalnischkies

Attachment: signature.asc
Description: PGP signature


Reply to: