Bug 118123 - kdf shows some entries twice
Summary: kdf shows some entries twice
Status: RESOLVED FIXED
Alias: None
Product: kdf
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
: 173082 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-12-11 17:35 UTC by Olivier Trichet
Modified: 2013-01-19 22:37 UTC (History)
9 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Image proof of what I mean. (83.99 KB, image/png)
2007-10-07 20:43 UTC, Jon
Details
Screenshot (855.49 KB, image/png)
2008-06-02 22:57 UTC, Rafa
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Trichet 2005-12-11 17:35:11 UTC
Version:            (using KDE KDE 3.4.3)
Installed from:    Debian testing/unstable Packages
OS:                Linux

** From debian bug tracking system **
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=147088

----------------------------------------------------------------
From: Hendrik Sattler <-----@------------>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: kdf: KDM shows some entries twice
Date: Wed, 15 May 2002 18:19:01 +0200

Package: kdf
Version: 4:2.2.2-9
Severity: normal

Hi,

if you have got a line like this in /etc/fstab:
LABEL=home1     /home                     ext3            defaults   1   2

then kdf/kwikdisk shows the mount twice :/
/dev/hda5 has the partition label "home1" and then /dev/hda5 and LABEL=home1
are displayed, but the latter as "not mounted".

HS
----------------------------------------------------------------

This bug is still present in kdf v0.5 from kde 3.4.3
Comment 1 Janet 2007-02-22 02:33:24 UTC
Maybe this is similar:

Since I updated to KDE 3.5.6 and a 2.6.20 kernel using UUIDs to identify/mount partitions the partition list in kdf has doubled its size, all UUID entries have "classic" twins (/dev/hdx) when the partition is mounted. That's very confusing especially because the UUID entry shows a size of "N/A" and appears as not mounted whereas the classic entry shows a filesystem type of "?" but mounted. Does not look very reliable.
Comment 2 Jon 2007-10-07 20:43:49 UTC
Created attachment 21772 [details]
Image proof of what I mean.

Can someone take this bug out of "UNCONFIRMED" status and put it in open?

I attached an image of this. Basically, I use LABEL=Foo in my fstab and
KDiskFree should match up the LABEL with the actual disk dev name. Display
something like LABEL=Root (/dev/hda5) ext3 Size .... so on. Basically, show the
LABEL and then actual dev name in one line instead of two and calling one
unmounted. :S This bug has been open for two years now, so can someone get some
action going on this, by at least taking it out of UNCONFIRMED? That screenshot
I have pretty much confirms it and so does the 20 or so votes.
Comment 3 Oleg Atamanenko 2008-02-10 08:15:14 UTC
I can confirm this bug with KDE 4.0.1. (KDF 0.5)

Attachment with kde 4.0.1  - http://bugs.kde.org/attachment.cgi?id=23512&action=view
Comment 4 James Kerr 2008-04-20 23:51:02 UTC
Also still present in KDE 3.5.9 (Mandriva 2008.1)
Comment 5 Rafa 2008-06-02 22:57:45 UTC
Created attachment 25070 [details]
Screenshot

Add attachment with screenshot of BUG.
Comment 6 Christoph Feck 2009-01-01 15:48:00 UTC
*** Bug 173082 has been marked as a duplicate of this bug. ***
Comment 7 Joe Byers 2009-01-08 04:27:20 UTC
This is also a problem in Version 4.1.3 (KDE 4.1.3)

Redhat EL5 and the version of KDE from their repositories did not have this problem.

Comment 8 Joe Byers 2009-01-08 04:28:35 UTC
(In reply to comment #7)
> This is also a problem in Version 4.1.3 (KDE 4.1.3)

Running Fedora 10
> 
> Redhat EL5 and the version of KDE from their repositories did not have this
> problem.
> 

Comment 9 Nicolas L. 2009-10-11 00:48:41 UTC
i done a patch to handle UUID=, can someone tell me if i can commit it on trunk ?


Index: kdf/disklist.cpp                                                                                                      
===================================================================                                                          
--- kdf/disklist.cpp    (révision 1031780)                                                                                   
+++ kdf/disklist.cpp    (copie de travail)                                                                                   
@@ -28,6 +28,7 @@                                                                                                            
                                                                                                                             
 #include <QtCore/QTextStream>                                                                                               
 #include <QtCore/QFile>                                                                                                     
+#include <QRegExp>                                                                                                          
                                                                                                                             
 #include <kdebug.h>                                                                                                         
 #include <kglobal.h>                                                                                                        
@@ -216,23 +217,41 @@                                                                                                        
         {                                                                                                                   
             s=t.readLine();                                                                                                 
             s=s.simplified();                                                                                               
-            if ( (!s.isEmpty() ) && (s.indexOf(Delimiter)!=0) )                                                             
-            {                                                                                                               
+                                                                                                                            
+           if ( (!s.isEmpty() ) && (s.indexOf(Delimiter)!=0) )                                                              
+           {                                                                                                                
                 // not empty or commented out by '#'                                                                        
-                // kDebug() << "GOT: [" << s << "]" ;                                                                       
+                kDebug() << "GOT: [" << s << "]" ;                                                                          
                 disk = new DiskEntry();                                                                                     
                 disk->setMounted(false);                                                                                    
-                disk->setDeviceName(expandEscapes(s.left(s.indexOf(Blank))));                                               
-                s=s.remove(0,s.indexOf(Blank)+1 );                                                                          
-                //  kDebug() << "    deviceName:    [" << disk->deviceName() << "]" ;                                       
+               // We need to remove UUID=                                                                                   
+               bool isUuid = s.contains("UUID=");                                                                           
+               if (isUuid)                                                                                                  
+               {                                                                                                            
+                       QRegExp uuid("UUID=(\\S+)(\\s+)");                                                                   
+                       QString extracted ;                                                                                  
+                       if (uuid.indexIn(s) != -1) {                                                                         
+                               extracted = uuid.cap(1);                                                                     
+                       }                                                                                                    
+                       QString device = QString("/dev/disk/by-uuid/") + extracted;                                          
+                       QFile file(device);                                                                                  
+                       QString filesym = file.symLinkTarget();                                                              
+                       disk->setDeviceName(device);                                                                         
+                       s=s.remove(0,s.indexOf(Blank)+1 );                                                                   
+               }                                                                                                            
+               else                                                                                                         
+               {                                                                                                            
+                       disk->setDeviceName(expandEscapes(s.left(s.indexOf(Blank))));                                        
+                       s=s.remove(0,s.indexOf(Blank)+1 );                                                                   
+               }                                                                                                            
+                //kDebug() << "    deviceName:    [" << disk->deviceName() << "]" ;                                         
 #ifdef _OS_SOLARIS_                                                                                                         
                 //device to fsck
                 s=s.remove(0,s.indexOf(Blank)+1 );
 #endif
-
-                disk->setMountPoint(expandEscapes(s.left(s.indexOf(Blank))));
-                s=s.remove(0,s.indexOf(Blank)+1 );
-                //kDebug() << "    MountPoint:    [" << disk->mountPoint() << "]" ;
+               disk->setMountPoint(expandEscapes(s.left(s.indexOf(Blank))));
+               s=s.remove(0,s.indexOf(Blank)+1 );
+               //kDebug() << "    MountPoint:    [" << disk->mountPoint() << "]" ;
                 //kDebug() << "    Icon:          [" << disk->iconName() << "]" ;
                 disk->setFsType(s.left(s.indexOf(Blank)) );
                 s=s.remove(0,s.indexOf(Blank)+1 );
@@ -263,7 +282,7 @@

     loadSettings(); //to get the mountCommands

-    //  kDebug() << "DiskList::readFSTAB DONE" ;
+    //kDebug() << "DiskList::readFSTAB DONE" ;
     return 1;
 }
Comment 10 andrew brewster 2009-10-12 22:36:03 UTC
By Jove, I think he's fixed it!
KwikDisk | KDiskFree v0.9 using KDE4.3.2 no longer shows duplicate rows, and all disk info is correct on each line.
I think this one can be marked as fixed.
Comment 11 Janet 2009-10-13 05:20:12 UTC
> KDiskFree v0.9 using KDE4.3.2 no longer shows duplicate rows

It still does here. I guess this will be available in a later version?
Comment 12 Nicolas L. 2009-10-13 09:52:52 UTC
this is fixed for andrew on kde 4.3.2 because he uses mandriva rpms where i put my fix.

i wait for a review of my patch ( the review is in progress ) then i commit on KDE
Comment 13 Nicolas L. 2009-10-13 11:13:36 UTC
SVN commit 1034605 by nlecureuil:

Allow to handle fstab when it contains UUID
CCBUG:118123


 M  +60 -13    disklist.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1034605
Comment 14 Nicolas L. 2009-10-13 12:51:19 UTC
SVN commit 1034733 by nlecureuil:

forward port of revision 1034605
CCBUG:118123


 M  +60 -13    disklist.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1034733
Comment 15 Javier Conti 2010-01-05 03:07:05 UTC
I have this bug on kdf-4.3.85 (openSUSE) with filesystems mounted by label.
Entries are shown twice, on the row with the device it's ok, on the row using the label there's no data.
Comment 16 Janet 2010-05-24 20:58:09 UTC
I don't have this in KDE 4.4.3/Debian unstable, looks much clearer now. :)