Bug 252612 - Plasma desktopthemes installed using GHNS cannot be removed
Summary: Plasma desktopthemes installed using GHNS cannot be removed
Status: RESOLVED FIXED
Alias: None
Product: plasma4
Classification: Plasma
Component: desktop (show other bugs)
Version: unspecified
Platform: PiSi Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-28 08:42 UTC by Gökçen Eraslan
Modified: 2011-12-03 16:46 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gökçen Eraslan 2010-09-28 08:42:54 UTC
Version:           unspecified (using KDE 4.5.1) 
OS:                Linux

I can install new desktopthemes successfully using GHNS. Here is the console output or systemsettings:

plasmapkg(1623)/kdecore (services) KMimeTypeFactory::parseMagic: Now parsing  "/usr/share/mime/magic"
plasmapkg(1623)/kdecore (services) KMimeTypeFactory::parseMagic: Now parsing  "/home/gokcen/.local/share/mime/magic"
Successfully installed /tmp/kde-gokcen///129936-Blue-Air-1.2.tar.gz


But when try to remove the desktoptheme (again using GHNS) that I just installed, it seems to be removed in GUI but it doesn't. Here is the output of uninstall operation:

plasmapkg(1632)/KZip KZip::openArchive: Invalid ZIP file. Unexpected end of file.  
plasmapkg(1632)/libplasma Plasma::PackageStructure::metadata: Could not open package file: "/tmp/kde-gokcen/129936-Blue-Air-1.2.tar.gz" 
Plugin /tmp/kde-gokcen///129936-Blue-Air-1.2.tar.gz is not installed.
systemsettings(1385)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:




Reproducible: Always

Steps to Reproduce:
1- Follow System Settings -> Workspace Appearance -> Desktop Theme 
2- Click Get New Themes...
3- Install new theme and check it's installation by closing the GHNS window.
4- Open GHNS window again and click Uninstall for the theme you've just installed.

Actual Results:  
You will always see the desktoptheme eve if you uninstall it.

Expected Results:  
Theme should be gone when you uninstall it.


By the way, I can't see the themes installed using: "plasmapkg -l -t theme" or "plasmapkg -l -g -t theme" commands. Is this normal?

I can reproduce this in KDE 4.4.5 as well.
Comment 1 Beat Wolf 2010-09-29 13:08:42 UTC
there is a problem in 4.5.1 with ghns, fixed in 4.5.2 that is not yet released. please test again as soon as it is released.
Comment 2 Gökçen Eraslan 2010-09-29 13:24:21 UTC
(In reply to comment #1)
> there is a problem in 4.5.1 with ghns, fixed in 4.5.2 that is not yet released.
> please test again as soon as it is released.

Can you say which commit fixes this? Or any related but reports including BUG:XXX?
Comment 3 Beat Wolf 2010-09-29 13:26:24 UTC

*** This bug has been marked as a duplicate of bug 249980 ***
Comment 4 Gökçen Eraslan 2010-09-29 13:39:20 UTC
This is not the same bug! Can you please read the issue carefully? I say I _can_ install new desktop themes, but cannot remove them. And my output is not related to the bug you mentioned.

I've applied this commit[1]. This is not a duplicate bug. By the way, I'm the one who mentioned about #249980 in core-devel list, if you look here[2]

[1] http://websvn.kde.org/?view=revision&revision=1171340
[2] http://lists.kde.org/?l=kde-core-devel&m=128351498507245&w=2
Comment 5 Beat Wolf 2010-09-29 14:07:25 UTC
>This is not the same bug! Can you please read the issue carefully? I say I
>_can_ install new desktop themes, but cannot remove them. And my output is not
>related to the bug you mentioned.
i read it, and for me it is related because both seem to have a problem with zip files in nearly the same context, so they seem related.

Anyway, please report back anyway when you tested with 4.5.2
Comment 6 Anne-Marie Mahfouf 2010-09-29 14:48:44 UTC
Confirmed on 4.5 branch, desktop themes are not uninstalled.
Comment 7 Aaron J. Seigo 2010-10-01 23:32:55 UTC
SVN commit 1181725 by aseigo:

support tarballs as well, since Plasma::Package does
BUG:252612


 M  +20 -5     packagestructure.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1181725
Comment 8 Aaron J. Seigo 2010-10-01 23:36:49 UTC
the problem wasn't that KZip was broken, it's that people are distributing themes as tarballs rather than zip files. looking at the output made this evident:

plasmapkg(1632)/KZip KZip::openArchive: Invalid ZIP file. Unexpected end of
file.  

and then look at the name of the file:

plasmapkg(1632)/libplasma Plasma::PackageStructure::metadata: Could not open
package file: "/tmp/kde-gokcen/129936-Blue-Air-1.2.tar.gz" 

so the problem is (was) in Plasma::PackageStructure::metadata, and it was that it was feeding a tarball to KZip.

Plasma::Package auto-detects and handles zip or tarball archives, and now so does PackageStructure.

this makes sense from a symmetry POV, though i might have expected people making themes to try testing things out they give to others. ah, right, who does that? ;P
Comment 9 Gökçen Eraslan 2010-10-02 09:40:37 UTC
What about application/x-gzip mimetype? When I look a tar.gz file with "file a.tar.gz -i" command I get, application/x-gzip. Plasma::Package class also does not handle application/x-gzip mimetype but, I just want to say that.

By the way can you backport this to 4.5 branch?
Comment 10 Gökçen Eraslan 2010-10-02 10:10:43 UTC
Hmm I think this bug is not fixed yet. I still cannot remove desktopthemes with tar.gz tarballs. I've installed Ember desktoptheme succesfully but still cannot remove it. Here is the output:

plasmapkg(5316)/kdecore (KSycoca): Trying to open ksycoca from  "/var/tmp/kdecache-gokcen/ksycoca4"
plasmapkg(5316)/kdecore (services): Now parsing  "/usr/share/mime/magic"
plasmapkg(5316)/kdecore (services): Now parsing  "/usr/kde/4/share/mime/magic"
plasmapkg(5316)/kdecore (services): Now parsing  "/home/gokcen/.local/share/mime/magic"
plasmapkg(5316)/KTar KTar::createDevice: mimetype= "application/x-gzip"
plasmapkg(5316)/KTar KTar::createDevice: creating tempfile: "/tmp/kde4-gokcen/ktar-Wy5316.tar"
plasmapkg(5316)/KTar KTar::KTarPrivate::fillTempFile: filling tmpFile of mimetype "application/x-gzip"
plasmapkg(5316)/kdecore (kdelibs): KTempDir: Temporary directory created : "/tmp/kde-gokcen/plasmapkgqWmE0U/"
plasmapkg(5316)/libplasma Plasma::PackageStructurePrivate::createPackageMetadata: No metadata file in the package, expected it at: "" 
plasmapkg(5316)/kdecore (kdelibs): "/tmp/kde-gokcen/plasmapkgqWmE0U/"
Comment 11 Todd 2011-01-18 22:31:55 UTC
This is still a problem in 4.6 RC 1.

I think this is a duplicate of Bug 224745
Comment 12 Todd 2011-07-31 07:51:34 UTC
This seems to be fixed, and if not it is a duplicate.
Comment 13 Aaron J. Seigo 2011-12-03 16:46:24 UTC
Git commit 6ed9229f4b2df1d98821bef5ab7a361b5dea9ffa by Aaron Seigo.
Committed on 03/12/2011 at 17:45.
Pushed by aseigo into branch 'KDE/4.7'.

catch another possible mimetype identification

BUG:252612

M  +1    -1    plasma/packagestructure.cpp

http://commits.kde.org/kdelibs/6ed9229f4b2df1d98821bef5ab7a361b5dea9ffa