By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release.
Bug 611 - [konqueror] xz support in konqueror
Summary: [konqueror] xz support in konqueror
Status: RESOLVED FIXED
Alias: None
Product: TDE
Classification: Unclassified
Component: tdebase (show other bugs)
Version: 3.5.13 [Trinity]
Hardware: All All
: P5 wishlist
Assignee: Calvin Morrison
URL:
Depends on:
Blocks:
 
Reported: 2011-11-13 12:12 CST by Laurent Dard
Modified: 2012-09-17 08:25 CDT (History)
4 users (show)

See Also:
Compiler Version:
TDE Version String:
Application Version:
Application Name:


Attachments
a patch (555 bytes, patch)
2012-09-11 21:07 CDT, Calvin Morrison
Details | Diff
Patch to add Extract popup menu item (585 bytes, patch)
2012-09-12 14:08 CDT, Darrell
Details | Diff
a final patch with both mimetypes included (535 bytes, patch)
2012-09-12 15:48 CDT, Calvin Morrison
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Laurent Dard 2011-11-13 12:12:13 CST
A simple wishlist item here:

We can open a tar.xz archive with ark-trinity.
But, in konqueror, there is no "Extract" option when right-clicking on this type of file.
And it's not possible to display the content in konqueror, like with tar.gz files.
(Incorporation option)

It would be useful to add those two possibilities.
Comment 1 Calvin Morrison 2012-09-11 17:51:08 CDT
I think I have a patch available but I am having trouble building tdeaddons. Hopefully I can resolve it today.

Calvin
Comment 2 Slávek Banko 2012-09-11 21:03:20 CDT
Please, can you expose your patch?
I can test it in my build environment...
Comment 3 Calvin Morrison 2012-09-11 21:07:18 CDT
Created attachment 811 [details]
a patch

my patch just adds the right mimetype. hope it works!b
Comment 4 Darrell 2012-09-11 23:06:36 CDT
I tested this patch in R14 GIT. With tar.xz or txz files I did not have an "Extract" or "Extract to" popup menu option. With tar.gz and tgz I do.

I remember when we added lzma and xz support long ago. Several patches were needed. Possibly then more than just tdeaddons needs patching to provide the Extract menu option.

The original lzma/xz commits:

f7a66a3f  [tdeutils]  Added missing mimetypes to ark_part desktop file for lzma and xz support
08f47b25  [tdeaddons] Enable xz and lzma compress menu support by default
29f1d0b4  [tdeaddons] Added xz and lzma support to the compress menu
2de1f0b1  [tdelibs]   Added new mimetypes to Makefile
faf41e2e  [tdelibs]   More xz/lzma fixes
a4043f1f  [tdeutils]  Preliminary xzip/LZMA support
ffcb34f4  [tdelibs]   Preliminary xzip/LZMA support
Comment 5 Calvin Morrison 2012-09-12 08:08:01 CDT
Darrell,

Thanks for the pointers. I was mostly hoping that the correct mimetype was not registering, but it seems to be more to it than that.

I'll keep hunting.
Comment 6 Darrell 2012-09-12 14:08:46 CDT
Created attachment 813 [details]
Patch to add Extract popup menu item

The attached patch works for me. Somebody else needs to test before pushing to GIT or backporting to 3.5.13.1.
Comment 7 Calvin Morrison 2012-09-12 15:38:39 CDT
Testing it out now, seems my patch was simply in the wrong correction. I am going to add both of those mimetypes (the tgz and the x-compressed... one) and test it.
Comment 8 Calvin Morrison 2012-09-12 15:48:25 CDT
Created attachment 814 [details]
a final patch with both mimetypes included

Here is a final patch! tested with 3.5.13.SRU works well!

please push it :)

Calvin
Comment 9 Darrell 2012-09-12 16:20:10 CDT
What is x-xz-compressed-tar and why needed?

Should brackets be used? Otherwise the second command is executed all the time rather than as part of the "if ( havexz )" condition.

diff -urN tdeaddons/konq-plugins/arkplugin/arkplugin.cpp tdeaddons.new/konq-plugins/arkplugin/arkplugin.cpp
--- tdeaddons/konq-plugins/arkplugin/arkplugin.cpp  2012-05-27 18:04:24.000000000 -0500
+++ tdeaddons.new/konq-plugins/arkplugin/arkplugin.cpp  2012-09-12 16:16:07.000000000 -0500
@@ -404,7 +404,10 @@
         if ( havelzma )
             m_extractMimeTypes << "application/x-lzma";
         if ( havexz )
-            m_extractMimeTypes << "application/x-xz";
+        {
+            m_extractMimeTypes << "application/x-txz";
+            m_archiveMimeTypes << "x-xz-compressed-tar";
+        }
     }

     if ( !KStandardDirs::findExe( "lha" ).isNull() )
Comment 10 Calvin Morrison 2012-09-12 16:30:23 CDT
Yes :) sorry I was typing from my cell phone, thankfully you caught it
Comment 11 Darrell 2012-09-12 16:36:54 CDT
Regarding x-xz-compressed-tar:

The new mimetype should be added everywhere else too, as well as x-lzma-compressed-tar. That is, the new mimetypes do not (yet) appear anywhere in tdelibs, tdebase, tdeutils, tdeaddons. If we add new mimetypes then add the support correctly.

Seems for this bug report we should use the second patch as-is and open a new bug report to add support for the new mimetypes.
Comment 12 Darrell 2012-09-12 17:11:09 CDT
Browsing /usr/share/mime on my system reveals the following mimetypes do not seem fully supported in Trinity:

x-7z-compressed
x-cpio-compressed
x-zip-compressed
x-compressed-tar
x-bzip-compressed-tar
x-xz-compressed-tar
x-lzma-compressed-tar
x-lzop-compressed-tar

There probably are additional "x-*-compressed*" mimetypes.

I don't know how the full mimetype scheme works in Trinity, but I suspect we need to update the following:

ark.desktop
ark_part.desktop
tdeutils
tdeaddons
tdelibs

Done correctly, icon associations would be needed too for each new mimetype.
Comment 13 Calvin Morrison 2012-09-12 17:13:02 CDT
(In reply to comment #12)
> Browsing /usr/share/mime on my system reveals the following mimetypes do not
> seem fully supported in Trinity:
> 
> x-7z-compressed
> x-cpio-compressed
> x-zip-compressed
> x-compressed-tar
> x-bzip-compressed-tar
> x-xz-compressed-tar
> x-lzma-compressed-tar
> x-lzop-compressed-tar
> 
> There probably are additional "x-*-compressed*" mimetypes.
> 
> I don't know how the full mimetype scheme works in Trinity, but I suspect we
> need to update the following:
> 
> ark.desktop
> ark_part.desktop
> tdeutils
> tdeaddons
> tdelibs
> 
> Done correctly, icon associations would be needed too for each new mimetype.

Okay a separate report would be good. You can assign it to me.
Comment 14 Darrell 2012-09-14 18:14:43 CDT
Bug report 1213 created to address the missing mometypes.

The patch in attachment 813 [details] was pushed to GIT in commit 6f0ebd61.

Calvin/Slavek: The patch needs to be backported to 3.5.13.1.
Comment 15 Slávek Banko 2012-09-17 08:25:29 CDT
Pushed also into v3.5.13-sru.