DevHeads.net

Review Request 112129: Make Plasma::PackageStructure look for metadata.desktop files in only subfolder of extracted plasmapkg archives

Review request for kde-workspace, Plasma, Aaron J. Seigo, Marco Martin, and Sebastian Kügler.

Description
This is the other half of the fix for the listed bug. I made Plasma::PackageStructure::metadata look in the only subdirectory of an extracted archive if there's only one subdirectory for the metadata.desktop file.

This addresses bug <a href="https://bugs.kde.org/show_bug.cgi?id=149479" title="https://bugs.kde.org/show_bug.cgi?id=149479">https://bugs.kde.org/show_bug.cgi?id=149479</a>.
<a href="http://bugs.kde.org/show_bug.cgi?id=https://bugs.kde.org/show_bug.cgi?id=149479" title="http://bugs.kde.org/show_bug.cgi?id=https://bugs.kde.org/show_bug.cgi?id=149479">http://bugs.kde.org/show_bug.cgi?id=https://bugs.kde.org/show_bug.cgi?id...</a>

Diffs
plasma/packagestructure.cpp 71148e1a18227d9ca847cbffe385aaaad9c66c6b

Diff: <a href="http://git.reviewboard.kde.org/r/112129/diff/" title="http://git.reviewboard.kde.org/r/112129/diff/">http://git.reviewboard.kde.org/r/112129/diff/</a>

Testing
The bug is fixed here with this and my other patch. Any better ideas for getting the only subdirectory are welcome, it feels a bit kludgy as is.

Thanks,

Jeremy Paul Whiting

Comments

Re: Review Request 112129: Make Plasma::PackageStructure look fo

By Jeremy Paul Whiting at 10/14/2013 - 14:40

(Updated Oct. 14, 2013, 1:40 p.m.)

Status
This change has been discarded.

Review request for kde-workspace, Plasma, Aaron J. Seigo, Marco Martin, and Sebastian Kügler.

Bugs: <a href="https://bugs.kde.org/show_bug.cgi?id=149479" title="https://bugs.kde.org/show_bug.cgi?id=149479">https://bugs.kde.org/show_bug.cgi?id=149479</a>
<a href="http://bugs.kde.org/show_bug.cgi?id=https://bugs.kde.org/show_bug.cgi?id=149479" title="http://bugs.kde.org/show_bug.cgi?id=https://bugs.kde.org/show_bug.cgi?id=149479">http://bugs.kde.org/show_bug.cgi?id=https://bugs.kde.org/show_bug.cgi?id...</a>

Repository: kdelibs

Description
This is the other half of the fix for the listed bug. I made Plasma::PackageStructure::metadata look in the only subdirectory of an extracted archive if there's only one subdirectory for the metadata.desktop file.

Diffs
plasma/packagestructure.cpp 71148e1a18227d9ca847cbffe385aaaad9c66c6b

Diff: <a href="http://git.reviewboard.kde.org/r/112129/diff/" title="http://git.reviewboard.kde.org/r/112129/diff/">http://git.reviewboard.kde.org/r/112129/diff/</a>

Testing
The bug is fixed here with this and my other patch. Any better ideas for getting the only subdirectory are welcome, it feels a bit kludgy as is.

Thanks,

Jeremy Whiting

Re: Review Request 112129: Make Plasma::PackageStructure look fo

By Marco Martin at 08/17/2013 - 03:26

Hmm, not sure about it, the packages were defined as archives with metadata.desktop in the root, this would basically allow a quirks mode, do we want to support malformed packages?

- Marco Martin

On Aug. 17, 2013, 3:06 a.m., Jeremy Paul Whiting wrote:

Re: Review Request 112129: Make Plasma::PackageStructure look fo

By Sebastian =?utf... at 08/20/2013 - 04:40

It's at least not possible with plasmapkg, as this tool checks for metadata.desktop, and only if it exists in the to-package-directory, will actually work.

I suppose it's a hand-packaged package, done wrong.

- Sebastian

On Aug. 17, 2013, 3:06 a.m., Jeremy Paul Whiting wrote:

Re: Review Request 112129: Make Plasma::PackageStructure look fo

By Jeremy Paul Whiting at 08/19/2013 - 12:06

Ok, I just tried repackaging Helium from kde-look.org with the contents directly in the .tar.xz rather than in a subfolder Helium. With my other plasmapkg patch that installs and uninstalls just fine. So the question then becomes are these themes on kde-look.org packaged with some tool? or just packaged by hand incorrectly? If it's a tool that's creating them, we ought to fix the tool, otherwise I guess I can go through the themes on kde-look.org and suggest they repackage them correctly.

- Jeremy Paul

On Aug. 16, 2013, 9:06 p.m., Jeremy Paul Whiting wrote: