libapt-pkg and InstallProtect() deprecation

Jonathan Thomas echidnaman at gmail.com
Tue Dec 17 05:00:49 UTC 2013


Here's what this function's documentation in algorithms.cc has to say:

// ProblemResolver::InstallProtect - deprecated cpu-eating
no-op	/*{{{*///
---------------------------------------------------------------------/*
Actions issued with FromUser bit set are protected from further
   modification (expect by other calls with FromUser set) nowadays , so we
   don't need to reissue actions here, they are already set in stone. */




Looks like it can safely be removed. I was only ever calling it because
Synaptic did anyway :P

On Mon, Dec 16, 2013 at 11:40 PM, Michael Stemle <themanchicken at gmail.com>wrote:

> Hey all, in cleaning up libqapt for the KDE review board I'm wanting to
> kill these InstallProtect() deprecation warnings I'm seeing. Here's what I
> mean:
>
> [ 14%] Building CXX object src/CMakeFiles/qapt.dir/backend.o
> /home/manchicken/Documents/Devel/kubuntu/libqapt/src/backend.cpp: In
> member function ‘bool QApt::Backend::loadSelections(const QString&)’:
> /home/manchicken/Documents/Devel/kubuntu/libqapt/src/backend.cpp:1295:24:
> warning: ‘void pkgProblemResolver::InstallProtect()’ is deprecated
> (declared at /usr/include/apt-pkg/algorithms.h:137)
> [-Wdeprecated-declarations]
>      Fix.InstallProtect();
>                         ^
> [ 15%] Building CXX object src/CMakeFiles/qapt.dir/cache.o
> [ 17%] Building CXX object src/CMakeFiles/qapt.dir/package.o
>
> /home/manchicken/Documents/Devel/kubuntu/libqapt/src/package.cpp: In
> member function ‘QUrl QApt::Package::screenshotUrl(QApt::ScreenshotType)
> const’:
> /home/manchicken/Documents/Devel/kubuntu/libqapt/src/package.cpp:578:12:
> warning: enumeration value ‘UnknownType’ not handled in switch [-Wswitch]
>      switch (type) {
>             ^
> /home/manchicken/Documents/Devel/kubuntu/libqapt/src/package.cpp: In
> member function ‘void QApt::Package::setRemove()’:
> /home/manchicken/Documents/Devel/kubuntu/libqapt/src/package.cpp:1250:24:
> warning: ‘void pkgProblemResolver::InstallProtect()’ is deprecated
> (declared at /usr/include/apt-pkg/algorithms.h:137)
> [-Wdeprecated-declarations]
>      Fix.InstallProtect();
>                         ^
> /home/manchicken/Documents/Devel/kubuntu/libqapt/src/package.cpp: In
> member function ‘void QApt::Package::setPurge()’:
> /home/manchicken/Documents/Devel/kubuntu/libqapt/src/package.cpp:1270:24:
> warning: ‘void pkgProblemResolver::InstallProtect()’ is deprecated
> (declared at /usr/include/apt-pkg/algorithms.h:137)
> [-Wdeprecated-declarations]
>      Fix.InstallProtect();
>                         ^
>
> I have found exactly zero documents describing this part of apt-pkg, and
> I'm hoping someone else might have some context or advice surrounding this
> method, its prior usefulness, and maybe even some ideas on how to migrate
> away from it. If they're going to remove this method at some point, I'd
> like us to be off of it if possible so that we don't end up with an
> emergency.
>
> Much thanks.
>
> --
> ~ Michael D. Stemle, Jr.
>
> --
> kubuntu-devel mailing list
> kubuntu-devel at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/kubuntu-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/kubuntu-devel/attachments/20131217/c868b322/attachment.html>


More information about the kubuntu-devel mailing list