Bug 315764 - Archive-handling: Impossible to open SRPM's by (double)click or <Enter>
Summary: Archive-handling: Impossible to open SRPM's by (double)click or <Enter>
Status: RESOLVED FIXED
Alias: None
Product: krusader
Classification: Applications
Component: krarc (show other bugs)
Version: 2.4.0-beta3 "Single Step"
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Krusader Bugs Distribution List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-25 19:43 UTC by MaxiPunkt
Modified: 2018-05-06 00:15 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Patch to clean-up with deprecated MimeTypes, add's some new one's (2.23 KB, patch)
2013-03-03 15:54 UTC, MaxiPunkt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description MaxiPunkt 2013-02-25 19:43:45 UTC
I recently switched from Fedora FC16 => FC18

Archive-handling with RPM's is as usual: (double)click, <Enter>, or <Right Arrow>.

But for some reason it is impossible to open SRPM's by (double)click or <Enter>, while with <Right Arrow> it is still possible to open a SRPM.

I guess it could have something to do with a very similar sounding bug related to Ark: bug #311349

There were changes in mime-type database:
* normal RPM's are defimed by: application/x-rpm
* while SRPM's now are defined by: application/x-source-rpm

So it could be that Krusader simply doesn't know the new MimeType for SRPM's.


How to fix this?

Reproducible: Always

Steps to Reproduce:
1. Try to open an SRPM by (double)click
2. Try to open an SRPM by hitting <Enter>
Actual Results:  
Opening SRPM's is not possible.

Expected Results:  
(double)click or <Enter> on SRPM's should open SRPM's
Comment 1 Jan Lepper 2013-02-27 13:10:28 UTC
could you please upload or give a link to a srpm file ?
Comment 2 MaxiPunkt 2013-02-28 21:43:27 UTC
This is an easy task!  :o)

There are soooo many RPM-based distros out there - just pick one of them, choose your favorite mirror and download something, like this:
ftp://ftp-stud.fht-esslingen.de/Mirrors/fedora/linux/releases/18/Fedora/source/SRPMS/k/krusader-2.4.0-0.8.beta3.fc18.src.rpm
Comment 3 MaxiPunkt 2013-02-28 21:53:34 UTC
Maybe this could be of interest to you, too:

# repoquery -i shared-mime-info

Name        : shared-mime-info
Version     : 1.1
Release     : 1.fc18
Architecture: x86_64
Size        : 4111951
Packager    : Fedora Project
Group       : System Environment/Base
URL         : http://freedesktop.org/Software/shared-mime-info
Repository  : updates
Summary     : Shared MIME information database
Source      : shared-mime-info-1.1-1.fc18.src.rpm
Description :
This is the freedesktop.org shared MIME info database.

Many programs and desktops use the MIME system to represent the types of
files. Frequently, it is necessary to work out the correct MIME type for
a file. This is generally done by examining the file's name or contents,
and looking up the correct MIME type in a database.
Comment 4 Jan Lepper 2013-03-01 11:12:33 UTC
As an immediate fix you can link x-source-rpm with krarc in
Konfigurator->Protocols.

I'm also going to make this the default.
Comment 5 Jan Lepper 2013-03-01 11:43:12 UTC
Git commit 2e506ac46ed57a0ce691eddf6aa144315129c240 by Jan Lepper.
Committed on 01/03/2013 at 12:34.
Pushed by janlepper into branch 'master'.

FIXED: [ 315764 ] "application/x-source-rpm" isn't linked to krarc protocol by default

M  +1    -0    ChangeLog
M  +1    -0    krusader/Konfigurator/kgprotocols.cpp

http://commits.kde.org/krusader/2e506ac46ed57a0ce691eddf6aa144315129c240
Comment 6 MaxiPunkt 2013-03-01 17:05:37 UTC
Hi!

I've downloaded latest git-source (hash: 2e506ac4)  and compiled krusader by myself.
Now it does work - but only after deleting ~/.kde/share/config/krusaderrc

So thanks for your quick reaction!   :o)



Btw. - if you open Fedora's SRPM of krusader (see link above), there is already a patch included for MimeType-handling:

You have missed to tell krusader to open single *.bz2-files (mime-type: application/x-bzip), while with files *.tar.bz2 it does work (mime-type: application/x-bzip-compressed-tar) already.

Fedora's 2nd mime-enhancement for *.lzma and *.tar.lzma could be less important, as I expect lzma-files should have been superseded by xz-comresseion - what do you think?
Comment 7 Jan Lepper 2013-03-01 21:48:41 UTC
On Fri, 01 Mar 2013 17:05:37 +0000
MaxiPunkt <maxantispam@freenet.de> wrote:

> https://bugs.kde.org/show_bug.cgi?id=315764
> 
> --- Comment #6 from MaxiPunkt <maxantispam@freenet.de> ---
> Hi!
> 
> I've downloaded latest git-source (hash: 2e506ac4)  and compiled
> krusader by myself.
> Now it does work - but only after deleting
> ~/.kde/share/config/krusaderrc
> 
> So thanks for your quick reaction!   :o)
> 

Well, I changed the default, which only has an effect effect when no
configuration file exists yet.
Deleting the config wasn't necessary though - see comment 4.

> 
> Btw. - if you open Fedora's SRPM of krusader (see link above), there
> is already a patch included for MimeType-handling:
> 
> You have missed to tell krusader to open single *.bz2-files
> (mime-type: application/x-bzip), while with files *.tar.bz2 it does
> work (mime-type: application/x-bzip-compressed-tar) already.
> 
> Fedora's 2nd mime-enhancement for *.lzma and *.tar.lzma could be less
> important, as I expect lzma-files should have been superseded by
> xz-comresseion
> - what do you think?
> 

I will look at that.
Comment 8 Jan Lepper 2013-03-02 11:13:46 UTC
On Fri, 01 Mar 2013 17:05:37 +0000
MaxiPunkt <maxantispam@freenet.de> wrote:

> https://bugs.kde.org/show_bug.cgi?id=315764
> 
> --- Comment #6 from MaxiPunkt <maxantispam@freenet.de> ---
> Hi!
> 
> I've downloaded latest git-source (hash: 2e506ac4)  and compiled
> krusader by myself.
> Now it does work - but only after deleting
> ~/.kde/share/config/krusaderrc
> 
> So thanks for your quick reaction!   :o)
> 
> 
> 
> Btw. - if you open Fedora's SRPM of krusader (see link above), there
> is already a patch included for MimeType-handling:
> 
> You have missed to tell krusader to open single *.bz2-files
> (mime-type: application/x-bzip), while with files *.tar.bz2 it does
> work (mime-type: application/x-bzip-compressed-tar) already.
> 
> Fedora's 2nd mime-enhancement for *.lzma and *.tar.lzma could be less
> important, as I expect lzma-files should have been superseded by
> xz-comresseion
> - what do you think?
> 

When trying to open single bz2 or lzma archives, krarc crashes, so I
don't think this makes sense as a default ;-)
tar:/ as it seems, doesn't want to open *.tar.lzma.
Comment 9 MaxiPunkt 2013-03-03 15:51:59 UTC
Hi there!

Now that I know where to look at, I today played a little with krusader-code.

There seems to be a real MimeType-mess with deprecaded defines! I tried to add new ones by keeping all old ones (for comatibility), but then the code refused to compile!
So I've erased all the old stuff in the end...

The good news:
*.tar.lzma does work for me!

The bad news:
krarc in general seems to have issues opening single-file archives:
*.bz2 FAIL!
*.gz  OK
*.lzma FAIL!
*.xz FAIL!

Then I compared krusader's behaviour with my old Fedora-FC16 installation:
*.bz2 OK
*.gz  OK
*.lzma FAIL!
*.xz OK


Would you please be willing to look at this?
Comment 10 MaxiPunkt 2013-03-03 15:54:32 UTC
Created attachment 77712 [details]
Patch to clean-up with deprecated MimeTypes, add's some new one's

Replacements for old MimeTypes:
+ application/x-bzip
+ application/gzip
+ application/x-java-archive


Deprecated MimeTypes:
- application/x-iso
- application/x-dvd-image

- application/x-7z
- application/x-ace-compressed
- application/x-arj-compressed
- application/x-debian-package
- application/x-bzip2
- application/x-gzip
- application/x-jar
- application/x-gzip
- application/x-jar
- application/x-lha-compressed
- application/x-rar-compressed
- application/x-zip
- application/x-zip-compressed

- application/x-tbz
- application/x-tgz


New MimeTypes:
+ application/x-lzma
+ application/x-lzma-compressed-tar
Comment 11 Jan Lepper 2013-03-04 09:52:04 UTC
On Sun, 03 Mar 2013 15:51:59 +0000
MaxiPunkt <maxantispam@freenet.de> wrote:

> https://bugs.kde.org/show_bug.cgi?id=315764
> 
> --- Comment #9 from MaxiPunkt <maxantispam@freenet.de> ---
> Hi there!
> 
> Now that I know where to look at, I today played a little with
> krusader-code.
> 
> There seems to be a real MimeType-mess with deprecaded defines! I
> tried to add new ones by keeping all old ones (for comatibility), but
> then the code refused to compile!
> So I've erased all the old stuff in the end...
> 
> The good news:
> *.tar.lzma does work for me!
> 
> The bad news:
> krarc in general seems to have issues opening single-file archives:
> *.bz2 FAIL!
> *.gz  OK
> *.lzma FAIL!
> *.xz FAIL!
> 
> Then I compared krusader's behaviour with my old Fedora-FC16
> installation: *.bz2 OK
> *.gz  OK
> *.lzma FAIL!
> *.xz OK
> 
> 
> Would you please be willing to look at this?
> 

I'd prefer not to touch krarc if not absolutely necessary. Single file
archives aren't that common, so that's a relatively minor problem.
Comment 12 Jan Lepper 2013-03-04 09:54:28 UTC
On Sun, 03 Mar 2013 15:54:32 +0000
MaxiPunkt <maxantispam@freenet.de> wrote:

> https://bugs.kde.org/show_bug.cgi?id=315764
> 
> --- Comment #10 from MaxiPunkt <maxantispam@freenet.de> ---
> Created attachment 77712 [details]
>   --> https://bugs.kde.org/attachment.cgi?id=77712&action=edit
> Patch to clean-up with deprecated MimeTypes, add's some new one's
> 
> Replacements for old MimeTypes:
> + application/x-bzip
> + application/gzip
> + application/x-java-archive
> 
> 
> Deprecated MimeTypes:
> - application/x-iso
> - application/x-dvd-image
> 
> - application/x-7z
> - application/x-ace-compressed
> - application/x-arj-compressed
> - application/x-debian-package
> - application/x-bzip2
> - application/x-gzip
> - application/x-jar
> - application/x-gzip
> - application/x-jar
> - application/x-lha-compressed
> - application/x-rar-compressed
> - application/x-zip
> - application/x-zip-compressed
> 
> - application/x-tbz
> - application/x-tgz
> 
> 
> New MimeTypes:
> + application/x-lzma
> + application/x-lzma-compressed-tar
> 

For the upcoming release I prefer to leave things as they are.
I suggest you file this at reviewboard.kde.org, so it wont't be
forgotten.
Comment 13 MaxiPunkt 2013-03-04 19:16:34 UTC
> I'd prefer not to touch krarc if not absolutely necessary. Single file archives aren't that common, > so that's a relatively minor problem.
So - do you confirm present behaviour, krarc being unable to open single-file archives (beside *.gz-archives)?

As it seems the compressed tar-archives will be opened by tar:/-kio-slave (which perfectly works), I would assume that krusader's "krarc" is just broken by now - but however you're not going to fix it, right?  :(

> For the upcoming release I prefer to leave things as they are.
For my understanding the better idea would be to keep outdated MimeTypes as well (for compatibility-reasons on old systems). So I would understand if you reject my patch for that reason - if at the same time it would be possible to add as much new MimeTypes as you like.

But it seems that krusader-code has issues with the amount of MimeTypes defined inside file "kgprotocols.cpp".
Did you give it a try to add some more, already? For me the build breaks, then - although there should have been no mistakes the defines.
Comment 14 Jan Lepper 2013-03-04 21:12:52 UTC
On Mon, 04 Mar 2013 19:16:34 +0000
MaxiPunkt <maxantispam@freenet.de> wrote:

> https://bugs.kde.org/show_bug.cgi?id=315764
> 
> --- Comment #13 from MaxiPunkt <maxantispam@freenet.de> ---
> > I'd prefer not to touch krarc if not absolutely necessary. Single
> > file archives aren't that common, > so that's a relatively minor
> > problem.
> So - do you confirm present behaviour, krarc being unable to open
> single-file archives (beside *.gz-archives)?
> 

I tried .bz2 and .lzma - both lead to a crash.

> As it seems the compressed tar-archives will be opened by
> tar:/-kio-slave (which perfectly works), I would assume that
> krusader's "krarc" is just broken by now - but however you're not
> going to fix it, right?  :(
> 

Well, bluntly said, krarc is an unmaintainable mess that should be
rewritten from scratch. If time permits I will do it. Or, of cause,
someone else steps forward.

> > For the upcoming release I prefer to leave things as they are.
> For my understanding the better idea would be to keep outdated
> MimeTypes as well (for compatibility-reasons on old systems). So I
> would understand if you reject my patch for that reason - if at the
> same time it would be possible to add as much new MimeTypes as you
> like.
> 
> But it seems that krusader-code has issues with the amount of
> MimeTypes defined inside file "kgprotocols.cpp".
> Did you give it a try to add some more, already? For me the build
> breaks, then
> - although there should have been no mistakes the defines.
> 

I'll give it a try.
Comment 15 Jan Lepper 2013-03-04 21:19:28 UTC
On Mon, 4 Mar 2013 22:12:18 +0100
jan <jan_lepper@gmx.de> wrote:

> I'll give it a try.

No problem here.