Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 839171 - sys-apps/busybox: automated shellcheck found errors
Summary: sys-apps/busybox: automated shellcheck found errors
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Embedded Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-18 11:06 UTC by shellbugbot
Modified: 2022-04-19 21:19 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description shellbugbot 2022-04-18 11:06:00 UTC
Shellckeck found errors in one or more shellscripts provided by sys-apps/busybox.

Kindly refer to the findings below and the shellcheck wiki for further details:

------------------------------------------------
script: /usr/portage/sys-apps/busybox/files/mdev/ide_links:6

for i in $media $media[0-9]* ; do
                
error: Use braces when expanding arrays, e.g. ${array[idx]} (or ${var}[.. to quiet). (https://github.com/koalaman/shellcheck/wiki/SC1087)

------------------------------------------------
script: /usr/portage/sys-apps/busybox/files/mdev/ide_links:20

num=`ls $media[0-9]* 2>/dev/null | wc -l`
        
error: Use braces when expanding arrays, e.g. ${array[idx]} (or ${var}[.. to quiet). (https://github.com/koalaman/shellcheck/wiki/SC1087)

------------------------------------------------
script: /usr/portage/sys-apps/busybox/files/mdev/usbdisk_link:25

elif [ -e /sys/block/*/$MDEV ] ; then
          ^^^^^^^^^^^^^^^^^^
error: -e doesn't work with globs. Use a for loop. (https://github.com/koalaman/shellcheck/wiki/SC2144)

This is an automated bug report. Conservative settings were used to minimize false-positives but there's still a chance that the above list contains non-issues.
Running shellcheck again with default settings could detect other possible issues.

References:
[1] this script: https://github.com/heeplr/gentoo-shellbug
[2] shellcheck: https://www.shellcheck.net/