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

package marked protected for the resolver is protected in depCache



Hi,

I have a problem with pkgProblemResolver::Protect marking the package
as Protected in the debCache.
I see it was introduced in commit [1] to solve bug [2].
Now it is causing a bug [3] in Muon package manager.

Muon (libqapt, actually) calls pkgProblemResolver::Protect() on the
package the user is acting on before calling Resolve(). Thereafter the
user is still able to make changes, like unmarking the package or
"undo" changes. But the Protected flag is not removed from the cache.
This excludes the package from being used to solve other dependencies,
although it is not hold (see [3] for an example).

Is marking Protected in the cache still needed?
Would you consider providing e.g.

bool pkgProblemResolver::Protect(pkgCache::PkgIterator Pkg, bool do = true);

returning the previous value of the flag and allowing to restore it?

I'm new to APT internals, so please correct me if I'm getting something wrong.
Thank you in advance for your help.

Regards,
Carlo

[1] https://github.com/Debian/apt/commit/cc26da01ef43686d67959ef080e5492410d20e4e
[2] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=618848
[3] https://bugs.kde.org/show_bug.cgi?id=331730#c12


Reply to: