<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>178560</bug_id>
          
          <creation_ts>2008-12-23 13:08:52 +0000</creation_ts>
          <short_desc>Some associations can&apos;t be removed</short_desc>
          <delta_ts>2008-12-23 21:06:03 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>10</classification_id>
          <classification>Unmaintained</classification>
          <product>kio</product>
          <component>general</component>
          <version>SVN</version>
          <rep_platform>Compiled Sources</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Nicolas L.">kde</reporter>
          <assigned_to name="David Faure">faure</assigned_to>
          <cc>faure</cc>
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>685754</commentid>
    <comment_count>0</comment_count>
    <who name="Nicolas L.">kde</who>
    <bug_when>2008-12-23 13:08:52 +0000</bug_when>
    <thetext>Version:            (using Devel)
Installed from:    Compiled sources

test is done in kde 4.1.85


I done a test and tried to remove ark in the interface/x-winamp-skin mimetype.
I removed it but when i clicked on Apply, ark came back and ~/.local/share/applications/mimeapps.list i have :

[Removed Associations]
interface/x-winamp-skin=kde4-ark.desktop;


If i remove the association and in a different session do a kbuildsycoca4, ark come back.
interface/x-winamp-skin is not in ark.desktop files in Mimetypes=</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>685972</commentid>
    <comment_count>1</comment_count>
    <who name="David Faure">faure</who>
    <bug_when>2008-12-23 20:05:52 +0000</bug_when>
    <thetext>And I suppose
ktraderclient --mimetype interface/x-winamp-skin | grep DesktopEntryPath
shows ark.desktop, right?

Initially you had simply added ark to this mimetype in the filetypes editor? So somehow ksycoca4 remembers this wrongly. Does &quot;kbuildsycoca4 --noincremental&quot; help?

Please also experiment with changing mimeapps.list by hand, not using the filetypes editor at all, and running kbuildsycoca4 after making changes, and running ktraderclient to see what was recorded.

Here&apos;s also a patch to get more debug output from kbuildsycoca4 (in both modes, incremental and noincremental, if noincremental makes a difference).
http://www.davidfaure.fr/tmp/kded_more_debug.diff
To be used like &quot;kbuildsycoca4 2&gt;&amp;1 | tee log&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>685985</commentid>
    <comment_count>2</comment_count>
    <who name="Nicolas L.">kde</who>
    <bug_when>2008-12-23 20:21:16 +0000</bug_when>
    <thetext>ktraderclient --mimetype interface/x-winamp-skin | grep DesktopEntryPath
DesktopEntryPath : &apos;/usr/share/applications/kde4/ark.desktop

No it was already with this mimetypes, i didn&apos;t added nothing for this one 

I done a test ( don&apos;t know if this can help )

i added an association in interface/x-winamp-skin, i added amarok and i applied. Amarok show OK on the window.
i done your test and got the same result:
ktraderclient --mimetype interface/x-winamp-skin | grep DesktopEntryPath
DesktopEntryPath : &apos;/usr/share/applications/kde4/ark.desktop

Then i tried kbuildsycoca4 --noincremental
and now the previous test give an other result: 

ktraderclient --mimetype interface/x-winamp-skin | grep DesktopEntryPath
DesktopEntryPath : &apos;/usr/share/applications/kde4/amarok.desktop&apos;
DesktopEntryPath : &apos;/usr/share/applications/kde4/ark.desktop&apos;

For the next test i changed in :
interface/x-winamp-skin=kde4-amarok.desktop;kde4-ark.desktop;
into 
interface/x-winamp-skin=kde4-amarok.desktop;kde4-ark.desktop;kde4-konqueror.desktop;
i ran kbuilsycoca4 and nothing changed, i still obtain :

ktraderclient --mimetype interface/x-winamp-skin | grep DesktopEntryPath
DesktopEntryPath : &apos;/usr/share/applications/kde4/amarok.desktop&apos;
DesktopEntryPath : &apos;/usr/share/applications/kde4/ark.desktop&apos;

I am building a new rpm with your patch and then comment here</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>686007</commentid>
    <comment_count>3</comment_count>
    <who name="David Faure">faure</who>
    <bug_when>2008-12-23 21:06:03 +0000</bug_when>
    <thetext>SVN commit 900848 by dfaure:

Fix removing an implicit association (derived mimetype) -- a bit like 164584 which had a unit test,
but obviously 178560 was slightly different...
BUG: 178560


 M  +9 -12     kmimeassociations.cpp  
 M  +18 -1     test/kmimeassociationstest.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&amp;revision=900848
</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>