libapt-pkg and InstallProtect() deprecation

Michael Stemle themanchicken at gmail.com
Tue Dec 17 04:40:25 UTC 2013


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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/kubuntu-devel/attachments/20131216/9764880c/attachment.html>


More information about the kubuntu-devel mailing list