remove magic related warning for focal and bionic
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
sosreport (Ubuntu) |
Fix Committed
|
Undecided
|
nikhil kshirsagar | ||
Focal |
Fix Released
|
Undecided
|
nikhil kshirsagar |
Bug Description
[IMPACT]
bionic and focal "sos report" command spews this warning on stderr
and sos defaults to an older approach for binary detection.
"
WARNING: Failed to load 'magic' module version >= 0.4.20 which sos aims
to use for detecting binary files. A less effective method will be used.
It is recommended to install proper python3-magic package with the
module.
"
This stderr output warning causes autopkgtests to fail for focal and bionic.
This patch avoids showing the warning since focal and bionic would anyway never get the python3-magic version needed (0.4.20) so there is no point warning about this and it's better simply to use to the older approach without checking for this version of python3-magic.
See https:/
[TEST PLAN]
Documentation for Special Cases:
https:/
[WHERE PROBLEMS COULD OCCUR]
Since this patch avoid looking for python3-magic itself it may cause issues in sosreport in other places where there is an assumption about python3-magic having at least being attempted loading. I have however gone through the code and ruled this out, so this patch looks quite safe to me.
Changed in sosreport (Ubuntu): | |
status: | New → Fix Committed |
assignee: | nobody → nikhil kshirsagar (nkshirsagar) |
summary: |
- remote magic related warning for focal and bionic + remove magic related warning for focal and bionic |
tags: | added: patch |
Changed in sosreport (Ubuntu Focal): | |
assignee: | nobody → nikhil kshirsagar (nkshirsagar) |
The patch looks good to me. Solves the false positive autopkgtest issue we discussed before.