Bug 17856 - Filter devices without medium
Summary: Filter devices without medium
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 5
Hardware: All Linux
Priority: Normal enhancement
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: MGA5-64-OK advisory
Keywords: Junior_job, validated_update
Depends on:
Blocks:
 
Reported: 2016-03-01 15:59 CET by Hartmut Goebel
Modified: 2016-05-20 13:39 CEST (History)
5 users (show)

See Also:
Source RPM: isodumper-0.44-1.mga5.src.rpm
CVE:
Status comment:


Attachments
Script to detect devices (4.19 KB, text/x-python)
2016-03-05 22:51 CET, papoteur
Details
patch for test-udisk which removed skips all empty media (1.27 KB, patch)
2016-03-06 11:14 CET, Hartmut Goebel
Details | Diff

Description Hartmut Goebel 2016-03-01 15:59:07 CET
Having a multi-memorycard-reader installed (like this one: https://de.wikipedia.org/wiki/Datei:Internal_card_reader2.jpg), isodumper shows all four device this reader offers - even if no medium is plugged into the reader. This somehow clutters the list with useless entries.

I suggest to show only those devices with media plugged in.

One easy way o filter these out would be to check the size: If the size is zero, there is not medium plugged in.
Hartmut Goebel 2016-03-01 15:59:16 CET

Keywords: (none) => Junior_job

Comment 1 Marja Van Waes 2016-03-01 22:12:46 CET
Assigning to the isodumper developer

CC: (none) => marja11
Assignee: bugsquad => yves.brungard_mageia

Comment 2 papoteur 2016-03-05 22:51:20 CET
Created attachment 7516 [details]
Script to detect devices
Comment 3 papoteur 2016-03-05 22:53:54 CET
Hello Hartmut,
Can you try the command:
python test_usdisk.py
with the script I joined, and post the file test_usdisk.txt here?
I want try if I can detect something else as the size.
Comment 4 Hartmut Goebel 2016-03-06 11:04:14 CET
The result (without any USB-Stick and without any media) is as follows:

ConnectionBus usb Removable 1 MediaRemovable 1
ConnectionBus  Removable 0 MediaRemovable 0
ConnectionBus usb Removable 1 MediaRemovable 1
ConnectionBus usb Removable 1 MediaRemovable 1
ConnectionBus  Removable 1 MediaRemovable 1
ConnectionBus usb Removable 1 MediaRemovable 1
Generic- Compact Flash (/dev/sdc) 0Mb
Generic- MS/MS-Pro (/dev/sde) 0Mb
Generic- SM/xD-Picture (/dev/sdd) 0Mb
Generic- SD/MMC (/dev/sdb) 0Mb
Comment 5 Hartmut Goebel 2016-03-06 11:14:56 CET
Created attachment 7517 [details]
patch for test-udisk which removed skips all empty media

This small patch to test-udisk skips all empty media. Result is now as expected:

ConnectionBus usb Removable 1 MediaRemovable 1 Size 0
ConnectionBus  Removable 0 MediaRemovable 0 Size 64023257088
ConnectionBus usb Removable 1 MediaRemovable 1 Size 0
ConnectionBus usb Removable 1 MediaRemovable 1 Size 0
ConnectionBus  Removable 1 MediaRemovable 1 Size 0
ConnectionBus usb Removable 1 MediaRemovable 1 Size 0
ConnectionBus usb Removable 1 MediaRemovable 0 Size 4012900352
SanDisk Cruzer Blade (/dev/sdf) 3827Mb
Comment 6 Mageia Robot 2016-03-06 17:20:25 CET
commit 4bfcbc009bfd85b4d4ee23178a25200f9e7e9997
Author: Papoteur <papoteur@...>
Date:   Sun Mar 6 16:34:09 2016 +0100

    exclude void media mga#17856
---
 Commit Link:
   http://gitweb.mageia.org/software/isodumper/commit/?id=4bfcbc009bfd85b4d4ee23178a25200f9e7e9997
Comment 7 Hartmut Goebel 2016-03-06 18:49:12 CET
Thanks for fixing that quick :-)
Comment 8 papoteur 2016-05-14 18:39:26 CEST
In testing:
isodumper-0.47
Advisory
===================
Subject: Update Isodumper

Description:
This update solves some bugs.
The list of devices excludes media when the size is null. This was the case with for example multi-memorycard-reader without media (mga#17856).
Success message is also changed to be more clear about the log file (mga#17855).
Now, the "Refresh" action doesn't add extra devices in the list when more than one devices are present (mga#17857). 
Keep the file name for backup when selecting it again (mga#17886).
Add new design.
papoteur 2016-05-14 19:16:49 CEST

CC: (none) => yves.brungard_mageia
Assignee: yves.brungard_mageia => qa-bugs

Comment 9 Len Lawrence 2016-05-16 21:03:43 CEST
x86_64

# urpmi isodumper
(medium "Core Release2")
  lib64lvm2app2.2                2.02.111     6.mga5        x86_64  
  luit                           1.1.1        7.mga5        x86_64  
  python-parted                  3.10         7.mga5        x86_64  
  udisks                         1.0.5        5.mga5        x86_64  
  xterm                          315          1.mga5        x86_64  
(medium "Core Updates Testing")
  isodumper                      0.47         1.mga5        noarch  

$ isodumper --gtk
That worked fine writing a 6dev1 iso
The details button worked during the write cycle and so did About and Help.

On launch there were a couple of warnings:
/usr/lib/isodumper/isodumper.py:711: GtkWarning: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: Failed to create file '/root/.local/share/recently-used.xbel.UVERHY': No such file or directory
  gtk.main()
/usr/lib/isodumper/isodumper.py:711: GtkWarning: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory
  gtk.main()

Target Device: JetFlash Transcend 8GB (/dev/sdd) 7536Mb
Image : /home/lcl/iso/Mageia-6-dev1-x86_64-DVD.iso

Wrote: 100% 4395630592 bytes
Image Mageia-6-dev1-x86_64-DVD.iso successfully written to /dev/sdd
Bytes written: 4395630592
SHA1 sum: 429933c61c302d71b936475b577558cde3d9a01b
MD5  sum: 7c7804ae407fc8e8e8520a3e8c2152ba

The device no longer automounts at the end of the write.

It mounts fine when replugged and the file structure looks OK.

$ isodumper --qt produced exactly the same interface and the same gtk.main() warnings and progress messages.

So it looks as if it is working fine but may not be responding to the Qt directive.

Giving this the OK.  Unsure of what keyword to use for validation.

CC: (none) => tarazed25

Len Lawrence 2016-05-16 21:04:13 CEST

Whiteboard: (none) => MGA5_64-OK

Len Lawrence 2016-05-16 21:05:09 CEST

Whiteboard: MGA5_64-OK => MGA5-64-OK

Len Lawrence 2016-05-16 22:03:18 CEST

Whiteboard: MGA5-64-OK => (none)

Comment 10 Len Lawrence 2016-05-16 22:04:32 CEST
Withdrawing the OK because it has just penetrated that the tests do not address the point of the title of the bug.
Comment 11 Len Lawrence 2016-05-16 22:14:30 CEST
Tried again with a card reader plugged in, without any card.  It appeared in the /dev/sd* list but isodumper ignored it.  It showed a portable disk drive and the USB stick OK.

OK then.
Len Lawrence 2016-05-16 22:14:56 CEST

Whiteboard: (none) => MGA5-64-OK

Comment 12 papoteur 2016-05-16 22:37:12 CEST
Hello,
Thanks for testing.
The new version address  also this bugs:
Success message is also changed to be more clear about the log file (mga#17855).
Now, the "Refresh" action doesn't add extra devices in the list when more than one devices are present (mga#17857). 
Keep the file name for backup when selecting it again (mga#17886).

The commands --qt and --gtk are for the release now in cauldron. This one doesn't have these options.
Papoteur
Comment 13 Len Lawrence 2016-05-17 14:35:37 CEST
I have checked those pointsnow and can confirm that they are all effective.

Thanks.
Dave Hodgins 2016-05-20 11:52:39 CEST

Keywords: (none) => validated_update
Whiteboard: MGA5-64-OK => MGA5-64-OK advisory
CC: (none) => davidwhodgins, sysadmin-bugs

Comment 14 Mageia Robot 2016-05-20 13:39:12 CEST
An update for this issue has been pushed to the Mageia Updates repository.

http://advisories.mageia.org/MGAA-2016-0077.html

Status: NEW => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.