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

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



On Mon, 25 Jul 2016 13:56:58 -0700 Kyanos <someanon126@gmail.com> wrote:
Package: synaptic
Version: 0.83+b1
Severity: minor

Dear Maintainer,

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]

[1] This can be done by either right-clicking and selecting the
appropriate option, going to the Package menu and selecting the option,
or using a keyboard shortcut. Any of these will yield the same result.

Actual result:

The package is still marked for complete removal. There is still a
yellow cross on the package mark, and the summary that is shown after
clicking "Apply" lists the package under "To be completely removed
(including configuration files)".

Expected result:

The package should be marked for removal. There should be a red cross on
the package mark, and the summary that is shown after clicking "Apply"
should list the package under "To be removed"

I'm revisiting this old bug report of mine and I confirm that this still occurs in the latest version of Synaptic.

Upon further investigation, I believe this can actually be traced to APT itself, or more specifically libapt-pkg. Synaptic uses the pkgDepCache class from libapt-pkg to handle these states, and the pkgDepCache::MarkDelete method is called to mark a package for removal or complete removal.

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:

// Check that it is not already marked for delete
if ((P.Mode == ModeDelete || P.InstallVer == 0) && (Pkg.Purge() == true || rPurge == false))
   return true;

I've CC'ed the APT team on this e-mail to get their input. If there are good reasons for this decision then I am happy to have this bug closed as "won't fix." (I don't think there is a compelling reason for Synaptic to work around this design decision in APT.)

Kyanos


Reply to: