Bug 104298

Summary: xdg-utils-1.1.2 xdg-mime awk script syntax error
Product: Portland Reporter: Eternal Sorrow <sergamena>
Component: xdg-utilsAssignee: Portland Bugs <portland-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: freedesktop-bugs
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: awk-length.patch

Description Eternal Sorrow 2017-12-17 01:07:06 UTC
Created attachment 136236 [details] [review]
awk-length.patch

I got multiple awk errors when tried to use xdg-utils and xdg-settings. For example:

$~ xdg-mime query default text/html
awk: cmd. line:13: Unexpected token
awk: cmd. line:13: Unexpected token
awk: cmd. line:13: Unexpected token
firefox.desktop

After some testing I've found the reason: awk funnction "length" is used without parenthesis which is unsupported by gawk. I've created simple patch to fix this.
Comment 1 Rex Dieter 2017-12-18 21:51:04 UTC
Thanks, patch committed

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.