Bug 26681

Summary: Isodumper produces excessive command line debug output
Product: Mageia Reporter: w unruh <unruh>
Component: RPM PackagesAssignee: David GEIGER <geiger.david68210>
Status: RESOLVED FIXED QA Contact:
Severity: minor    
Priority: Normal CC: anaselli, andrewsfarm, rihoward1, yvesbrungard
Version: Cauldron   
Target Milestone: ---   
Hardware: All   
OS: Linux   
See Also: https://bugs.mageia.org/show_bug.cgi?id=26682
Whiteboard: MGA7TOO
Source RPM: libyui CVE:
Status comment:

Description w unruh 2020-05-25 17:49:35 CEST
Description of problem:Run from the command line, isodumper produces a huge amount of qt debugging output, which really should not be there. This is particularly confusing if one runs
isohelper --help
and gets a huge screenful of junk like
<_M_> [qt-ui] YQUI.cc:271 processCommandLineArgs(): Qt argument: /usr/bin/isodumper


 Furthermore, isodumper now supports exfat and the rpm info (rpm -qi) for the isodumper package and the gui screen should add exfat into the list of formats it supports At present the gui screen just says 
Format the device as FAT, NTFS or ext:
and the rpm -qi isodumper says
* format the device in one partition of ext4, NTFS or FAT32 type;

They should also say exfat.



Version-Release number of selected component (if applicable):
isodumper-1.16-1.mga7

How reproducible: Always



Steps to Reproduce:
1.run isodumper from the command line.
2.
3.
Lewis Smith 2020-05-25 21:49:33 CEST

See Also: (none) => https://bugs.mageia.org/show_bug.cgi?id=26682

Comment 1 Lewis Smith 2020-05-25 21:57:11 CEST
> Furthermore, isodumper now supports exfat etc etc etc
This has just been reported in bug 26682, for which this bug is a duplicate.
(This should have been the other way round, but the later bug got done first).

But the first complaint:
> Run from the command line, isodumper produces a huge amount of qt
> debugging output
is indeed the case. More than a screenful before doing anything. Similar for Gtk. So retaining this separate issue as a separate bug.

Assigning as for the other one to DavidG, CC'ing Yves.

Assignee: bugsquad => geiger.david68210
CC: (none) => yves.brungard_mageia
Severity: normal => minor

Lewis Smith 2020-05-25 21:57:56 CEST

Summary: command line debug output, and exfat => Isodumper produces excessive command line debug output

Comment 2 papoteur 2020-05-25 22:20:12 CEST
The verbose output is the case for all tools using libyui, this not specific to Isodumper. I agree that this not welcome.
I don't know how to manage that.

Whiteboard: (none) => MGA7TOO
Source RPM: isodumper => libyui
Version: 7 => Cauldron

papoteur 2020-05-25 22:20:38 CEST

CC: (none) => anaselli

Comment 3 r howard 2020-05-25 23:32:17 CEST
papoteur unless you explicitly setup logging for libyui it logs to standerr.

Unfortunately libyui documents this only in the source code and examples.
See
https://github.com/libyui/libyui/blob/master/src/YUILog.h
https://github.com/libyui/libyui/blob/master/src/YUILog.cc
and the examples
For instance
https://github.com/libyui/libyui/blob/master/examples/Table-many-items.cc
https://github.com/libyui/libyui/blob/master/examples/SelectionBox1.cc
and more examples in
https://github.com/libyui/libyui/blob/master/examples/

I suggest that you create a conf file in /usr/lib/isodumper/ and read the location of the log file there. How many rollovers of the file to have and maximum size of each rollover of the file. You will have to create code to manage that it looks like unless I missed something in my reading of YUILog.cc.
The spec file should create a conf file with the default values.

CC: (none) => rihoward1

Comment 4 r howard 2020-05-26 06:29:18 CEST
papoteur as a proof of concept I modified my local copy of 
http://gitweb.mageia.org/software/isodumper/tree/isodumper

I added after the line

import yui


log = yui.YUILog.instance()
log.setLogFileName("isodumper.log")
log.enableDebugLogging( False )

saved the file.
Then I ran isodumper from the command line and the writing of the yui messages went to isodumper.log instead of the screen.

I have also tried this with
 log.setLogFileName("/dev/null") and that works also sending the log output to the bit bucket.


The only other problem I saw was messages about bad fonts but that is coming from elsewhere and does not happen with Mageia 8, only with Mageis 7.
Comment 5 Angelo Naselli 2020-05-26 08:33:14 CEST
Confirming that is a libyui issue/feature.
btw isodumper output is not that long as descibed in this bug...
Confirming also that i also believe the only way to remove output is using a file since there are not any APIs for mute logging.
Interesting comment #4 with /dev/null that didn't work for me, but i hadn't investigated that much when i tried long time ago.

either args, e.g. --help is a libyui issue.
into dnfdragora i overwrote arg parse
https://github.com/manatools/dnfdragora/blob/master/bin/dnfdragora#L22-L41
Comment 6 r howard 2020-05-26 08:45:01 CEST
Angelo it is a minimum of 46 lines of standerr output from the yui API when launching isodumper from the command line.
It is fairly simple to add a few lines to suppress the output.
Comment 7 papoteur 2020-05-26 09:23:01 CEST
(In reply to r howard from comment #4)
> papoteur as a proof of concept I modified my local copy of 
> http://gitweb.mageia.org/software/isodumper/tree/isodumper
> 
> I added after the line
> 
> import yui
> 
> 
> log = yui.YUILog.instance()
> log.setLogFileName("isodumper.log")
> log.enableDebugLogging( False )
> 
> saved the file.
> Then I ran isodumper from the command line and the writing of the yui
> messages went to isodumper.log instead of the screen.
> 
> I have also tried this with
>  log.setLogFileName("/dev/null") and that works also sending the log output
> to the bit bucket.
Thanks a lot.
This helps. the enableDebugLogging doesn't seem to have (a lot of) effect. I committed a change for that.

> 
> 
> The only other problem I saw was messages about bad fonts but that is coming
> from elsewhere and does not happen with Mageia 8, only with Mageis 7.
I don't have that.
Papoteur
Comment 8 papoteur 2020-05-26 09:33:38 CEST
(In reply to Angelo Naselli from comment #5)
> either args, e.g. --help is a libyui issue.
> into dnfdragora i overwrote arg parse
> https://github.com/manatools/dnfdragora/blob/master/bin/dnfdragora#L22-L41

Hi Angelo,
Thanks for this tip. I never tried --help before.
Oups, it refers to Yast2 :/
Comment 9 Thomas Andrews 2020-05-26 14:41:34 CEST
papoteur, is there any problem on your end with combining this with Bug 26682? Even though they are really separate issues, w unruh did bring it up here, and I don't see the need for two updates to resolve them. (But then, I'm not the developer.) I would be more than willing to mark my bug as a duplicate if that would help, but of course it's your call.

Just for the record, in addition to the gui, Bug 26682 mentions the lack of notice of exfat support in the description that pops up in drakrpm, and in the text from the "help" button.

Just to bring one more thing up, although w unruh did mention it, running the command "isodumper --help" or "isodumper -h" attempts to run the program, after producing all the extra verbiage that w unruh mentioned. It does not produce any isodumper help text in the terminal, as would be the usual expectation.

CC: (none) => andrewsfarm

Comment 10 papoteur 2020-05-26 14:59:22 CEST
(In reply to Thomas Andrews from comment #9)
> papoteur, is there any problem on your end with combining this with Bug
> 26682? Even though they are really separate issues, w unruh did bring it up
> here, and I don't see the need for two updates to resolve them. (But then,
> I'm not the developer.) I would be more than willing to mark my bug as a
> duplicate if that would help, but of course it's your call.
> 
> Just for the record, in addition to the gui, Bug 26682 mentions the lack of
> notice of exfat support in the description that pops up in drakrpm, and in
> the text from the "help" button.
> 
Yes, what I have commit deals also with the available help and a label to mention exFAT. Thus, this will be only one update. I wait for some translated text before  pushing the update.
We can keep bug 26682 for the part of documentation not mentioning exFAT.
> Just to bring one more thing up, although w unruh did mention it, running
> the command "isodumper --help" or "isodumper -h" attempts to run the
> program, after producing all the extra verbiage that w unruh mentioned. It
> does not produce any isodumper help text in the terminal, as would be the
> usual expectation.

I haven't dealt with this part for now.
Comment 11 w unruh 2020-05-26 20:43:27 CEST
Actually on my system when I type isodumper --help on the command line, I get that bunch of debugging output from libyui and opening of the isodumper gui
plus a very brief help output, which simply lists the options for the isodumper cli version. 

----------------------------
Command line options for the YaST2 Qt UI:

--nothreads     run without additional UI threads
--fullscreen    use full screen for `opt(`defaultsize) dialogs
--noborder      no window manager border for `opt(`defaultsize) dialogs
--auto-fonts    automatically pick fonts, disregard Qt standard settings
--help  this help text

--macro <macro-file>          play a macro right on startup

-no-wm, -noborder etc. are accepted as well as --no-wm, --noborder
to maintain backwards compatibility.
-----------------------------------

whether this comes from isodumper of from libyui I do not know. It certainly is not the same as the help text from the Help button in the gui.


The command line is not a program that does anything except launch the gui it seems. Ie, one cannot use the command line to actually do anything. 

Note that ^C on the command line does not kill the program, as it should. 

Also there is no man page for isodumper.
Comment 12 Angelo Naselli 2020-05-26 23:30:57 CEST
It comes from libyui, run isodumper --noborder and or --fullscreen for instance.
Any libyui programs have this feature
Comment 13 papoteur 2020-06-27 12:41:19 CEST
A new release 1.18 in cauldron give a correction for that.
Comment 14 papoteur 2020-06-29 14:59:26 CEST
This is now OK with 1.18 release in cauldron.

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