Bug 3309

Summary: drakxtools print perl warnings in console (module-init-tools/ldetect)
Product: Mageia Reporter: Samuel Verschelde <stormi-mageia>
Component: RPM PackagesAssignee: Thierry Vignaud <thierry.vignaud>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Normal CC: mageia, pterjan, thierry.vignaud
Version: CauldronKeywords: PATCH
Target Milestone: ---   
Hardware: i586   
OS: Linux   
Whiteboard:
Source RPM: module-init-tools / ldetect CVE:
Status comment:
Bug Depends on:    
Bug Blocks: 3031    
Attachments: console logs
This renames m-d-i's warn() as mod_warn()
prevents calling random stuff on error (and "logs"both lspcidrake & mod* still works after errors)

Description Samuel Verschelde 2011-11-10 14:57:57 CET
[root@localhost ~]# LC_ALL=C harddrake2
perl: "include /lib/module-init-tools/modprobe.compat" is deprecated, please use /etc/modprobe.d
: No such file or directory
perl: Deprecated config file /etc/modprobe.conf, all config files belong into /etc/modprobe.d/.
: Not a directory
perl: All config files need .conf: /etc/modprobe.d/live, it will be ignored in a future release.
: No such file or directory
perl: "include /lib/module-init-tools/modprobe.compat" is deprecated, please use /etc/modprobe.d
: No such file or directory
perl: Deprecated config file /etc/modprobe.conf, all config files belong into /etc/modprobe.d/.
: Not a directory

etc. (full log attached)
Comment 1 Samuel Verschelde 2011-11-10 14:58:53 CET
Created attachment 1051 [details]
console logs
Comment 2 Samuel Verschelde 2011-11-10 15:15:40 CET
in fact it happens with several drakxtools, drakroam for example.

Summary: harddrake2 prints perl errors in console => drakxtools print perl errors in console

Olivier Blin 2011-11-10 22:07:19 CET

CC: (none) => mageia, thierry.vignaud
Summary: drakxtools print perl errors in console => drakxtools print perl errors in console (module-init-tools/ldetect)
Source RPM: drakxtools-13.63-2.mga2.src.rpm => (none)

Olivier Blin 2011-11-10 22:07:33 CET

CC: (none) => pterjan

Comment 3 Olivier Blin 2011-11-10 22:07:40 CET
Looks like it is a bug in ldetect or module-init-tools.
It seems that the warn() function of logging.c (in module-init-tools) is not called at all. Maybe a warn() function from perl is called instead?

Also, in modalias.c from ldetect, the "errfn_t error" function pointer is not initialized, this can lead to chaos.
Manuel Hiebel 2011-11-11 01:10:25 CET

Blocks: (none) => 3031

Comment 4 Manuel Hiebel 2011-11-17 14:46:59 CET
duplicate of bug 2784 ?
Comment 5 Thierry Vignaud 2011-11-21 13:36:42 CET
Created attachment 1091 [details]
This renames m-d-i's warn() as mod_warn()
Comment 6 Thierry Vignaud 2011-11-21 13:36:50 CET
Created attachment 1092 [details]
prevents calling random stuff on error (and "logs"both lspcidrake & mod* still works after errors)

both lspcidrake & mod* still works after
Comment 7 Thierry Vignaud 2011-11-21 16:00:04 CET
Now those warnings go the libmodprobe tubes way.
They still shows

Keywords: (none) => PATCH
Status: NEW => ASSIGNED
Assignee: bugsquad => thierry.vignaud
Summary: drakxtools print perl errors in console (module-init-tools/ldetect) => drakxtools print perl warnings in console (module-init-tools/ldetect)
Source RPM: (none) => module-init-tools / ldetect

Comment 8 Thierry Vignaud 2011-11-21 19:49:15 CET
Fixed

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