D28701: Add KPackage support to KNewStuffCore

Dan Leinir Turthra Jensen noreply at phabricator.kde.org
Thu Apr 16 08:51:31 BST 2020


leinir added a comment.


  In D28701#649012 <https://phabricator.kde.org/D28701#649012>, @ngraham wrote:
  
  > This has fixed the issues I was seeing with installation and uninstallation, nice! However I'm not seeing a very long hang when installing certain global themes--for example Sweet KDE and Layan Look and Feel Theme. It does ultimately work, but the dialog freezes for multiple minutes before finally becoming interactive again.
  
  
  That freeze really is amazingly annoying, and i'm afraid the only reasonable way to fix that is to move the installer into its own thread... which /should/ work ok, but i'm super scared of threads at the best of times ;) Needs must, though.

INLINE COMMENTS

> ngraham wrote in installation.cpp:105
> Oof.
> 
> Is there really no way around this? I mean, it did more or less work before the new QtQuick dialog was rolled out.

Going by the code (in kpackagetool and here), i don't see how it could've really ever worked the way it looked before - i feel like what happened previously was that it /looked/ like it sort of worked, because installation did, but uninstallation never worked...

The extreme case described in this comment is just that, though - it turns out that unless you clean your tmp dir regularly, you're likely to actually have those downloaded files available, which will cause the items to remain marked as installed, which in turn allows the fallback path in the uninstall step below here to kick in, which will both remove the downloaded file, and also (if the file is identified as a kpackage and we can do a reverse lookup match on an installed kpackage with that type and name) remove that package with kpackage. So... there's a lot of bits in here to try and ensure people won't notice that everything really was very badly broken with kpackages previously, and that it now just sort of works :)

Further, a detail i noticed earlier, is that the uninstall call would just outright mark the entry you asked to uninstall as deleted, whether or not that was actually successful (which incidentally may happen and is there to allow some manual cleaning up if they've just deleted stuff underneath kns). I've moved that around just a touch, so that it doesn't happen if a kpackage failed to be uninstalled.

REPOSITORY
  R304 KNewStuff

REVISION DETAIL
  https://phabricator.kde.org/D28701

To: leinir, #plasma, #knewstuff, #frameworks, ngraham, mart, davidedmundson
Cc: ngraham, kde-frameworks-devel, LeGast00n, cblack, michaelh, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200416/7ccb49ee/attachment.html>


More information about the Kde-frameworks-devel mailing list